Initiate On-Ramp Checkout
Create a hosted on-ramp checkout session and get a redirect URL.
Creates a PENDING on-ramp transaction and returns a hosted checkout URL. You call this from your backend, then redirect your customer to the returned checkoutUrl. The hosted checkout collects the rest, runs KYC, and provisions the payment details.
Use this when you want IvoryPay to host the payment experience. For a single server-to-server call that returns the virtual account directly, use Initiate On-Ramp instead. For the full lifecycle, see the Hosted Checkout guide.
Endpoint
POST /v1/onramp/checkout/initiateAuthentication
Protected by HybridHTTPAuthGuard — accepts either credential in the Authorization header:
Merchant API key
Authorization: <api_key>
Server-to-server (recommended)
Business-user JWT
Authorization: Bearer <jwt>
Authenticated dashboard/business user
Request body
The customer must already exist in IvoryPay (resolved by email). To create a customer inline, use Initiate On-Ramp (with Customer).
email
string
Yes
Customer's email address. Must match an existing customer.
walletAddress
string
Yes
Destination crypto wallet address. The customer can override this at checkout.
reference
string (UUID)
Yes
Your unique reference for this transaction. Must be a UUID.
fiatCurrency
string
Yes
Fiat currency the customer pays in. Determines the payment rail. See Supported Currencies
fiatAmount
number
No*
Amount in fiat the customer will pay
cryptoAmount
number
No*
Amount in crypto the customer will receive
businessFeeInFiat
number
No
Your fee in fiat. Omit or send 0 if not charging a fee
businessFeeInCrypto
number
No
Your fee in crypto (alternative to businessFeeInFiat)
phoneNumber
string
No
Customer phone (E.164). Required later at confirm for mobile-money currencies if the customer has none on file
redirectUrl
string
No
URL to send the customer to after they complete payment
note
string
No
Optional note attached to the transaction
* Provide either fiatAmount or cryptoAmount, not both.
Payment rail note
You don't pass the rail — it's derived from fiatCurrency:
NGN/ZAR/USD→ bank transfer. At checkout the customer receives a virtual account to pay into.UGX,GHS,KES, … → mobile money. The customer pays from their mobile-money wallet; a phone number is required at confirm.
See Payment method types.
Example request
Example response
Returns 201 Created.
Response fields
reference
string
Your transaction reference (echoed back)
checkoutUrl
string
Hosted checkout page — redirect your customer here
status
string
Always PENDING at this stage
Idempotency
Retrying with the same reference while the transaction is still PENDING returns the same checkoutUrl and status. Once it has moved past PENDING, the same reference returns 409 DUPLICATE_TRANSACTION.
Errors
404 CUSTOMER_NOT_FOUND
email doesn't match a customer — use Initiate On-Ramp (with Customer)
403 CUSTOMER_KYC_REQUIRED
Customer hasn't completed required KYC
409 DUPLICATE_TRANSACTION
reference already used past PENDING — generate a new UUID
400
fiatAmount and cryptoAmount both set (or both missing), or amount outside allowed limits
Next step
The hosted checkout calls Confirm On-Ramp Checkout on the customer's behalf. You're notified of the outcome via webhooks.
Last updated