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/offramp

Authentication

This endpoint accepts any one of three credentials in the Authorization header:

Credential
Header value

Merchant API key

Authorization: <api_key>

Business-user JWT

Authorization: Bearer <jwt>

Customer JWT

Authorization: Bearer <jwt>

Request body

Field
Type
Required
Description

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

fiatCurrency

string

Yes

Fiat currency for payout. See Supported Currencies

blockchain

string

Yes

Blockchain network. See Supported Blockchains

reference

string

Yes

Your unique reference for this transaction. Validated as a string only (UUID not required on this variant)

token

string

Yes

Cryptocurrency the user will send. See Supported Networks & Tokens

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

Example request

Example response

Returns HTTP 201 Created.

Response fields

Field
Type
Description

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

  • offramp.cryptoPaymentReceived — Crypto deposit detected on-chain

  • offramp.success — Fiat payout sent to bank or mobile money wallet

  • offramp.failed — Transaction failed

  • offramp.declined — Transaction declined

Error cases

Error code
Description

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