Skip to main content
Create sell orders with POST /api/developer/orders. When you create a sell 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.
For sells, send resolved bank details instead of walletAddress:
string
required
string
required
string
required
Optional but useful:
string
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.
Selling for an African currencyFor KES, GHS and the other African currencies, bankCode can be a bank or a mobile money network, and accountNumber is then the bank account number or the wallet’s mobile number. Send country for XOF, and recipientPhone for a ZAR bank payout. The 10-digit rule applies to NGN only.
If you need to render the accepted banks for a specific provider before the user submits the order, call Provider bank list and use the returned bankCode values in the sell form. If you do not already have the account holder name, call POST /api/developer/bank-accounts/resolve first and reuse the returned accountName.

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 where the customer sends the crypto.
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 | null
Usually null on a sell: the provider’s payout is arranged after the crypto arrives.
string
The address the customer sends the crypto to, on chain. It belongs to this order.
object
Present on most orders. expectedAmount is the amount to send, and depositIntentExpiresAt is when the address stops accepting it for this order. Order intent returns the same window.
string
boolean
boolean

Notes

  • Save transactionId right away.
  • Show the customer ourCryptoAddress, the token and network, and the exact amount (amount), and ask them to send it before the window closes (usually 30 minutes).
  • 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 (amount); smaller orders fail with a 400 before anything is created.
  • With preferredProvider, the provider’s own minimum applies too. UseBread’s is $1, measured on what it receives after RampHub’s fee and your developerFeePercent; below that the order fails with a 400 instead of moving to another provider.