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

Use API for programmatic integrations.

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 only

Required when type is CRYPTO. The blockchain network. See chains.

reference

string

Yes

A UUID you supply for idempotency and reconciliation.

metadata

string

No

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

chain is not required for FIAT payments and will be ignored if provided.


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


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.


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 a different amount than expected

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.


Integration Flow

CRYPTO

FIAT


Code Examples

Node.js — FIAT

Node.js — CRYPTO

cURL — FIAT

cURL — CRYPTO

Last updated