/payments path of the API.
Payment flow overview
Onramps
An onramp is the API term for a virtual bank account used to receive NGN. When a customer pays into an onramp, Dubu Pay automatically converts the NGN to USDT and records the result as a deposit. See NGN virtual bank accounts for the full breakdown of temporary vs permanent accounts.Deposits
A deposit is created automatically when a customer pays into a virtual account. You do not create deposits directly — you retrieve and monitor them. Each deposit has atype of either NGN_DEPOSIT or CRYPTO_DEPOSIT, and moves through a status lifecycle until it either settles or fails.
Deposit status lifecycle:
Virtual account deposits expose fine-grained processing states (
PENDING_FX, PENDING_WITHDRAWAL, SETTLED) on the deposit record itself. The GET /payments/deposits list endpoint uses the higher-level status values shown above. Use webhooks to receive real-time status transitions.type, onramp_id, offramp_id, status, and date range (from / to as ISO 8601 timestamps).
Withdrawals
A withdrawal moves USDT from your merchant balance to an external blockchain address. You specify the amount, token, chain, and destination address.APTOS, BASE, CELO, ETHEREUM, POLYGON, SOLANA, TRON.
Offramps
An offramp accepts USDT and converts it back to NGN, either crediting your internal balance or sending the NGN directly to a Nigerian bank account. You choose the settlement mode when creating the offramp.type is either TEMPORARY (expires) or PERMANENT (no expiry). You can filter listed offramps by type, chain, asset, status, and settlement_mode.
Transfers
A transfer moves funds to a bank account. Dubu Pay supports three destination types depending on the currency and recipient:
Each transfer requires a unique
reference string you provide for idempotency. You can optionally associate a transfer with a customer using on_behalf_of.customer_id.
PROCESSING, SETTLED, and FAILED.
Merchant balance
Your merchant balance is the aggregated USDT held across all settled deposits, minus withdrawals and transfers. You can retrieve it at any time, transfer a portion of it to the trading engine, or list all past balance transfers.Exchange rates
Before creating a temporary onramp or an NGN_PAYOUT offramp, you need arate_id. Fetch the current NGN-to-USDT and NGN-to-USDC exchange rates from:
rate_id you pass when creating a temporary onramp or NGN_PAYOUT offramp. Rates are time-limited — fetch a fresh rate close to the moment you create the account.
For temporary onramps, the rate is locked at creation time. For permanent onramps, the live rate at the moment of each deposit is used. Always fetch the latest rate immediately before creating a temporary account to give your customer the most accurate amount.
Sandbox testing
In test mode, incoming deposits will not occur automatically. Use the sandbox endpoint to simulate an NGN deposit against any existing onramp:should_flag: true to simulate a flagged deposit and test your compliance handling logic.