Get On-Ramp Exchange Rate

Get a fee breakdown and crypto conversion for a proposed on-ramp transaction.

Returns the platform fee, business fee, gas fee, and crypto amount breakdown for a fiat-to-crypto on-ramp before initiating a transaction.

Endpoint

POST /v1/exchange-rates/onramp

Authentication

Requires a Merchant API key in the Authorization header.

Authorization: <api_key>

Request body

Field
Type
Required
Description

fiatAmount

number

Yes

Amount in fiat the customer will pay

businessFeeInFiat

number

Yes

Your business fee in fiat. Send 0 if not charging a fee

fiatCurrency

string

Yes

Fiat currency. See Supported Currencies

token

string

Yes

Cryptocurrency to receive. See Supported Networks & Tokens

blockchain

string

Yes

Blockchain network. See Supported Blockchains

Example request

curl -X POST https://ramp-api.ivorypay.io/api/v1/exchange-rates/onramp \
  -H "Authorization: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "fiatAmount": 50000,
    "businessFeeInFiat": 0,
    "fiatCurrency": "NGN",
    "token": "USDT",
    "blockchain": "BSC_MAINNET"
  }'

Example response

Response fields

Field
Type
Description

platformFeeInFiat

number

IvoryPay's platform fee in fiat

platformFeeInCrypto

number

IvoryPay's platform fee in crypto

businessFeeInFiat

number

Your business fee in fiat

businessFeeInCrypto

number

Your business fee in crypto

gasFee

number

Estimated gas fee in crypto

fiatRate

number

Fiat units per 1 crypto token

cryptoRate

number

Crypto rate used for conversion

fiatAmountPayable

number

Total fiat amount the customer pays (including fees)

cryptoAmount

number

Gross crypto amount before fees

cryptoAmountLessFee

number

Net crypto amount the customer receives

fiatCurrency

string

Fiat currency code

token

string

Cryptocurrency token

blockchain

string

Blockchain network

Last updated