Skip to main content
Create buy orders with POST /api/developer/orders.
How to read this page
This is the point where a quote becomes a real transaction. Keep the quote response nearby while you create the order.

Request body

Required on every order

  • side
  • amount
  • fiatCurrency
  • asset
  • chain

Buy orders

For buys, amount is the crypto amount and fiatAmount is required. You also need a destination wallet address. Required:
  • fiatAmount
  • walletAddress
Optional but useful:
  • email
  • externalCustomerId
  • developerFeeAddress
  • developerFeePercent
curl -X POST "https://api.ramphub.io/api/developer/orders" \
  -H "x-api-key: rh_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "side": "buy",
    "amount": 3,
    "fiatAmount": 15000,
    "fiatCurrency": "NGN",
    "asset": "USDT",
    "chain": "base",
    "walletAddress": "0xRecipientWalletAddress",
    "email": "user@example.com",
    "externalCustomerId": "cust_7f3b8a2d",
    "developerFeeAddress": "0xDeveloperFeeWallet",
    "developerFeePercent": 2.5
  }'

Business fees

RampHub lets businesses attach a fee address and fee percent to the same order request. Use both fields together:
curl -X POST "https://api.ramphub.io/api/developer/orders" \
  -H "x-api-key: rh_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "side": "buy",
    "amount": 3,
    "fiatAmount": 15000,
    "fiatCurrency": "NGN",
    "asset": "USDT",
    "chain": "base",
    "walletAddress": "0xRecipientWalletAddress",
    "developerFeeAddress": "0xDeveloperFeeWallet",
    "developerFeePercent": 2.5
  }'
Rules:
  • Send developerFeeAddress and developerFeePercent together.
  • developerFeePercent must be greater than 0 and at most 100.

Response shape

The response includes the tracked RampHub transaction id, the selected provider, and the next-step details you need to show the user. Common fields:
  • transactionId
  • requestReference
  • side
  • asset
  • chain
  • selectedProvider
  • bestRateUsed
  • providerDetails
  • ourCryptoAddress
  • environment
  • sandbox
  • trackable
{
  "transactionId": "0d4b7fb0-66f7-4a52-9183-7c3fe44f0db2",
  "requestReference": "RH-TX-AB12CD34",
  "side": "buy",
  "asset": "USDT",
  "chain": "base",
  "selectedProvider": "UseBread",
  "bestRateUsed": 1397.17,
  "providerDetails": {
    "status": "AWAITING_DEPOSIT"
  },
  "ourCryptoAddress": null,
  "environment": "live",
  "sandbox": false,
  "trackable": true
}

Rules

  • Save transactionId right away.
  • Use providerDetails for the next step.
  • Use ourCryptoAddress when it is present.