> ## 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"}}`.

# Developer resources

> One page of links: the in-browser API reference and playground, OpenAPI spec downloads, and Postman import for both Bitnob APIs.

Everything on this page is a link out to a tool, a spec, or a playground. The API reference tabs on this site are generated from the same OpenAPI specs you can download below, so the reference is always the live, browsable preview of the spec.

## Explore the API in your browser

No downloads needed. The reference tabs render every endpoint, schema, and error shape from the spec, and each endpoint page has a built-in playground: add your credentials and send real requests against sandbox.

> [card] [API v2 reference and playground](https://www.bitnob.dev/api-reference/authentication/authentication.md)
>
> Payouts, trading, cards, lightning, virtual accounts, and more. Uses HMAC request signing.

> [card] [Enterprise API reference and playground](https://www.bitnob.dev/api-reference/platform/meta/get-api-key-info.md)
>
> Non-custodial wallets, transactions, gas stations, and subscriptions. Uses `X-API-Key` auth.

## Download the OpenAPI specs

The API v2 spec is OpenAPI 3.1 and the Enterprise API spec is OpenAPI 3.0. Both are served publicly with no authentication. JSON is best for code generators; YAML is easier to read and diff.

> [card] [bitnob-api-v2.openapi.json](https://www.bitnob.dev/api-collections/swagger/bitnob-api-v2.openapi.json)
>
> API v2 spec in JSON, for openapi-generator, Prism, Spectral, or Stoplight.

> [card] [bitnob-api-v2.openapi.yaml](https://www.bitnob.dev/api-collections/swagger/bitnob-api-v2.openapi.yaml)
>
> The same v2 spec in YAML, for review and pull-request diffs.

> [card] [bitnob-platform.openapi.json](https://www.bitnob.dev/api-collections/swagger/bitnob-platform.openapi.json)
>
> Enterprise API spec in JSON.

> [card] [bitnob-platform.openapi.yaml](https://www.bitnob.dev/api-collections/swagger/bitnob-platform.openapi.yaml)
>
> Enterprise API spec in YAML.

Or pull them straight from the command line:

```bash theme={null}
curl -O https://bitnob.dev/api-collections/swagger/bitnob-api-v2.openapi.json
curl -O https://bitnob.dev/api-collections/swagger/bitnob-platform.openapi.json
```

If you want the classic Swagger view instead, download a spec and drag it into [Swagger Editor](https://editor-next.swagger.io). The editor cannot fetch the hosted URL directly from the browser, but a downloaded file drops straight in.

## Import into Postman

Download a ready-made collection and its environment, then drag both into Postman. The API v2 collection ships with a pre-request script that computes the HMAC-SHA256 signature (`X-Auth-Client`, `X-Auth-Timestamp`, `X-Auth-Nonce`, `X-Auth-Signature`) on every request: fill in `client_id` and `client_secret` in the environment and send.

> [card] [API v2 collection](https://www.bitnob.dev/api-collections/postman/bitnob_api.postman_collection.json)
>
> Every v2 endpoint, with request signing handled by a collection pre-request script.

> [card] [API v2 environment](https://www.bitnob.dev/api-collections/postman/bitnob_environment.postman_environment.json)
>
> Base URL plus empty `client_id` and `client_secret` variables to fill in.

> [card] [Enterprise API collection](https://www.bitnob.dev/api-collections/postman/bitnob_platform.postman_collection.json)
>
> Every Enterprise API endpoint. No signing script needed.

> [card] [Enterprise API environment](https://www.bitnob.dev/api-collections/postman/bitnob_platform.postman_environment.json)
>
> Base URL plus an empty `api_key` variable that fills the `X-API-Key` header.

> [!NOTE]
>
> If you prefer to build your own collection, Postman also imports the OpenAPI specs by URL: **Import** → paste a spec URL from above. A raw spec import does not include the signing script, so add one yourself; see [Authentication](https://www.bitnob.dev/api-reference/authentication/authentication.md) for the exact algorithm.

## Generate a typed client

Feed either spec to [openapi-generator](https://openapi-generator.tech) to produce a client in 40+ languages:

```bash theme={null}
openapi-generator-cli generate \
  -i https://bitnob.dev/api-collections/swagger/bitnob-api-v2.openapi.json \
  -g typescript-fetch \
  -o ./bitnob-client
```

Commit the spec to your repo so upgrades are a one-line bump, and run [oasdiff](https://github.com/Tufin/oasdiff) between versions to see exactly which endpoints, schemas, and enums changed.

## Getting help

> [card] [Support center](https://support.bitnob.com)
>
> Guides and answers from the support team.

> [card] [Dashboard](https://app.bitnob.com)
>
> Create and manage your API credentials.


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