Overview
The goal of this Quickstart is to get you from zero to a working API call as fast as possible. By the end, you’ll be able to:
Sign up for a Bitnob account.
Generate your API key.
Call a test endpoint to confirm your setup.
1. Base URLs
Bitnob provides two environments with distinct base URLs:
Environment | Base URL | Usage |
---|---|---|
Sandbox | https://sandboxapi.bitnob.co | Testing and development; no real funds moved |
Production | https://api.bitnob.co | Live transactions once you’re ready to go live |
2. Obtain Your API Key
Create or log into your Bitnob account.
Navigate to Developer → API Credentials in the Dashboard.
Generate a new set of keys for each environment (sandbox and production).
Store your clientId and secret securely—do not commit them to version control.
3. Confirm Your Setup
Before you send real payments, verify that your credentials and network access are correct:
If you see an authentication error, revisit the signing steps in the Authentication section.
4. Send a USDT Payout
Now that your setup is verified, let’s send 50 USDT to an on-chain address in sandbox.
4.1 Prepare the Request
Field | Example | Description |
---|---|---|
asset | "USDT" | The stablecoin to send |
amount | 50.0 | Amount in whole units |
destination | { type: "onchain", address: "0xAbC..." } | Where to send funds |
reference | "order_0001" | Your internal ID for reconciliation |
4.2 Generate Authentication Headers
1. Capture values:
CLIENT_ID="<SANDBOX_CLIENT_ID>"
SECRET="<SANDBOX_SECRET>"
TIMESTAMP=$(date +%s%3N)
NONCE=$(uuidgen)
BODY=$(< body.json)
METHOD="POST"
PATH="/v1/payouts"
2. Build the signing string (no separators):
SIGNING_STRING="${CLIENT_ID}${METHOD}${PATH}${TIMESTAMP}${BODY}"
3. Compute the HMAC-SHA256 and Base64-encode:
SIGNATURE=$(printf '%s' "$SIGNING_STRING" \
| openssl dgst -binary -sha256 -hmac "$SECRET" \
| openssl base64)
4.3 Execute the Request
4.4 Interpret the Response
A successful HTTP 202 response returns:
id: your payout identifier
status: pending → fund dispatch in progress
createdAt: timestamp in ISO 8601
You can retrieve status updates via the /v1/payouts/{id} endpoint or subscribe to webhooks.
5. Next Steps
Polling: Retrieve payout status programmatically.
Webhooks: Configure real-time notifications for completed or failed events.
Error Handling: Refer to the Authentication and Errors sections for guidance on 401/403/429.
Production Rollout: Once tested, swap to your production base URL and credentials.
That’s it—one Quickstart, one request, one stablecoin payment. Welcome aboard!