> ## Documentation Index
> Fetch the complete documentation index at: https://www.bitnob.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Bitnob has two APIs. The Business API (payouts, cards, trading, virtual accounts, stablecoin and bitcoin transfers) is at https://api.bitnob.com. The Enterprise API (non-custodial wallets) is at https://api.platform.bitnob.com.
> Business API auth: sign every request with HMAC-SHA256 and send four headers: `X-Auth-Client` (your client ID), `X-Auth-Timestamp` (Unix seconds), `X-Auth-Nonce` (16 random bytes, hex), and `X-Auth-Signature`, the hex HMAC-SHA256 of `CLIENT_ID:TIMESTAMP:NONCE:BODY` keyed with your client secret. BODY is the exact request body string you send, or an empty string. A missing header, a bad signature, or a timestamp more than about 5 minutes off returns `401`.
> Enterprise API auth: send your key in the `X-API-Key` header. Write requests such as creating a transaction also need an `Idempotency-Key` header, or they fail with `idempotency_key_required` before anything happens.
> Sandbox and production share the Business API base URL. The credentials you sign with select the environment, and `GET /api/whoami` returns it in `data.environment`. Use sandbox credentials in sample code and tests, and never put live credentials in code.
> Amounts are strings unless stated otherwise. Never parse them into floats. Balances, transactions, withdrawals (`POST /api/withdrawals`) and virtual accounts use integer strings in the smallest unit: satoshis for BTC, 6 decimals for USDT and USDC, kobo for NGN, and cents for KES and UGX (100 is 1 KES or 1 UGX). A mobile money collection takes `amount` as a JSON integer in cents.
> Payouts and trading use decimal strings in major units: a payout quote `amount` of `"1"` is 1 USDT, and a trading `quantity` of `"0.0001"` is 0.0001 BTC. Payout responses also carry `cent_amount`, the settlement amount in minor units.
> Card amounts are micro-units (1 USD = 1,000,000). Send them as JSON integers. Card responses return them as integer strings, and card webhooks as integers.
> Generate a unique `reference` for each money movement before the first attempt, and reuse it on retries. A reused reference returns `409` on payout quotes (`ALREADY_EXISTS`), withdrawals (`DUPLICATE_KEY_ERROR`) and card creation (`ALREADY_EXISTS`). It returns the existing record on NGN-pair trading orders, NGN virtual accounts and active mobile money collections. On a mobile money collection that has closed or failed it returns `409` `DUPLICATE_REFERENCE`. It isn't checked on crypto-pair trading orders, so look the order up with `GET /api/trading/orders/{reference}` before resending.
> Quotes expire at `expires_at`; read it from the response instead of assuming a window. An expired trading quote returns `422` `PRECONDITION_FAILED`, and an expired payout quote returns `400` `VALIDATION_ERROR`. Create a new quote rather than retrying. A payout quote can be initialized once, and a trading quote is consumed by the order that fills it.
> Webhooks: verify the `x-bitnob-signature` header, the hex HMAC-SHA512 of the raw request body keyed with your webhook secret, before parsing JSON. Compare in constant time and de-duplicate on `event_id`. A successful API response means accepted: confirm the outcome from the webhook, such as `payouts.withdrawal.success`.
> Errors return `status`, `code` and `detail`. Branch on `code`, never on `detail`. Since the November 5, 2026 response format change, each company gets either the current or the new error codes until its cutoff date, so handle both: `PROVIDER_ERROR` or `PROCESSING_ERROR`, and `BVN_PROVIDER_UNAVAILABLE` or `BVN_VERIFICATION_UNAVAILABLE`. A body that fails to parse returns `{"error": {"code": "BAD_REQUEST"}}`.

# Payout glossary

> Definitions for quote, trip, beneficiary, settlement models, and the other terms used throughout the Payouts API and its webhooks.

