Initiate On-Ramp (with Customer)
Create a new customer and initiate an on-ramp transaction in a single call.
Creates a new customer record (or retrieves an existing one by email) and initiates a fiat-to-crypto on-ramp transaction.
Endpoint
POST /v1/onrampAuthentication
This endpoint is protected by the HybridCheckoutHTTPAuthGuard, which accepts any of the following credential types in the Authorization header:
Merchant API key
Authorization: <api_key>
Server-to-server calls from your backend
Business-user JWT
Authorization: Bearer <jwt>
Calls made by an authenticated dashboard/business user
Customer JWT
Authorization: Bearer <jwt>
Calls made by an authenticated end-customer
Request body
firstName
string
Yes
Customer's first name (min 1 character)
lastName
string
Yes
Customer's last name (min 1 character)
email
string
Yes
Customer's email address
phoneNumber
string
No
Customer's phone number (E.164 format)
walletAddress
string
Yes
Destination crypto wallet address
reference
string
Yes
Your unique reference for this transaction
fiatAmount
number
No*
Amount in fiat the user will pay
cryptoAmount
number
No*
Amount in crypto the user will receive
businessFeeInFiat
number
No
Your business fee in fiat. Omit or send 0 if you are not charging a fee
redirectUrl
string
No
URL to redirect user after checkout payment
note
string
No
Optional note attached to the transaction
* You must provide either fiatAmount or cryptoAmount, but not both.
Example request
Example response
Returns 201 Created on success.
Response fields
firstName
string
Customer's first name
lastName
string
Customer's last name
email
string
Customer's email address
refCode
string
IvoryPay's unique customer reference
reference
string
Your transaction reference
transferDetails.accountName
string | null
Virtual bank account name for payment (NGN/USD). null for ZAR and mobile-money currencies
transferDetails.accountNumber
string | null
Virtual bank account number (NGN/USD). null for ZAR and mobile-money currencies
transferDetails.bank
string | null
Bank name for the virtual account (NGN/USD). null for ZAR and mobile-money currencies
transferDetails.amountPayable
number
Exact fiat amount the user must pay
transferDetails.expiresAt
string
ISO 8601 expiry time for the payment session
transferDetails.currency
string
Fiat currency
transferDetails.businessFee
number
Your business fee
transferDetails.platformFee
number
IvoryPay platform fee
transferDetails.gasFee
number
Blockchain gas fee
transferDetails.createdAt
string
ISO 8601 creation timestamp
transferDetails.checkoutUrl
string | null
Hosted checkout page URL. Populated for ZAR (redirect the customer here) and mobile-money currencies; null for NGN/USD
transferDetails.cryptoAmount
number
Crypto amount the user will receive
transferDetails.status
string
Transaction status (only present on subsequent status lookups)
Related webhooks
onramp.fiatPaymentReceived— Fiat payment confirmedonramp.cryptoPayoutProcessing— Crypto payout in progressonramp.success— Transaction completedonramp.failed— Transaction failed
Last updated