On-Ramp: Fiat → Crypto
Step-by-step guide to integrating fiat-to-crypto on-ramp transactions.
The on-ramp flow lets your users pay with local fiat currency and receive cryptocurrency in their wallet. Ivorypay handles the payment collection, conversion, and crypto payout automatically.
How it works
1. Your server calls POST /v1/onramp with user and transaction details
2. Ivorypay returns payment instructions for the selected method
3. The user transfers fiat or authorizes the bank/mobile-money payment
4. Ivorypay detects the payment → webhook: onramp.fiatPaymentReceived
5. Ivorypay converts fiat to crypto and sends it to the wallet address
6. Transaction completes → webhook: onramp.success (or onramp.failed)Mobile money support
For mobile-money currencies (for example, UGX and KES), the customer authorizes the payment through their mobile money account instead of transferring to a virtual bank account. When transferDetails.paymentInstructions is present, display its ordered steps (currently English) for that payment. The customer follows them on the paying phone and enters their PIN only in the mobile money menu. Some networks send an automatic prompt; others require the customer to open the network's USSD menu. Use the returned instructions rather than hard-coding a network's steps. Confirm the final outcome through transaction status and webhooks.
ZAR bank payments
For ZAR, use Capitec Pay or EFT with your own interface or Ivorypay hosted checkout. Both require customer bank authorization; ZAR does not return a virtual account.
Integration steps
Create the on-ramp transaction
Choose between two initiation methods:
POST /v1/onramp
You're creating a new customer and transaction in one call
POST /v1/onramp/initiate
The customer already exists in your Ivorypay account
Example: Initiate with customer creation
curl -X POST https://ramp-api.ivorypay.io/api/v1/onramp \
-H "Authorization: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"firstName": "Amina",
"lastName": "Okafor",
"email": "amina@example.com",
"phoneNumber": "+2348012345678",
"walletAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD68",
"blockchain": "BSC_MAINNET",
"reference": "550e8400-e29b-41d4-a716-446655440000",
"token": "USDT",
"fiatCurrency": "NGN",
"fiatAmount": 50000
}'Response
The endpoint returns HTTP 201 with the standard envelope.
{
"success": true,
"message": "Query successful",
"data": {
"firstName": "Amina",
"lastName": "Okafor",
"email": "amina@example.com",
"refCode": "abc123def4",
"reference": "550e8400-e29b-41d4-a716-446655440000",
"transferDetails": {
"accountName": "Ivorypay - Amina Okafor",
"accountNumber": "1234567890",
"bank": "Providus Bank",
"amountPayable": 50000,
"expiresAt": "2026-03-26T13:00:00.000Z",
"currency": "NGN",
"businessFee": 0,
"platformFee": 250,
"gasFee": 0.5,
"createdAt": "2026-03-26T12:00:00.000Z",
"checkoutUrl": null,
"cryptoAmount": 31.25
}
}
}Collect payment from your user
Use the returned transferDetails for the selected payment method:
ZAR with your own interface: show a Continue to bank button that opens
nextAction.urlunchanged. See ZAR bank payments.Virtual account: display
accountNumber,bank, and the exactamountPayablein your interface.Mobile money: follow the returned approval instructions; the customer may receive a prompt on their phone.
Full Ivorypay checkout: use the hosted checkout initiation flow and open its
data.checkoutUrl.
Listen for webhooks
Set up a webhook endpoint to receive real-time updates:
onramp.fiatPaymentReceived
User's fiat payment has been detected and confirmed
onramp.cryptoPayoutProcessing
Crypto is being sent to the user's wallet
onramp.success
Crypto has been delivered: transaction complete
onramp.failed
Something went wrong: check failedReason
Example webhook payload: onramp.success
{
"event": "onramp.success",
"data": {
"reference": "550e8400-e29b-41d4-a716-446655440000",
"amount": 31.25,
"platformFeeInCrypto": 0.15,
"businessFeeInCrypto": 0,
"gasFee": 0.5,
"walletAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD68",
"network": "BSC_MAINNET",
"token": "USDT",
"transactionHash": "0xabc123...",
"status": "SUCCESS",
"customer": {
"refCode": "abc123def4",
"userId": "9b1a3f8a-1c2d-4e5f-9012-abcdef123456",
"email": "amina@example.com",
"firstName": "Amina",
"lastName": "Okafor",
"context": "LIVE",
"createdAt": "2026-03-26T11:55:00.000Z",
"createdAtDateOnly": "2026-03-26"
}
}
}Specifying amounts and fees
You can specify the transaction amount in either fiat or crypto (not both):
User wants to spend 50,000 NGN
"fiatAmount": 50000
User wants to receive exactly 30 USDT
"cryptoAmount": 30
Business fees must be supplied in the same denomination as the amount. There are two valid patterns:
Fiat-denominated
fiatAmount
businessFeeInFiat
Crypto-denominated
cryptoAmount
businessFeeInCrypto
Minimum amounts
Before initiating, check the minimum on-ramp amount for a currency:
Transaction lifecycle
Frequently asked questions
Last updated