Update Infinite ONRAMP for new headless transfer API#6005
Open
Update Infinite ONRAMP for new headless transfer API#6005
Conversation
The new headless API returns id: null on ONRAMP create and instead
returns a depositAddressId (vba_…) referencing the virtual bank account
Infinite provisions for the customer. The create payload also drops the
user's bank account from the source — Infinite is the deposit recipient,
not the user. Adopt the new request/response shapes:
- Tighten createTransfer to a discriminated InfiniteTransferRequest
union; ONRAMP carries source: { currency, network } and no accountId.
- Allow id: null and surface depositAddressId + bankBeneficiaryName in
asInfiniteTransferResponse.
- Add getDepositAddress(depositAddressId) for refetching deposit
instructions (no callers yet).
- Update dummies to match the new shape.
- Fall back to depositAddressId for the Buy/Sell_Success analytics
orderId since ONRAMP no longer produces a tfr_… at create time.
Switch the buy quote rail from 'wire' to 'ach' and skip the user-bank account workflow on ONRAMP. The new headless transfer API provisions a virtual bank account on create, so the user pushes funds via ACH to a fixed route — Edge no longer needs the user's bank details on the buy flow.
Move reset() from the catch block into finally so the SafeSlider returns to its idle state on both success and error paths. Previously a successful transfer with no deposit instructions left the slider spinning indefinitely. Also throw an explicit error from the Infinite ONRAMP confirmation flow when the create-transfer response lacks bank deposit instructions, so the slider error path triggers instead of silently swallowing the condition.
Add popToTop() to the Infinite ramp NavigationFlow utility and use it when the user dismisses the bank routing details scene. Previously goBack() walked the user back through the confirmation scene before the parent finally took over, leaving stale flow state visible. popToTop() clears the entire ramp stack in one step.
Replace the Paragraph wrapping the instruction text with an EdgeText that explicitly allows unlimited lines and add a small left margin so the icon and text don't crowd each other. Apply the same numberOfLines override and disableFontScaling to the warning text so it stays readable when users have large system fonts.
Add an optional beneficiaryName field to BankInfo and render it as a copy-able row above the bank name when the Infinite create-transfer response includes a bankBeneficiaryName. Users frequently need that exact string on their bank's transfer form, so surfacing it inline removes a manual support touchpoint.
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
none
Description
Asana task
Replaces #5976 (closed in favor of this branch).
Context
Infinite updated their headless transfer API to fix the deposit-matching problem the original PR set out to solve. Each ONRAMP create now provisions a per-customer Virtual Bank Account (VBA), so funds match a transfer record by destination instead of by memo. The new shape is:
POST /v1/headless/transferswith"type": "ONRAMP"returnsid: nullplus a stabledepositAddressId(e.g.vba_…); thetfr_…is created later, when funds arrive.{ currency: "USD", network: "ACH" }. The user's own bank account is no longer part of the request — they push funds to the VBA we get back.GET /v1/headless/transfers/deposit-address/:depositAddressIdre-fetches the same response shape for an existing VBA.Changes
infiniteApiTypesfor the new response shape: nullableid, optionaldepositAddressId, optionalbankBeneficiaryNameonsourceDepositInstructions. RebuildInfiniteOnrampTransferRequestto match the new{ source, destination }payload and addgetDepositAddressto theInfiniteApisurface.paymentType: 'ach') and skipbankAccountWorkflowon ONRAMP since Edge no longer collects the user's bank.onConfirmsettles. Throw an explicit error from the ONRAMP create flow when deposit instructions are missing so the slider error path triggers instead of the slider hanging.goBack()-by-one).bankBeneficiaryNamefrom the create response as a copy-able row above the bank name on the routing details scene.Notes
The bank-info-fields commit from the prior PR (
287928f079, address lines / deposit-message / split instruction strings) is intentionally not pulled — those fields aren't in the spec Infinite shared and need product confirmation before adding.Requirements
If you have made any visual changes to the GUI. Make sure you have:
Description
Asana task
Note
Medium Risk
Changes core buy ramp transfer creation semantics and API response handling (nullable ids, new depositAddressId), which could affect order tracking and user deposit instructions if mismatched or unhandled.
Overview
Updates Infinite ONRAMP to the new headless transfers API by switching buy flows to ACH push payments that provision a per-customer virtual bank account, with
createTransfernow returning nullableidplusdepositAddressIdand optionalbankBeneficiaryName(and addinggetDepositAddress). The confirmation workflow is updated accordingly: it no longer collects a user bank account for buys, validates deposit instructions are present, and usesdepositAddressIdas a fallback order id for analytics.Improves ramp UX reliability by always resetting the confirmation slider after
onConfirmcompletes, popping to the top of the navigation stack when dismissing bank routing details, and updating the bank routing details screen to wrap instruction/warning text under large fonts while optionally showing a copyable Beneficiary Name row.Reviewed by Cursor Bugbot for commit 39bd261. Bugbot is set up for automated code reviews on this repo. Configure here.