Skip to main content
Prerequisite: Your organization must be approved before it can quote. See KYC Overview for what verification requires, and KYC WebSDK for the hosted flow.
An onramp moves fiat from a bank account to a wallet. In v2 both sides are payment accounts: you register the bank account and the wallet, quote between them, create the order, and fund it. Every call below runs for one organization, set as $ORGANIZATION_ID in the examples. Use your own organization’s id from GET /me, or a customer organization’s id when you ramp for that customer. Register the accounts, quote and order under the same id. See Organizations in the route.

Onramp flow

1

Discover assets

2

Register the bank account and the wallet: POST /organization/{organizationId}/payment_account

3

Create a quote: POST /organization/{organizationId}/quote

4

Create the order: POST /organization/{organizationId}/order

5

Simulate the fiat deposit: POST /organization/{organizationId}/order/{id}/fiat_received

6

Track the order: GET /organization/{organizationId}/order/{id}


Stellar: wallets without a trustline

A Stellar wallet needs an on-chain account and a trustline before it can hold an asset. When the destination wallet has neither, we still deliver: we send the asset as a claimable balance, and the customer claims it.

How it works

  1. Quote as usual. The wallet is the quote’s destination, so we check it on-chain. If it needs setup, the quote’s feeBps and feeAmount include a one-time cost to cover the XLM for the account and the trustline reserve.
  2. Create and fund the order as usual.
  3. The order becomes claimable. We deliver the claimable balance, and the order’s claimInstructions describes it:
  4. Prepare the claim. Call POST /organization/{organizationId}/order/{id}/claim with no body. The response depends on the wallet:
    • stellarTransaction: a self-held wallet signs and submits xdr. The transaction adds the trustline and claims the balance in one step.
    • authorization: an embedded wallet gets an authorizationId. The order’s authorization with that id holds the message for the key holder to sign.
  5. Sign and submit. A self-held wallet submits the signed xdr. For an embedded wallet, the key holder signs authorization.method.message and you send the signature to POST /organization/{organizationId}/order/{id}/authorization; see Order authorization. After the claim lands, the wallet holds the trustline and the asset, and the order moves to completed.
If the wallet already has an account and the trustline, we deliver directly. The order goes from funded to completed, and claimInstructions stays null.
The claim transaction goes stale. It uses the wallet’s current sequence number, so any other transaction the wallet submits first breaks it. We build a new transaction on every call and never store one, so call the endpoint again right before the customer signs.