Skip to main content
Create buy orders with POST /api/developer/orders.
How to read this pageThis is the point where a quote becomes a real transaction. Keep the quote response nearby while you create the order.
When you create a buy order, RampHub also creates the matching order intent automatically. If you need to show the active payment window or let support extend it, see Order intent. If the same customer, token, and network already has an active order window, RampHub returns a structured PAYCHAIN_ACTIVE_INTENT_CONFLICT response. Your app can use the Order intent endpoint to show the current window first, or resend the order with overrideActiveIntent: true if the customer wants to replace it.

Request body

Required on every order:
string
required
number
required
string
required
string
required
string
required
The network: one of the values in Networks, such as base or arbitrum.
Required for buys — amount is the crypto amount, and you also need a destination wallet address:
number
required
string
required
Buying with an African currencyA buy in KES, GHS or another African currency is paid by mobile money. It also needs bankCode (the paying network) and accountNumber (the paying mobile number), and country for XOF. The customer approves a payment prompt on their phone, so the response has no bank account to pay into.
Optional but useful:
string
string
number
boolean
string
Route through this provider. The order uses it, or fails with a 400 saying why it cannot take this trade - it is never switched to another provider. Leave it out for the best rate.

Business fees

RampHub lets businesses attach a developer fee percent to the same order request. RampHub accrues the fee internally, so you only need the percentage:

Response shape

The response includes the tracked RampHub transaction id, the selected provider, and the payment instructions to show the customer.
string
The order’s id. Use it for status sync; it is data.id in webhooks.
string
RampHub’s reference for the order. On most orders it is the same as transactionId.
string
string
string
string
number
object
The provider’s payment instructions: the bank account the customer pays, the exact amount and when it expires. The shape depends on selectedProvider. With UseBread, they are in providerDetails.data.deposit, as in the example.
string | null
On a buy, RampHub’s own settlement address, where the provider delivers the crypto. Do not show it to the customer. The crypto reaches the customer at walletAddress.
string
boolean
boolean

Notes

  • Save transactionId right away.
  • Show the customer the payment instructions in providerDetails. Ask them to pay the exact amount before the account expires; with UseBread, a dynamic account lasts 30 minutes and can be used once.
  • developerFeePercent can be 0 or a small percentage like 0.5.
  • overrideActiveIntent can be set to true when the customer wants to replace an existing active order window.
  • The minimum order is $1 of crypto, measured by what fiatAmount buys; smaller orders fail with a 400 before anything is created.
  • With preferredProvider, quote first with the same provider to see its rate - the order is refused rather than routed elsewhere if that provider cannot take it.
  • Ignore ourCryptoAddress on a buy: it is not an address the customer sends to or receives at.