For the complete documentation index, see llms.txt. This page is also available as Markdown.

Accept Payment

Use this endpoint to generate a payment request — a record your customer pays against. IvoryPay supports two payment channels:

  • CRYPTO — customer sends cryptocurrency to a blockchain address

  • FIAT — customer makes a bank transfer to a collection account

Base path: /v1/transactions Authentication: API Key (Authorization: <secret-key>)


Endpoints

Method
Path
Auth
Description

POST

/v1/transactions

API Key

Create a payment collection request

GET

/v1/transactions/:reference/verify

Public

Verify payment status by reference


POST /v1/transactions

Creates a new incoming payment request. The type field determines whether IvoryPay returns a crypto address or a bank account for the customer to pay into.

Request

Headers

Authorization: <your-secret-api-key>
Content-Type: application/json

Body Parameters

Field
Type
Required
Description

amount

number

Yes

Amount in the baseFiat currency. Must be >= 0.

email

string

Yes

Customer's email address. Used for notifications.

firstName

string

No

Customer's first name.

lastName

string

No

Customer's last name.

type

string

Yes

Payment channel — CRYPTO or FIAT.

mode

string

Yes

Integration mode — API for programmatic integrations, CHECKOUT to use the IvoryPay hosted checkout page.

baseFiat

string

Yes

The fiat currency amount is expressed in. See supported currencies.

crypto

string

Yes

Crypto token associated with the payment. See supported tokens.

chain

string

CRYPTO (API mode only)

Required when type is CRYPTO and mode is API. Not required in CHECKOUT mode. See chains.

reference

string

Yes

A UUID you supply for idempotency and reconciliation.

redirect_url

string

No

A URL the customer is redirected to after a successful payment. Only used in CHECKOUT mode.

metadata

string

No

Any JSON string stored on the transaction. Returned as-is in webhooks.

chain is not required for FIAT payments or when mode is CHECKOUT.


CRYPTO Payment

The customer sends cryptocurrency directly to a blockchain address.

Request

Response

What to do with the response:

  • Display collectionDetails.address as the wallet address your customer sends funds to

  • Display amountInCrypto as the exact amount they must send (fee already included)

  • platformFeeInCrypto is IvoryPay's fee included in amountInCrypto

  • Payment window expires at expiresAt (validityPeriod = 600 seconds) — display a countdown timer

  • Store reference for order reconciliation and webhook matching

CRYPTO Payment Mismatches and Refunds

For crypto collections, the customer should send the exact amountInCrypto in the selected currency/token to the returned wallet address.

Scenario
Outcome

Underpayment

The transaction fails and the received funds are refunded to the customer.

Overpayment

The transaction succeeds and the excess amount is refunded to the customer.

Token mismatch

The transaction fails and the received funds are refunded to the customer.


FIAT Payment

IvoryPay assigns a virtual bank account your customer pays into via bank transfer. The payment is then settled in the configured crypto token.

Request

Response

What to do with the response:

  • Display collectionDetails.bankName, collectionDetails.accountNumber, and collectionDetails.accountName to your customer

  • Display amountInFiat as the exact amount they must transfer (match this to the kobo/cent)

  • The payment window is validityPeriod seconds (600 = 10 minutes) — display a countdown timer

  • Store reference for reconciliation; listen to webhooks for settlement confirmation

The customer must transfer exactly amountInFiat in fiatCurrency. Sending a different amount may cause a mismatch.


CHECKOUT Mode

Use mode: CHECKOUT to redirect your customer to the IvoryPay hosted checkout page instead of building your own payment UI. IvoryPay handles the payment flow — your customer selects the payment type, completes the payment, and is redirected back to your site.

  • chain is not required — the customer selects a network on the checkout page

  • redirect_url is optional — if provided, the customer is redirected there after a successful payment with the reference appended as a query parameter

Request

Response

Redirect your customer to checkoutUrl. After a successful payment, they will be sent to:

You can then call GET /v1/transactions/:reference/verify server-side to confirm the payment before fulfilling the order.


CRYPTO vs FIAT — Response Comparison

Field
CRYPTO
FIAT

channel

"CRYPTO"

"FIAT"

collectionDetails.address

Blockchain wallet address to send funds to

collectionDetails.network

Blockchain network (e.g. BSC_MAINNET)

collectionDetails.accountName

Beneficiary account name

collectionDetails.accountNumber

Beneficiary account number

collectionDetails.bankName

Beneficiary bank name

amountInCrypto

Exact crypto amount to send (fee included)

platformFeeInCrypto

IvoryPay's fee included in amountInCrypto

amountInFiat

Fiat equivalent of the crypto amount

Exact bank transfer amount

fiatCurrency

Fiat currency of amountInFiat

Currency of bank transfer (NGN, etc.)

platformFeeInFiat

IvoryPay's fee included in amountInFiat

validityPeriod

Seconds until payment window closes (600)

Seconds until payment window closes (600)

expiresAt

ISO timestamp when the payment window closes


Error Responses

Status
Message
Cause

400

amount must not be less than 0

Negative amount

400

email must be an email

Invalid email format

400

type must be one of FIAT, CRYPTO

Invalid type value

400

network chain must be one of ...

Invalid or missing chain for CRYPTO

401

Unauthorized

Missing or invalid API key


GET /v1/transactions/:reference/verify

Verifies the current payment status of a transaction by reference. This endpoint is public — no API key required. Use it from your frontend or backend to confirm a customer payment.

Request

Path Parameters

Parameter
Type
Description

reference

string

Transaction reference string

Example

Response


Supported Values

baseFiat

Value
Currency

NGN

Nigerian Naira

USD

US Dollar

crypto (token)

Value
Name

USDT

Tether USD

USDC

USD Coin

chain (network)

Required for CRYPTO payments only.

Value
Network Name
Standard

BSC_MAINNET

Binance Smart Chain (BNB Chain)

BEP-20

POLYGON

Polygon (Matic Network)

ERC-20


Transaction Lifecycle

Status
Description

PENDING

Transaction created, waiting for the customer to pay

PROCESSING

Payment detected, being processed

CONFIRMING

Awaiting sufficient confirmations

SUCCESS

Payment confirmed, funds credited to your wallet

MISMATCH

Customer sent less than expected or sent the wrong token

EXPIRED

Payment window closed with no payment received

FAILED

Transaction failed

For FIAT payments, the validityPeriod (600 seconds) defines how long the bank account assignment remains active. Expired transactions are not retried — create a new transaction instead. For CRYPTO payments, underpayments and token mismatches fail and are refunded to the customer. Overpayments succeed, and only the excess amount is refunded.


Integration Flow

CRYPTO

FIAT


Code Examples

Node.js — FIAT

Node.js — CRYPTO

cURL — FIAT

cURL — CRYPTO

Last updated