# Bitnob > Bitnob is a financial infrastructure API for bitcoin, stablecoins, and local currency rails across Africa. Guides, API reference, and courses. > ## 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"}}`. ## Home ### Home - [Bitnob documentation](https://www.bitnob.dev/index.md): One custodial API for moving money across Africa, and a non-custodial Enterprise API for holding assets yourself. Pick the product and the docs will take you there. - [Bitnob Business API vs Bitnob Enterprise API](https://www.bitnob.dev/docs/choose-a-product.md): Bitnob offers two APIs with different custody models, authentication, and base URLs. Compare them and pick the right starting point. - [About Bitnob](https://www.bitnob.dev/docs/getting-started/about.md): Bitnob's founding rationale, the problem it addresses in emerging markets, and the use cases the platform is designed around. - [Developer resources](https://www.bitnob.dev/docs/developer-resources/overview.md): One page of links: the in-browser API reference and playground, OpenAPI spec downloads, and Postman import for both Bitnob APIs. - [Docs (119 pages)](https://www.bitnob.dev/_llms/docs.txt): Bitnob Business, Bitnob Enterprise. - [Business API (111 pages)](https://www.bitnob.dev/_llms/business-api.txt): Get started, Identity, Balances, Customers, Beneficiaries, Addresses, Lightning, LNURL, Nodes, Withdrawals, Transfers, Transactions, Exchange rates, Trading, Payouts, Virtual accounts, Virtual cards. - [Enterprise API (89 pages)](https://www.bitnob.dev/_llms/enterprise-api.txt): Get started, Meta, Assets, Vaults, Wallets, Transactions, Gas stations, Sponsored transfers, Consolidation, Policies, KYT, Insights, Users, Subscriptions, Webhooks, RPC. ## Playground ### Overview - [Playground](https://www.bitnob.dev/docs/playground/overview.md): Free developer utilities that run entirely in your browser: hashing, HMAC, JSON tools, encoders, and validators. Nothing you type leaves the page. ### Hash and crypto - [HMAC generator](https://www.bitnob.dev/docs/playground/hash-crypto/hmac-generator.md): Generate and verify HMAC-SHA256 signatures in your browser, including the exact signing scheme Bitnob API v2 uses. - [SHA-256 generator](https://www.bitnob.dev/docs/playground/hash-crypto/sha256-generator.md): SHA-256 is the hash function behind Bitcoin block hashing and most integrity checks. Hash any text with SHA-256, SHA-384, SHA-512, or SHA-1 locally. - [Hash file checker](https://www.bitnob.dev/docs/playground/hash-crypto/hash-file-checker.md): File integrity verification: compute a file's SHA-256 digest in your browser and compare it against the hash a publisher gave you. - [Bitcoin address validator](https://www.bitnob.dev/docs/playground/hash-crypto/bitcoin-address-validator.md): Bitcoin address validation with checksum verification: check Base58 and bech32 addresses and see the address type and network before you send. - [UUID generator](https://www.bitnob.dev/docs/playground/hash-crypto/uuid-generator.md): UUID v4 identifiers for idempotency keys, references, and nonces, generated locally from a cryptographically secure random source. - [Random string generator](https://www.bitnob.dev/docs/playground/hash-crypto/random-string-generator.md): Cryptographically secure random strings with a configurable charset and length, for tokens, webhook secrets, and test fixtures. - [Private key generator](https://www.bitnob.dev/docs/playground/hash-crypto/private-key-generator.md): An educational secp256k1 key generator showing how a Bitcoin private key relates to its WIF encoding and public key. ### JSON tools - [JSON formatter](https://www.bitnob.dev/docs/playground/json-tools/json-formatter.md): Pretty-printing makes nested API payloads readable. Format JSON with your preferred indentation, optionally sorting keys for stable diffs. - [JSON validator](https://www.bitnob.dev/docs/playground/json-tools/json-validator.md): A single stray comma breaks a whole payload. Validate JSON syntax and get the exact line and column where parsing fails. - [JSON minifier](https://www.bitnob.dev/docs/playground/json-tools/json-minifier.md): Minification strips every byte that carries no meaning. Compare the original and minified size before sending a payload over the wire. - [JSON to CSV](https://www.bitnob.dev/docs/playground/json-tools/json-to-csv.md): Spreadsheets and bulk upload templates expect rows, not nested objects. Convert an array of JSON objects to CSV with nested fields flattened. - [JSONPath tester](https://www.bitnob.dev/docs/playground/json-tools/jsonpath-tester.md): JSONPath pulls a single value out of a deeply nested payload. Test expressions against a real webhook body before you put them in code. - [JSON diff checker](https://www.bitnob.dev/docs/playground/json-tools/json-diff-checker.md): Text diffs mislead when key order changes. Compare two JSON documents structurally and see exactly which paths were added, removed, or changed. ### Text and binary - [Base64 encoder](https://www.bitnob.dev/docs/playground/text-binary/base64-encoder.md): Base64 encoding turns bytes into ASCII-safe text. Encode UTF-8 strings, with a URL-safe variant for query parameters and JWTs. - [Base64 decoder](https://www.bitnob.dev/docs/playground/text-binary/base64-decoder.md): Base64 decoding back to readable text, accepting both standard and URL-safe input with or without padding. - [Hex encoder](https://www.bitnob.dev/docs/playground/text-binary/hex-encoder.md): Hexadecimal encoding represents each byte as two characters, the standard way to display hashes, signatures, and keys. - [Hex decoder](https://www.bitnob.dev/docs/playground/text-binary/hex-decoder.md): Hexadecimal decoding back to text, tolerant of 0x prefixes, spaces, and mixed case. - [UTF-8 encoder](https://www.bitnob.dev/docs/playground/text-binary/utf8-encoder.md): UTF-8 byte inspection: see exactly how many bytes a string occupies and where multi-byte characters fall. - [UTF-8 decoder](https://www.bitnob.dev/docs/playground/text-binary/utf8-decoder.md): UTF-8 byte sequences turned back into readable text, for debugging encoding problems in payloads and logs. - [URL encoder](https://www.bitnob.dev/docs/playground/text-binary/url-encoder.md): Percent-encoding for query parameters and URLs, including the difference between encoding a component and a whole URL. - [URL decoder](https://www.bitnob.dev/docs/playground/text-binary/url-decoder.md): Percent-decoding for query strings, redirect targets, and logged URLs, including safe handling of double-encoded values. - [ASCII binary converter](https://www.bitnob.dev/docs/playground/text-binary/ascii-binary-converter.md): Text to 8-bit binary and back, showing the bit pattern behind each character. - [ROT13 cipher](https://www.bitnob.dev/docs/playground/text-binary/rot13-cipher.md): ROT13 rotates each letter 13 places through the alphabet. Applying it twice returns the original text. - [Base32 converter](https://www.bitnob.dev/docs/playground/text-binary/base32-converter.md): RFC 4648 Base32 encoding and decoding, the alphabet used for TOTP secrets and case-insensitive identifiers. - [String byte inspector](https://www.bitnob.dev/docs/playground/text-binary/string-byte-inspector.md): Characters, Unicode code points, and UTF-8 bytes shown side by side, for debugging length limits and encoding bugs. - [Learn (105 pages)](https://www.bitnob.dev/_llms/learn.txt): Learn, Courses, Playbooks. ## Changelog - [Changelog](https://www.bitnob.dev/changelog.md): Dated entries for API changes, new products, and documentation updates. ## OpenAPI Specs - [bitnob-api-v2.openapi](/api-collections/swagger/bitnob-api-v2.openapi.json) - [bitnob-platform.openapi](/api-collections/swagger/bitnob-platform.openapi.json) - [bitnob-api-v2.openapi](/api-collections/swagger/bitnob-api-v2.openapi.yaml) - [bitnob-api-v2.requests](/api-collections/swagger/bitnob-api-v2.requests.json) - [bitnob-platform.openapi](/api-collections/swagger/bitnob-platform.openapi.yaml) > The links below point to documentation indexes. Follow each `/_llms/` index recursively until you reach documentation pages. ## Indexes - [Docs (119 pages)](https://www.bitnob.dev/_llms/docs.txt): Bitnob Business, Bitnob Enterprise. - [Business API (111 pages)](https://www.bitnob.dev/_llms/business-api.txt): Get started, Identity, Balances, Customers, Beneficiaries, Addresses, Lightning, LNURL, Nodes, Withdrawals, Transfers, Transactions, Exchange rates, Trading, Payouts, Virtual accounts, Virtual cards. - [Enterprise API (89 pages)](https://www.bitnob.dev/_llms/enterprise-api.txt): Get started, Meta, Assets, Vaults, Wallets, Transactions, Gas stations, Sponsored transfers, Consolidation, Policies, KYT, Insights, Users, Subscriptions, Webhooks, RPC. - [Learn (105 pages)](https://www.bitnob.dev/_llms/learn.txt): Learn, Courses, Playbooks. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.