Skip to content

Update Infinite ONRAMP for new headless transfer API#6005

Open
j0ntz wants to merge 6 commits intodevelopfrom
jon/infinite-buy-again
Open

Update Infinite ONRAMP for new headless transfer API#6005
j0ntz wants to merge 6 commits intodevelopfrom
jon/infinite-buy-again

Conversation

@j0ntz
Copy link
Copy Markdown
Contributor

@j0ntz j0ntz commented Apr 30, 2026

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

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/transfers with "type": "ONRAMP" returns id: null plus a stable depositAddressId (e.g. vba_…); the tfr_… is created later, when funds arrive.
  • Source is now { 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.
  • New GET /v1/headless/transfers/deposit-address/:depositAddressId re-fetches the same response shape for an existing VBA.
  • OFFRAMP semantics are unchanged.

Changes

  • Update infiniteApiTypes for the new response shape: nullable id, optional depositAddressId, optional bankBeneficiaryName on sourceDepositInstructions. Rebuild InfiniteOnrampTransferRequest to match the new { source, destination } payload and add getDepositAddress to the InfiniteApi surface.
  • Switch the Infinite buy quote to ACH push payment (paymentType: 'ach') and skip bankAccountWorkflow on ONRAMP since Edge no longer collects the user's bank.
  • Always reset the confirmation slider once onConfirm settles. 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.
  • Pop the Infinite ramp stack to the top after the user dismisses the bank routing details scene (replaces the old goBack()-by-one).
  • Make the bank routing instructions and warning text wrap and stop them from shrinking under large system fonts.
  • Surface the bankBeneficiaryName from 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:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

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 createTransfer now returning nullable id plus depositAddressId and optional bankBeneficiaryName (and adding getDepositAddress). The confirmation workflow is updated accordingly: it no longer collects a user bank account for buys, validates deposit instructions are present, and uses depositAddressId as a fallback order id for analytics.

Improves ramp UX reliability by always resetting the confirmation slider after onConfirm completes, 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.

j0ntz added 6 commits April 29, 2026 15:39
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.
@j0ntz j0ntz mentioned this pull request Apr 30, 2026
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant