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
POST
/v1/transactions
API Key
Create a payment collection request
GET
/v1/transactions/:reference/verify
Public
Verify payment status by reference
POST /v1/transactions
/v1/transactionsCreates 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/jsonBody Parameters
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.
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.
chainis 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.addressas the wallet address your customer sends funds toDisplay
amountInCryptoas the exact amount they must send (fee already included)platformFeeInCryptois IvoryPay's fee included inamountInCryptoPayment window expires at
expiresAt(validityPeriod= 600 seconds) — display a countdown timerStore
referencefor 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, andcollectionDetails.accountNameto your customerDisplay
amountInFiatas the exact amount they must transfer (match this to the kobo/cent)The payment window is
validityPeriodseconds (600 = 10 minutes) — display a countdown timerStore
referencefor reconciliation; listen to webhooks for settlement confirmation
The customer must transfer exactly
amountInFiatinfiatCurrency. Sending a different amount may cause a mismatch.
CRYPTO vs FIAT — Response Comparison
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
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
/v1/transactions/:reference/verifyVerifies 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
reference
string
Transaction reference string
Example
Response
Supported Values
baseFiat
baseFiatNGN
Nigerian Naira
USD
US Dollar
crypto (token)
crypto (token)USDT
Tether USD
USDC
USD Coin
chain (network)
chain (network)Required for CRYPTO payments only.
BSC_MAINNET
Binance Smart Chain (BNB Chain)
BEP-20
POLYGON
Polygon (Matic Network)
ERC-20
Transaction Lifecycle
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