Skip to main content
POST
/
ramp
/
orders
Create a ramp order
curl --request POST \
  --url https://api.chainrails.io/api/v1/ramp/orders \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "provider": "FONBNK",
  "fiatCurrency": "NGN",
  "cryptoAmount": 10,
  "destinationChain": "BASE_MAINNET",
  "recipientAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
  "countryCode": "NG",
  "fields": {
    "phoneNumber": "+2348012345678"
  }
}
'

Authorizations

Authorization
string
header
required

Enter your Chainrails API key as a Bearer token

Body

application/json
provider
enum<string>
required

Ramp provider to use for this order

Available options:
FONBNK,
ONRAMP_MONEY
Example:

"FONBNK"

fiatCurrency
string
required

ISO 4217 fiat currency code

Example:

"NGN"

cryptoAmount
number
required

Amount of crypto the user wants to receive

Example:

10

destinationChain
enum<string>
required

Destination blockchain where user wants their funds

Available options:
ARBITRUM_MAINNET,
ARBITRUM_TESTNET,
AVALANCHE_MAINNET,
AVALANCHE_TESTNET,
BASE_MAINNET,
BASE_TESTNET,
STARKNET_MAINNET,
STARKNET_TESTNET,
BSC_MAINNET,
ETHEREUM_MAINNET,
ETHEREUM_TESTNET,
OPTIMISM_MAINNET,
OPTIMISM_TESTNET,
MONAD_MAINNET,
MONAD_TESTNET,
POLYGON_MAINNET,
HYPEREVM_MAINNET,
LISK_MAINNET
Example:

"BASE_MAINNET"

recipientAddress
string
required

Recipient wallet address on the destination chain

Example:

"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"

countryCode
string

ISO 3166-1 alpha-2 country code of the user. Required for multi-country currencies (e.g., XOF — pass "BJ" for Benin, "SN" for Senegal). Falls back to the currency's default country if omitted.

Example:

"NG"

fields
object

Provider-specific fields required by the payment channel (e.g., phone number, bank code)

Example:
{ "phoneNumber": "+2348012345678" }

Response

Ramp order created successfully