You need to collect money in one country and pay it out in another. Building those rails yourself means partner banks, compliance reviews, and a very long build. An API gets you there faster, but only if you know what the road to production looks like.
Here's the short version. To integrate the Onboard API, apply for a business account at business.onboard.xyz/apply, get sandbox access once your KYB (Know Your Business verification) starts, build and test against sandbox with its own credentials, then switch your base URL and keys to production after you're fully approved.
This guide walks you through each step with real endpoints and code, so you know what to expect before you write a line. By the end, you'll know how to:
- Get sandbox access and tell the two environments apart
- Create credentials, whitelist IPs, and set up webhooks
- Sign your first request (the step that needs the most care)
- Set up sub-accounts, collect local currency, and pay out to bank accounts and mobile wallets
- Handle webhooks safely and go live with confidence
Everything here maps to the full reference at docs.onboard.xyz. Keep it open in another tab, because we'll point you to it along the way.
What can you build with the Onboard API?
Onboard Business is a stablecoin-backed USD account for companies that move money across borders. The API lets you receive money, hold it, and send it out, all from inside your own product. Money you collect in local currency lands in your account as USD stablecoin.
Here's what's in the toolbox:
- Virtual accounts and sub-accounts: One primary USD account, plus unlimited sub-accounts. Each sub-account has its own balance, account number, crypto deposit addresses, and activity feed. Most teams use one per customer.
- Cash deposits: Collect local currency through a single-use account number with a locked rate.
- Cash payouts: Pay out to bank accounts and mobile wallets, from your main account or any sub-account.
- Offramp accounts: A reusable stablecoin deposit address linked to a bank or mobile account. Every deposit converts and pays out automatically.
- Crypto transfers: Send and receive USDT and USDC, and save crypto beneficiaries.
- Virtual account numbers: Standing, reusable bank account numbers (unlike single-use cash deposits).
- Transaction activities: One feed for deposits, payouts, transfers, and withdrawals.
In this guide, we'll follow one simple story: a cross-border platform that collects NGN from payers and pays out KES to suppliers, with one sub-account per customer. The same building blocks work for other corridors.
Step 1: How do you get sandbox access to the Onboard API?
Start by applying for an Onboard Business account. Sandbox access is part of onboarding, so here's how the path looks:
- Apply at business.onboard.xyz/apply.
- Start KYB. KYB (Know Your Business) is how we verify your company before real money moves. Think of it as KYC, but for businesses.
- Get sandbox access. Once your KYB starts, you're given access to sandbox, where you build and test.
- Finish onboarding and get approved. Production opens up after your onboarding is complete and approved.
Inside sandbox, you get test accounts and wallets, so you can simulate deposits and payouts without touching real funds. Sandbox also has its own dashboard, and uses separate API keys from production. Keep that in mind when you wire up your config later.
We'd suggest applying first. If you'd like a hand along the way, you can also book a call with the Onboard team and we'll walk through your use case together.
Step 2: What's the difference between sandbox and production?
The two environments run the same API on different base URLs. Sandbox is for building and testing, and no real funds move there. Production is the real thing.

A few things to know:
- Authentication is identical in both environments: same API key and the same HMAC signature scheme.
- You build a full URL by adding the endpoint path to the base URL. For example,
GET /exchange/api/infobecomeshttps://external.dev.onboardpay.co/exchange/api/infoin sandbox. - Your sandbox keys won't work in production, and the other way around.
Tip: Keep the base URL, API key, and API secret in environment variables from day one. Going live then becomes a config change instead of a code change.
For the full list of base URLs, see the base URLs page in the docs.
Step 3: How do you create API credentials and set up webhooks?
Both live in the Business Dashboard, under Developer in the sidebar.
To create your API key:
- Go to Developer and click Create key.
- Copy your API key and secret straight away. The secret is shown once and can't be retrieved again, so store it in a secrets manager.
- Add the IP addresses your servers will call from.
That IP list matters. Any key that initiates a withdrawal (cash payouts and crypto transfers) requires IP whitelisting. Read-only and deposit-only keys don't. Requests from IPs that aren't on the list are rejected.
To set up webhooks:
Webhooks are how Onboard tells your system that something happened, like a deposit landing or a payout completing. So you don't have to keep polling.
- Expose a public HTTPS endpoint that returns
200 OKwith no response body. - Go to Developer and save your endpoint URL.
- A webhook secret is generated when you save. Store it separately from your API secret, because they're used for different things.
If your endpoint doesn't return 200, Onboard retries the delivery with exponential backoff until it does. We'll cover how to handle those deliveries safely in Step 8.
The dashboard also lets you rotate keys, manage IP whitelisting, and view balances and activity for your main account and every sub-account. For the details, head to the API credentials guide in the docs.
Step 4: How do you sign your first API request?
Every request to the Onboard API needs three headers. Unsigned requests are rejected.

