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/onrampAuthentication
Requires a Merchant API key in the Authorization header.
Authorization: <api_key>Request body
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
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"
}'const response = await fetch("https://ramp-api.ivorypay.io/api/v1/exchange-rates/onramp", {
method: "POST",
headers: {
"Authorization": "your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
fiatAmount: 50000,
businessFeeInFiat: 0,
fiatCurrency: "NGN",
token: "USDT",
blockchain: "BSC_MAINNET",
}),
});
const data = await response.json();
console.log(data);Example response
Response fields
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