POST /v2/orders. The source is always a virtual account. The direction is inferred from the asset types, so you do not send a type.
Test this flow in sandbox. See ONRAMP orders (sandbox) for the simulated happy path, failure controls and webhooks.
Prerequisites
- An
activecustomer with a virtual account that holds the fiat to convert (Add virtual accounts). - For a Conduit wallet destination, an active wallet for the asset and chain you want (Add a crypto wallet). For an external wallet, nothing: the customer needs no Conduit wallet and signs nothing.
- A customer outside the United States. On live, an onramp for a customer in the United States returns
403 CAPABILITY_SUSPENDED; sandbox does not apply this refusal (Customers in the United States). - Your API key.
Choose the destination
Send to a Conduit wallet
Send to a wallet outside Conduit
recipientis the crypto recipient ofPOST /v2/payouts.recipient.chainmust equalasset.chain.attestation.custodyis required. Useselfwhen the customer owns the wallet. For a wallet that belongs to someone else, usethird_partyand add the owner’s identity:type, plusfirstName,lastNameandcountryOfCitizenship, orlegalNameandcountryOfRegistration.purposeanddocumentsfollow the same rules as a payout (Transact). A purpose ofintercompanyorpersonal_transfer_of_fundsneeds the address registered first (Registered Addresses).autoPayoutandsourceAssetare refused with anexternal_walletdestination.- To see the recipient fields before you build the request, call
GET /v2/orders/requirementswithrecipientRail=cryptoand the destination asset and chain.
withdrawal to the address, linked to the order by linkedOrderId. The withdrawal is screened like any crypto payout and cannot be cancelled once it exists.
Track the order
The order stayspending until it reaches succeeded, failed or cancelled. Watch the order.* and transaction.* webhooks (Webhooks). Use autoExecute: false to lock a rate and read the quote without committing, and cancel before execution with POST /v2/orders/{orderId}/cancel.
See also
- Quote before you order — price the onramp before you create it.
- Take your own margin — add your own margin to an onramp you resell.
- Send a payout — send crypto you already hold to an external address.