HMAC signing sounds heavier than it is. You're proving that the request came from someone who holds your secret, without ever sending the secret itself. Here's the recipe:
- Take the current Unix time in seconds. That's your timestamp.
- Build the payload:
t=<timestamp>&followed by the exact JSON body you're sending. For GET requests, the body is{}. - Sign that payload with HMAC-SHA256, using your API secret as the key. Output it as hex.
- Send the key, signature, and timestamp as headers.
One rule to remember: your timestamp has to be within 30 seconds of Onboard's server time. If your clock drifts, you'll get a 401 back with a message about timestamp skew. So if requests fail for no obvious reason, check the clock on the machine doing the signing first.
Here's a small Node.js helper that does all of it. It's illustrative, so run it against sandbox before you build on it.
const crypto = require('crypto');
const API_KEY = process.env.ONBOARD_API_KEY;
const API_SECRET = process.env.ONBOARD_API_SECRET;
const BASE_URL = process.env.ONBOARD_BASE_URL; // sandbox: https://external.dev.onboardpay.co
async function onboard(method, path, body) {
const timestamp = Math.ceil(Date.now() / 1000);
const bodyString = body ? JSON.stringify(body) : '{}'; // '{}' is what you sign for GET
const payload = `t=${timestamp}&${bodyString}`;
const signature = crypto
.createHmac('sha256', API_SECRET)
.update(payload)
.digest('hex');
const res = await fetch(`${BASE_URL}${path}`, {
method,
headers: {
'Content-Type': 'application/json',
'x-api-key': API_KEY,
'x-signature': signature,
'x-timestamp': String(timestamp),
},
body: body ? bodyString : undefined,
});
return res.json();
}
// Your first call: confirm your credentials work
onboard('GET', '/exchange/api/info').then(console.log);Send exactly the string you signed. If you re-serialize the body after signing, even a changed key order will break the signature.
The call at the bottom, GET /exchange/api/info, returns your business profile: your businessId, businessName, legalEntityType, enabledProducts, and more. If you see that, your signing works and your credentials are good.
Got a 200 back? That's the trickiest part done. If anything about your setup feels unclear, you can book a call with the Onboard team and we'll sort it out together.
Step 5: How do you set up accounts for your customers?
With your signing helper working, let's model your customers. In our example platform, each customer gets their own sub-account: a separate balance with its own account number, crypto deposit addresses, and activity feed.
Create one with POST /ledger/subaccounts:
const sub = await onboard('POST', '/ledger/subaccounts', {
accountId: MAIN_ACCOUNT_ID, // the UUID of your main account
reference: 'cust_ade_0001', // your own ID, 6 to 36 characters, unique across sub-accounts
displayName: 'Ade Stores', // optional
});A successful call returns 201 with the sub-account's id, its currency (USD), accountBalance (balance and availableBalance), a frozen flag (false by default), and createdDate.
A few handy behaviours:
- Reference rules:
referenceaccepts letters, numbers, underscores, and hyphens, and must be unique across your sub-accounts. Using your own customer ID makes reconciliation much easier. - Freeze and rename:
PUT /ledger/subaccounts/{subAccountIdRef}lets you rename a sub-account or freeze and unfreeze it. - Delete safely:
DELETEonly works when the balance is zero. - Move funds: You can move money between your main account and sub-accounts, and between sub-accounts.
Which ledger model should you use?
This is the one design decision worth making early. There are two common approaches:
- Use Onboard's ledger. Each sub-account is your customer's balance. Deposits, withdrawals, and cash flows all hang off it, and you read balances straight from the API.
- Use your own ledger. The sub-account is just a place to receive deposits. When a deposit succeeds, you sweep it to your main account and credit the customer in your own system. Before any withdrawal, you hold the funds in your system, then release the hold once it's confirmed.
The first is faster to build. The second gives you full control of your product's balances. Both work, so pick the one that matches how your team already thinks about money.
Step 6: How do you collect local currency from customers?
In our example, a payer in Nigeria needs to send NGN to your platform. You do that with a cash deposit: a single-use account number, tied to a rate you've locked in. The money arrives in your account as USD stablecoin.
It's three calls, in this order.
1. See what you can collect right nowGET /ledger/cash-deposits/currencies returns the currencies currently available for collection. Always fetch this live instead of hardcoding it, because availability can change. Today, NGN is the currency supported for cash deposits.
2. Lock a rate with a quote
const quote = await onboard('POST', '/ledger/cash-deposits/quotes', {
payinCurrency: 'NGN',
accountCurrency: 'USD',
amount: 100,
});The response includes the rate, the minimum and maximum amounts, and an expiresAt timestamp. Treat expiresAt as a hard deadline.
3. Create the deposit
const deposit = await onboard('POST', '/ledger/cash-deposits', {
quoteId: quote.id,
accountId: sub.id, // the sub-account to credit
reference: 'dep_ade_000123', // your own ID, 8 to 48 characters, unique
amount: 100,
senderInfo: {
firstName: 'Ade',
lastName: 'Okafor',
email: '[email protected]',
},
narration: 'Invoice 4821',
});The response gives you the deposit's id, status, rate, and paymentDetails. That last field is what you show your payer: an accountName, an accountNumber, and sometimes a reference the payer should include so the payment matches automatically.
One gotcha: paymentDetails.details can be null at first, while the account number is still being generated. Build your UI to handle that, and fetch the deposit again instead of showing a blank screen.
Track progress by calling GET /ledger/cash-deposits/{reference}, or, better, listen for the transaction_activity.cash_deposit.* webhooks (more on those in Step 8). Statuses move through PENDING, IN_PROGRESS, and then SUCCESS or FAILED.
One more thing to know: third-party payments aren't allowed on sub-accounts for NGN. So the payer's name should match the customer the sub-account belongs to.
Need standing account numbers instead of single-use ones? Look at virtual account numbers in the docs, which give you reusable bank details.
Step 7: How do you pay out to suppliers in another country?
Now the other half. In our example, you're paying a supplier in Kenya in KES. A cash payout sends fiat to a bank account or a mobile wallet, debited from your main account or any sub-account.
Again, it's a short sequence: save a beneficiary, lock a rate, send the payout.
1. Save a beneficiary
A beneficiary is the person or business you're paying. Save them once with POST /ledger/fiat-beneficiaries, then reuse the ID.
const beneficiary = await onboard('POST', '/ledger/fiat-beneficiaries', {
accountNumber: '254700000000', // phone number for mobile money, IBAN for SEPA
accountName: 'Wanjiru Supplies Ltd',
currency: 'KES',
accountHolderType: 'BUSINESS', // or 'INDIVIDUAL'
paymentChannelId: 'M_PESA_KENYA_SAFARICOM',
// extra fields depend on the channel, e.g. bankCode or mobileNetwork
});The paymentChannelId decides which extra fields are required, and unlisted fields are rejected. A few channels you'll see: BANK_TRANSFER_NIGERIA, BANK_TRANSFER_KENYA, BANK_TRANSFER_SEPA, BANK_TRANSFER_UK, M_PESA_KENYA_SAFARICOM, and MTN_MOBILE_MONEY_GH. Don't hardcode the list. Fetch it live from GET /ledger/cash-payments/currencies.
You get back 201 and an id. That's your beneficiary ID.
2. Lock a payout rate
const payoutQuote = await onboard('POST', '/ledger/cash-payments/quotes', {
payoutCurrency: 'KES',
accountCurrency: 'USD',
amount: 100,
});Just like deposits, the response includes the rate, limits, and an expiresAt deadline.
3. Send the payout
const payout = await onboard('POST', '/ledger/cash-payments', {
quoteId: payoutQuote.id,
accountId: sub.id, // the account to debit
reference: 'pay_ade_000045', // your own ID, 8 to 48 characters, unique
amount: 100,
beneficiaryId: beneficiary.id,
paymentReason: 'Supplier invoice 4821',
narration: 'Invoice 4821',
});The response returns the payout's id and status, which moves through PENDING, IN_PROGRESS, and then SUCCESS or FAILED. Track it with GET /ledger/cash-payments/{reference} or the transaction_activity.cash_payment.* webhooks.
Two things to plan for:
- Payouts need an IP-whitelisted API key. If your production servers aren't on the list, payout calls will be rejected.
- Use your own record IDs in
reference. That way every payout traces back to one of your invoices or orders. Check a payout's status before retrying a call that timed out.
Payout currencies listed today include USD, NGN, EUR, GBP, GHS, KES, and IDR, with bank transfer or mobile wallet depending on the corridor. Fetch the live list before you build your UI.
What other ways can you move money?
Cash deposits and payouts are just two of the building blocks. Depending on your product, you may also want:
- Offramp accounts: Create a fiat beneficiary, then an offramp account, and Onboard gives you a stablecoin funding address. Every deposit to it converts and pays out automatically.
- Stablecoin deposits and withdrawals: Fund a sub-account with USDT or USDC across networks like Polygon, Arbitrum, Base, Solana, and TRON, or send stablecoins out with
POST /ledger/crypto-transfer. The supported networks can change, so fetch them fromGET /ledger/assets/{assetCode}/network-tokens. - Virtual account numbers: Reusable bank details for collecting without creating a new deposit each time.
The docs cover each of these in detail.
Step 8: How do you handle Onboard webhooks safely?
Deposits and payouts don't finish the moment you call the API. Webhooks tell you when something changes, so your system stays in sync without constant polling. Three habits keep them reliable: verify, dedupe, and handle every status.
Verify the signature
Each delivery carries an x-signature and an x-timestamp header. The signature is made with your webhook secret, not your API secret. To check it:
- Build the string
t=<x-timestamp>&followed by the raw request body, exactly as received. - Compute an HMAC-SHA256 of that string using your webhook secret, as a hex digest.
- Compare it to the
x-signatureheader.
Use the raw body, not parsed-then-reserialized JSON. A different key order or spacing will break the match. Here's the check in Python (illustrative, so test it before relying on it):
import hmac, hashlib
def verify_onboard_webhook(raw_body: bytes, signature: str, timestamp: str, webhook_secret: str) -> bool:
signed_payload = f"t={timestamp}&".encode() + raw_body
expected = hmac.new(webhook_secret.encode(), signed_payload, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, signature)We use compare_digest there because it's a constant-time comparison, which is safer than a plain ==. It's also smart to reject deliveries with a very old timestamp, since the docs don't set a replay window for you.
Expect the same event more than once
Webhook delivery is at-least-once. If your endpoint is slow or returns an error, Onboard retries with exponential backoff, and a single transaction can send several events with the same name. So deduplicate on the activity id in the payload, not on the event name plus a timestamp.
Handle every status
Every delivery has an envelope with event, data, and timestamp. Money movement events follow this naming pattern: transaction_activity.<type>.<stage>.