| Term | Definition |
| - | - |
| Quote | A temporary, binding price for a specific payout: funding amount, destination amount, FX rate, and an `expires_at` timestamp. Created with [Create quote](https://www.bitnob.dev/api-reference/payouts/create-quote.md). |
| Quote ID | The identifier for a quote. Passed to the initialize and finalize calls. |
| Reference | A unique identifier you generate per payout, used for idempotency and to find the payout in your own records. |
| Beneficiary | The recipient of a payout: the person or business whose bank account or wallet receives the funds. Attached at [Initialize payout](https://www.bitnob.dev/api-reference/payouts/initialize-payout.md). |
| Funding address | The blockchain address or Lightning invoice returned by initialize for onchain payouts. Paying it funds the payout. |
| Funding window | The period between quote creation and `expires_at`, during which funding must arrive. |
| Payment asset | The asset funding a payout: BTC (on-chain or Lightning), USDT, USDC, or NGN (from your balance only). |
| Payout status | The record's lifecycle state: `QUOTE`, `INITIATED`, `PENDING_ADDRESS_DEPOSIT`, `PENDING`, `PROCESSING`, `SUCCESS`, `FAILED`, or `EXPIRED`. `SUCCESS` is the only success state. See [Statuses and webhook events](https://www.bitnob.dev/docs/payouts/statuses-and-webhook-events.md). |
| Payout ID | The UUID Bitnob assigns to a payout, returned as `id`. Pass it to [Get payout](https://www.bitnob.dev/api-reference/payouts/get-payout.md) to read the current status and trip timeline. Track a payout by this `id`. |
| Trip | The object of milestone timestamps on a payout: `quote_at`, `initialized_at`, `asset_received`, `processing_start`, and `completion_time`, filled in as the payout progresses. It holds timestamps only and has no ID of its own. See [The Trip timeline](https://www.bitnob.dev/docs/payouts/understanding-trip-timeline.md). |
| Completion time | The Trip field set when a payout reaches a terminal state: success, failure, or expiry. |
| Time to finish | The time between `quote_at` and `completion_time` on the Trip. |
| Settlement | Delivery of fiat funds to the beneficiary's account. |
| Settlement failure | A funded payout that could not be delivered: invalid account, bank rejection, or compliance block. |
| Wallet-funded settlement | The model where payouts debit a pre-funded Bitnob balance. See [How payouts settle](https://www.bitnob.dev/docs/payouts/settlement-models.md). |
| On-the-fly settlement | The model where each payout is funded individually by paying its funding address. |
| Underpayment | Funding that arrives short of the quoted amount. The payout refuses the deposit, except for a shortfall of up to 0.0001 on stablecoins. Bitcoin has no tolerance. The funds stay in your Bitnob balance. |
| Overpayment | Funding that exceeds the quoted amount. The excess is credited to your balance. |
| Expiry | A quote or funding window lapsing before payment arrives, canceling the payout attempt. |
| API key | Your `CLIENT_ID` and `CLIENT_SECRET`. The `CLIENT_ID` is the same in sandbox and production. The `CLIENT_SECRET` is issued per environment and decides which one a request runs against. See [Authentication](https://www.bitnob.dev/api-reference/authentication/authentication.md). |
| Request signature | The HMAC-SHA256 signature sent with every request, keyed with your `CLIENT_SECRET`. Bitnob authenticates with signed headers, not a bearer token. |
| Callback URL | The URL where Bitnob delivers webhook events for a payout, set at initialize. |
| Webhook | An event notification delivered to your server. Payouts emit five: see [Receive payout webhooks](https://www.bitnob.dev/docs/payouts/webhook-payout.md). |
| Corridor | A destination country and its rails, requirements, and behavior. See [Corridor behavior](https://www.bitnob.dev/docs/payouts/corridor-specific-behavior.md). |
| Settlement window | The expected time for the fiat leg once processing starts, set by the corridor's rail. |
| Sandbox | The simulated environment for testing payout flows without moving real money. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.