Initiate Off-Ramp (with Customer)
Create a new customer and initiate a crypto-to-fiat off-ramp transaction.
Creates a new customer record (or retrieves an existing one by email) and initiates a crypto-to-fiat off-ramp transaction. The user will send crypto and receive fiat in their bank account or mobile money wallet.
Endpoint
POST /v1/offrampAuthentication
This endpoint accepts any one of three credentials in the Authorization header:
Merchant API key
Authorization: <api_key>
Business-user JWT
Authorization: Bearer <jwt>
Customer JWT
Authorization: Bearer <jwt>
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)
accountNumber
string
Yes
Recipient bank account number or mobile money number
bankCode
string
No
Bank code for NGN bank payouts (use List Banks to get valid codes). Not required for mobile money payouts
reference
string
Yes
Your unique reference for this transaction. Validated as a string only (UUID not required on this variant)
fiatAmount
number
No*
Fiat amount to be paid out
cryptoAmount
number
No*
Crypto amount to be sent
businessFeeInCrypto
number
No
Your business fee in crypto. Pair with cryptoAmount
businessFeeInFiat
number
No
Your business fee in fiat. Pair with fiatAmount
note
string
No
Transaction note
* Provide either fiatAmount + businessFeeInFiat OR cryptoAmount + businessFeeInCrypto. Mixing a fiat amount with a crypto fee (or vice versa) is rejected by validation.
Example request
Example response
Returns HTTP 201 Created.
Response fields
refCode
string
IvoryPay's unique customer reference
reference
string
Your transaction reference
transferDetails.token
string
Crypto token the user must send
transferDetails.blockchain
string
Blockchain network
transferDetails.amountPayable
number
Exact crypto amount the user must send
transferDetails.walletAddress
string
IvoryPay deposit address — user sends crypto here
transferDetails.fiatAmount
number
Fiat amount the user will receive
transferDetails.expiresAt
string
ISO 8601 session expiry time
transferDetails.sessionId
string
Session identifier (used for refresh)
transferDetails.duration
number
Session duration in seconds
transferDetails.businessFee
number
Your business fee
transferDetails.platformFee
number
IvoryPay platform fee
Related webhooks
offramp.cryptoPaymentReceived— Crypto deposit detected on-chainofframp.success— Fiat payout sent to bank or mobile money walletofframp.failed— Transaction failedofframp.declined— Transaction declined
Error cases
ONOFFRAMP0033
Invalid bank code
ONOFFRAMP0024
Token not enabled for your account — contact support to enable the token/blockchain pair
Sandbox behaviour
Off-ramp token access is provisioned per API key. If your sandbox key has not been enabled for a specific token/blockchain combination, you will receive ONOFFRAMP0024. Contact support with the token and network you need enabled.
Last updated