Notice that the stage is completed but the status reads SUCCESS. Match on the right one.
The transaction types are cash_deposit, cash_payment, crypto_withdrawal, crypto_deposit, offramp_deposit, internal_transfer, and account_number_deposit. There are also account activity events, like account_activity.sub_account.created, that fire when something changes without money moving.
The full event list lives in the webhook docs.
Step 9: How do you go from sandbox to production?
You can switch to production once your onboarding is fully complete and approved. Until then, keep building and testing in sandbox. When you're approved, work through this checklist:
- Confirm your approval. Production opens after full onboarding and approval, so make sure that's done first.
- Create production credentials. Sandbox and production keys are separate, so generate a fresh key and secret for production and store them in your secrets manager.
- Whitelist your production IPs. Any key that does payouts or crypto transfers needs the IP addresses of your production servers on its list.
- Swap the base URL. Change
ONBOARD_BASE_URLfromhttps://external.dev.onboardpay.cotohttps://business-api.onboard.xyz. Authentication works the same way in both. - Register your production webhook URL. It needs to be HTTPS and return
200with an empty body. Save the new webhook secret, verify signatures on the raw body, and dedupe on the activityid. - Handle every status. Cover
PENDING,IN_PROGRESS,SUCCESS, andFAILED. Treat quoteexpiresAtas a hard deadline, and handlepaymentDetails.detailsbeing null at first. - Fetch live lists. Pull currencies, payment channels, and stablecoin networks from the API instead of hardcoding them.
- Start small. Run a low-value real transaction through the full flow before you open it up to customers.
If you've followed the steps in this guide, most of that list will already be done. Going live then comes down to new keys, new IPs, and a new base URL.
Ready to start building?
Here's the path in one line: apply, start KYB, build in sandbox, get approved, go live.
Start by applying at business.onboard.xyz/apply. If you'd like to talk through your use case first, or want help along the way, book a call with the Onboard team.
And for every endpoint, field, and event we didn't have room for here, the full reference is waiting at docs.onboard.xyz.
Your borderless life awaits.





