payout.* webhooks arrive. This page walks the whole loop.
Everything here uses the sandbox base URL and a sandbox token:
404).
A new sandbox workspace is enabled for every corridor, collection method and currency the platform currently serves, across payouts, collections, conversions, orders and virtual accounts, with nothing to request; what is served follows the platform, so a corridor added later reaches your workspace within a few minutes without a change on your side. A workspace whose policy a Zuba operator has set keeps that policy instead. Sandbox fees and rates are illustrative rather than your contract terms, and the corridors enabled on your live workspace are the ones agreed at go-live.
Lifecycle at a glance
The full sandbox loop (fund, register, pay, receive) and the terminal branches a magic account number drives:Step 1: Fund your workspace
You need a balance before you can pay out. A sandbox deposit is a trusted ledger credit scoped to your own workspace, with no provider and no fraud screening. It exists purely to give you funds to spend. To add fiat test funds, callPOST /v1/sandbox/deposits, which credits the workspace of the calling token. The endpoint exists only in the sandbox; in production it returns 404.
To exercise your deposit integration itself (payment instructions, a failure, the webhooks), create the deposit through POST /v1/deposits instead, as Deposits describes.
A simulated deposit always lands in your own workspace, so the request body takes no clientId:
The response returns immediately with
status: "processing":
completed a moment later, the same lifecycle as a real deposit. Reaching completed delivers deposit.completed to any endpoint subscribed to it. Confirm the funds landed with GET /v1/ledger/balances (or GET /v1/deposits/:id for the deposit’s own status) before you pay out.
Step 2: Register a webhook endpoint
To receive callbacks, point Zuba at an HTTPS URL your app controls. For local development, expose your server with a tunnel first:payout.processing, payout.paid, payout.failed, payout.reverted, payout.cancelled, order.created, order.awaiting_funds, order.funds_received, order.completed, order.failed, order.expired, virtual_account.active, virtual_account.failed, deposit.completed, deposit.failed, application.under_review, application.more_info_requested, application.approved, application.rejected, application.identity_verification_updated, information_request.opened, information_request.closed, account.created, webhook.test. What each event carries and when it fires is covered in Webhook Notifications.
Send a test webhook
Before triggering a real payout, confirm your endpoint receives and verifies a delivery. This fires awebhook.test event to the registered URL immediately:
"test": true. If your signature check passes here, it will pass for real events too.
Step 3: Trigger a deterministic payout
For predictable outcomes, send payouts using the documented magic account numbers below. Any payout that uses these values is guaranteed to resolve to the documented terminal state, so you can write tests that assert on success and failure paths reliably. The outcome is determined by the beneficiary identifier alone and works across the bank and mobile money corridors below. For bank transfers that identifier is the account number; for mobile money and UPI it is the phone number (see Mobile money below). Put one of these values in the identifier field for the corridor:crAccount for NGN/GHS, accountNumber for USD (and the sandbox-only ZMW/MWK and INR bank accounts), crAccount for the sandbox-only EGP, phoneNumber for mobile money and UPI. EUR, GBP and CHF payouts to an iban account take a full IBAN, so they use the magic IBANs listed under IBAN payouts instead. A GBP account with a sortCode takes an 8-digit account number, so it uses the 8-digit magic values under UK sort code payouts instead. The bank code, routing number, BIC, and mobile provider are ignored when matching.
Every payout is created with status
created. The first three move to processing asynchronously moments later (delivering the payout.processing webhook) and reach their terminal state after about 3 seconds, so you can exercise the full created → processing → terminal lifecycle regardless of the outcome.
0000000003 to 0000000005 exercise slower paths. 0000000003 and 0000000004 move to processing just as quickly but stay there for about 60 seconds before they settle, which lets you test how your app shows a payout that is still in flight and what it does while it waits for the terminal webhook. 0000000005 stays in created for about 60 seconds. During that window POST /v1/payouts/{id}/cancel succeeds: the payout moves to cancelled, the held funds return to your balance, and it never moves to processing. If you leave it alone, it moves to processing when the window ends and settles paid about 3 seconds later, like 0000000000.
The same account numbers work for simulated deposits. Send one as accountNumber to POST /v1/sandbox/deposits, together with a currency: a number whose payout ends paid (0000000000, 0000000003 or 0000000005) credits your own workspace in that currency, exactly as a deposit without accountNumber does, and a number whose payout ends failed (0000000001, 0000000002 or 0000000004) records a deposit that ends failed at once (the response carries status: "failed"), credits nothing, and delivers deposit.failed to an endpoint you have registered for it. The payout’s 60-second wait has no deposit counterpart, and 0000000006 credits like 0000000000 because a screening hold applies to payouts only.
Any other account or phone number is treated as a regular payout. Regular sandbox payouts go through the same created → processing lifecycle and settle paid about 3 seconds later; no funds move anywhere. Crypto (wallet) payouts have no magic values and are not simulated: the wallet address is never matched, and the payout is sent on a public test network, so its outcome depends on that network and is not guaranteed. The sandbox does not ask for a dateOfBirth on an individual beneficiary or on an individual senderInfo, so it accepts a crypto payout without one; production refuses it. The paying account’s approved application is still checked: a crypto payout with no senderInfo, from a workspace or sub-account approved as an individual with no date of birth on its application, is refused with ORIGINATOR_NOT_ON_RECORD in the sandbox as in production (see Travel Rule).
Fraud and compliance screening passes every other payout and every deposit in the sandbox. To reproduce a screening hold, use 0000000006 (see Screening holds).
The resolved holder name column shows the value the sandbox account-name resolver returns for each magic value (NGN bank transfers only). When you’re using these from the dashboard, the verified-account banner displays this name so you can tell at a glance which scenario you’re about to trigger.
The sandbox answers the other account lookups from sandbox data too. Resolving any other NGN account number at a listed bank returns the holder name Sandbox Account <accountNumber>, the NGN bank list is a fixed list, and resolving a GB sort code and account number returns a valid IBAN derived from them.
Example: a guaranteed-success NGN payout
"status": "created"; the payout moves to processing asynchronously and you will then receive a payout.paid webhook (or you can poll GET /v1/payouts/:id until status is paid).
Example: a guaranteed-failure NGN payout
Switch thecrAccount to 0000000001 to assert your error-handling path:
processing and transitions to failed after about 3 seconds, the held funds are returned to your balance, and the payout.failed webhook is delivered. 0000000002 fails the same way, and the two report different failure types:
Branch on
status and failureCategory, not on the failure text. failureReason is a human-readable message intended for display and its wording is not part of the API contract. failureCategory is the enumerated field for branching on failure type.
Example: a guaranteed-success USD payout
The same account numbers work outside NGN. For a USD payout, put the magic value inaccountNumber:
UK sort code payouts (GBP)
A GBPbank_account with a sortCode takes an 8-digit accountNumber. Use any valid 6-digit sort code with one of these account numbers. The outcome depends only on the account number.
IBAN payouts (EUR, GBP and CHF)
An IBAN starts with a country code and two check digits, so a bare account number such as0000000000 fails the IBAN format check when the payout is created. IBAN payouts use these IBANs instead, one set per currency. Each one is a valid IBAN whose account number ends in the same digits as the account-number scheme. The outcome depends only on the IBAN, so use these whichever country your beneficiary is in.
Put the IBAN in the
iban field of an iban account, written without spaces as in the table. Any other IBAN is treated as a regular payout. An IBAN payout needs the recipient’s full address (address, city and postcode on the beneficiary), as in production. A CHF payout is paid only from an XOF balance; in production it is enabled per client on request, while the sandbox has it enabled. See When a quote is required for its funding rules.
Mobile money
Mobile money payouts carry the beneficiary as a phone number, so the magic value goes in thephoneNumber field instead of an account number. A phone number must be a valid number for its country, so (unlike the single universal account number) each mobile corridor has its own set of seven magic numbers. The trailing digits match the account-number scheme: …00 → paid, …01 → failed, …02 → invalid account, …03 → slow paid, …04 → slow failed, …05 → held then paid, …06 → screening hold, with the same timing as the matching account number.
The
country on the account must match the number’s country, and mobileProvider must be a valid provider for that country, but the specific provider does not affect the outcome. For Mozambique’s providers and a complete MZN request, see Mozambique (MZN) mobile money; for Egypt’s, see Egypt (EGP). The China numbers are Alipay wallets for a CNY payout, a mobile account with mobileProvider alipay; see When a quote is required for what a CNY payout carries. The India numbers select the outcome as the phoneNumber of an INR UPI account (a mobile account with mobileProvider upi) or of an INR bank account.
Cameroon (CM) payouts additionally require the sender’s KYC on the payout
request via
senderInfo. An individual sender must supply firstName,
lastName, phoneNumber, fundOrigin, gender, and country, e.g.
"senderInfo": { "type": "individual", "firstName": "Ada", "lastName": "Eze", "phoneNumber": "+237650000000", "fundOrigin": "SALARY", "gender": "F", "country": "CM" }
(a business sender instead requires companyName, registrationNumber, and
country). If any of those is missing, a CM payout is rejected with a
400 at creation, before the magic number is evaluated.phoneNumber to +233200000001 for a guaranteed failure, +233200000002 for an invalid-account failure, +233200000003 to +233200000005 for the slow and held outcomes, or +233200000006 for a screening hold, exactly as with the bank account numbers above.
Screening holds
A payout to0000000006, or to its IBAN or mobile number form, is held by fraud screening, the way a payout under compliance review is held in production. Screening runs moments after the payout is created: the payout moves to processing, delivers payout.processing, and stays there until the hold is resolved. It can’t be cancelled while it waits, because it has already left created.
In production a compliance reviewer resolves the hold. In the sandbox you resolve it yourself, with the same credentials you use to create payouts:
POST /v1/sandbox/payouts/{id}/releaseapproves the payout. It continues as an ordinary sandbox payout, settlespaidabout 3 seconds later, and deliverspayout.paid.POST /v1/sandbox/payouts/{id}/declinerefuses it. The payout moves tofailedwithfailureCategorypayment_not_approved, the held funds return to your balance, andpayout.failedis delivered.
200 with the payout. Repeating the call that resolved the hold answers 200 with the payout again. The other call, or either call for a payout screening is not holding, answers 409 with the code STATE_CONFLICT, and a payout that is not your workspace’s answers 404. With Zuba-Account-Id set, both calls act only on that sub-account’s payouts, and any other payout answers 404 as well. The release and decline endpoints exist only in the sandbox.
Sandbox-only payout currencies
Five additional payout currencies are simulated in the sandbox: ZMW (Zambia) and MWK (Malawi) over bank transfer, EGP (Egypt) over bank transfer and mobile money, INR (India) over bank transfer and UPI, and MZN (Mozambique) over mobile money. Use them to build and test flows for these markets before they go live. In production a payout to ZMW, MWK, EGP or INR is rejected at creation, as is an MZN payout from a workspace that has not been enabled for it. Payouts to these currencies settle like every other sandbox payout: the magic values above drive the same outcomes and timing, and any other account or phone number settles aspaid. Fund them cross-currency from an
existing balance, e.g. hold USD and pay out ZMW:
bankCode is accepted. The same shape applies for MWK, with the magic
values going in accountNumber.
Egypt (EGP)
An EGP bank account takes abankCode from GET /v1/banks?country=EG and the
account number in crAccount, 5 to 20 digits; Agricultural Bank of Egypt
(eg_0003) takes its 29-character Egyptian IBAN there instead. It also needs
the recipient’s phoneNumber, a valid Egyptian number in international format
with +20. The magic account numbers go in crAccount:
route: "mobile_money" and a mobile account
with an Egyptian mobile number, a mobileProvider of vodafone, etisalat,
orange or we, and country EG. The Egypt magic numbers under
Mobile money select the outcome, and amount must be between
1 and 5,000 EGP.
India (INR)
An INR bank account takes the branch’s 11-characterifsc and an
accountNumber of 9 to 18 digits, plus the recipient’s phoneNumber, a valid
Indian mobile number in international format with +91. The IFSC must belong
to one of the banks listed under Account Types. The magic
account numbers go in accountNumber:
route: "upi" and a mobile account with
mobileProvider upi, the recipient’s UPI address as vpa, their Indian
mobile number as phoneNumber, and country IN. The India magic numbers
under Mobile money select the outcome, and amount must be at
most 1,00,000 INR:
Mozambique (MZN) mobile money
MZN pays out to mobile money wallets, not bank accounts, so an MZN payout usesroute: "mobile_money" and a mobile beneficiary account. Hold USD and pay
out MZN:
mobileProviderismpesaorvodacomfor an M-Pesa wallet, andemolaormovitelfor an e-Mola wallet.phoneNumberis a Mozambican mobile number in international format.+258841234500settlespaid; use+258841234501forfailedor+258841234502for an invalid-account failure, as in the mobile money table.amountis in MZN and must be between 5 and 75,000; a payout outside that range is rejected at creation.- No quote is needed: the payout is priced at the current USD to MZN rate when it is created. A USDC balance can fund it the same way. Fund your balance first with the deposit simulator, or the payout is rejected for insufficient balance.
Step 4: Receive the webhooks
A payout is created with statuscreated, moves to processing asynchronously, and then transitions to a terminal state (paid or failed). A bank or mobile money payout settles about 3 seconds after entering processing. The slow and held magic values are the exception: …03 and …04 stay in processing for about 60 seconds, and …05 waits about 60 seconds in created first (see the magic account numbers). Do not assume a fixed delay in your code. Each payout delivers the full sequence:
payout.processingpayout.paidorpayout.failed
created, such as a …05 payout during its wait, never moves to processing and delivers payout.cancelled instead. A …06 payout delivers payout.processing when screening holds it and its terminal webhook only once you release or decline it.
Track completion in one of two ways:
- Webhooks: the recommended approach. Treat the webhook as the source of truth. Each delivery is a JSON POST carrying
X-Zuba-SignatureandX-Zuba-Timestamp. Always verify the signature before processing. Copy-paste handlers for Node, Python, Go, and Java are in Webhook Notifications. - Polling:
GET /v1/payouts/:idand check thestatusfield. Avoid tight polling loops; one request every few seconds is plenty.
Inspect deliveries
Didn’t see a callback? Check what Zuba attempted, with HTTP status codes and (truncated) response bodies:2xx within 30 seconds. See Delivery and Retries.
Sub-account approval
A sub-account created withPOST /v1/accounts starts pending and stays there until its KYB application is decided. Create the application with POST /v2/applications, naming the sub-account in the Zuba-Account-Id header. Submission needs the applicant’s identity verified: start it with POST /v2/applications/{id}/identity-verification/session, which in the sandbox completes at once. Where Zuba relies on your own identity checks, upload your identity verification report for the applicant and for each director and large shareholder (document type customer_identity_verification_report, each naming its person in personId, the applicant’s with none) instead; GET /v2/applications/{id}/identity-verification shows which applies. Then submit with POST /v2/applications/{id}/submit; it then waits under review.
In production a Zuba reviewer decides the application. In the sandbox you decide it yourself, with credentials that can update accounts (the update:accounts scope):
POST /v1/sandbox/accounts/{accountId}/approveapproves the application. The sub-account becomesactiveandapplication.approvedis delivered.POST /v1/sandbox/accounts/{accountId}/rejectrejects it. The sub-account becomesclosedandapplication.rejectedis delivered.
Zuba-Account-Id header or a body. Each call answers 200 with the account, already in its new status, and repeating the call that decided the application answers 200 with the account again. An application that has not been submitted, or is waiting on more information, answers 409 with the code STATE_CONFLICT, as does the other call once one has decided the application, or either call for a sub-account that left pending any other way, such as one closed with PATCH /v1/accounts/{accountId}. An account that is not one of your sub-accounts, including your master workspace, answers 404. The approve and reject endpoints exist only in the sandbox; in production they return 404.
Information requests
In production Zuba opens an information request when it needs more from you. In the sandbox you open and close one yourself, with credentials that can update applications (theupdate:applications scope), to build against the information request webhooks and the /v1/information-requests endpoints:
POST /v1/sandbox/information-requestsopens a sample request with one question of each kind, due in 14 days. It answers201with the request, andinformation_request.openedis delivered. Each call opens another request. No email is sent.POST /v1/sandbox/information-requests/{id}/closecloses it. It answers200with the request, andinformation_request.closedis delivered. Theresolutionisfulfilledif you submitted your answers first andwithdrawnif you did not. Repeating the call answers200with the request again, and delivers nothing new.
Zuba-Account-Id header, naming the sub-account the request is for, and neither takes a body.
PUT /v1/information-requests/{id}/items/{itemId} for the text and choice questions, POST /v1/information-requests/{id}/items/{itemId}/document/upload-url with fileName, mimeType and fileSize, a PUT of the file to the returned uploadUrl with mimeType as its Content-Type, and then POST /v1/information-requests/{id}/items/{itemId}/document with documentKey and fileName for the document question, and POST /v1/information-requests/{id}/submit to hand the answers in.
A webhook’s data is the request when the event was processed, so a script that closes a request straight after opening it can receive an information_request.opened delivery that already shows closed. Key your handling on the event type, and read GET /v1/information-requests/{id} for the current state.
A request that belongs to another account, or to no account you own, answers 404, and a request the sandbox did not open answers 409 to the close call. So does a close that overlaps a submit of the same request; read it again and repeat the close. The open and close endpoints exist only in the sandbox; in production they return 404.
Deposits
POST /v1/deposits is simulated end to end in the sandbox. It accepts the same two routes as production, an NGN bank transfer (method: "manual_deposit", the default for NGN) and a KES M-Pesa collection (method: "mobile_money"). No bank is contacted and no phone is prompted: the sandbox answers with synthetic payment instructions and settles the deposit itself a few seconds later. Nothing needs to be paid into the returned account.
Create a deposit
AnNGN bank transfer returns status: "pending" and an account to pay into. iban carries the account number, bic the bank name and reference the deposit’s payment reference. The metadata block holds the same details plus the account name and an expiresAt, as in production:
KES M-Pesa collection returns status: "processing" and a description asking the payer to approve the prompt on their phone. As in production, the amount must be whole shillings and phoneNumber a Kenyan mobile number with the 254 country code. A fractional amount or a non-Kenyan number returns 400 with the reason, the deposit is failed, and deposit.failed is delivered. In production a collection also needs an active KES virtual account for the workspace or sub-account it is created for; the sandbox does not check this. In production M-Pesa collections must be enabled for your workspace, and until they are a KES M-Pesa create returns 403 with METHOD_NOT_ENTITLED; the sandbox has them enabled.
Settlement and the failure number
About 5 seconds after it is created, the deposit reaches a terminal state. One magic value makes it fail: aKES M-Pesa collection from the payer number ending 01 in the Kenyan row of the mobile money magic numbers.
Created this way, a collection from any other Kenyan magic number, ending
00 or 02 to 05, completes like any other number: only the 01 number selects a failure. The deposit simulator reads the magic account numbers differently: there every number whose payout ends failed records a failed deposit. An NGN deposit created here always completes: no sandbox value makes an NGN deposit from POST /v1/deposits fail. To exercise your deposit.failed handling, use the KES failure number above, or send a failing magic account number to the deposit simulator as described in Step 3.
An NGN deposit passes through processing on its way to completed. The sandbox charges no deposit fee, so serviceFee is "0.00000000" and creditedAmount equals amount. Follow the deposit with the deposit.completed and deposit.failed webhooks (see Webhook Notifications) or by polling GET /v1/deposits/:id. The delay is a sandbox convenience: in production a deposit settles when the payer’s money arrives, so do not build against a fixed delay.
Virtual accounts
Virtual-account issuance is fully simulated in the sandbox:POST /v1/virtual-accounts never opens a real bank account and never depends on any downstream banking service being available. Every currency below is issued to every approved sandbox workspace, whatever its country of incorporation, and the create call returns 201 with status: "active" and the account details already filled in. The returned details are synthetic: IBANs carry valid check digits so your format validation passes, and every simulated IBAN contains the marker SNDB so it is recognisable at a glance. No real bank transfer can reach them; simulate one with the deposit simulator, as described in Deposits to a virtual account below.
Any other currency returns
422.
The sandbox issues every currency in the create response, and still delivers the virtual_account.active webhook for each account it issues, so your completion handler is exercised. In production, every currency except NGN opens asynchronously: the create call returns 201 with status: "pending", the account activates once it has been opened, and the virtual_account.active webhook is the completion signal (see Webhooks). A ZAR account can also open inside the request, returning 201 with status: "active". Build against that webhook rather than the timing you see in the sandbox: on activation, fetch the issued details with GET /v1/virtual-accounts, and if you must poll instead, don’t assume a fixed delay.
USD is issuable in production, but it is reviewed there: the account can stay pending for days, and a review that refuses it delivers virtual_account.failed. The sandbox opens it as the call is made.
Issuance requires an approved workspace application and opens the account under your workspace’s legal name; a sandbox workspace created through quick-create satisfies this for every issuable currency. To issue an account owned by a sub-account, send its id in the Zuba-Account-Id header; deposits to that account then settle into the sub-account’s balance. NGN is the exception in production, where whether a sub-account can hold its own account depends on the rail serving your workspace: the request either issues one or returns 422. Ask GET /v1/virtual-accounts/requirements with the sub-account’s id before you build on it: self_serve_unsupported means that rail issues to the master only. The sandbox always issues one for a sub-account.
Some currencies open the account under terms the owner must accept first. GET /v1/virtual-accounts/requirements reports them as one disclosure.acknowledgement requirement whose disclosures list every outstanding document: its slug, version, pdfUrl, the exact checkboxWording to show, and the acknowledgePath to call once the owner has agreed. Present the documents in your own flow, then POST each acknowledgePath with documentVersion set to that document’s version and an attestation recording when the owner accepted, from which IP and user agent, and who signed. The acceptance is recorded against the owner’s application, before or after its approval, and the account request succeeds once every listed document is accepted.
Deposits to a virtual account
To simulate money arriving at an issued account, call the deposit simulator with the account’saccountNumber (or its iban, with or without spaces) instead of a currency:
Zuba-Account-Id header does not choose the owner, although a header you send must still name an account you own. The deposit records the account it arrived at, under the method a real transfer to that account records in production: bank_deposit for most accounts, and virtual_account for some NGN accounts, depending on the bank that serves them. Match on both values, as you would in production. It follows the same lifecycle as a direct top-up; narration works the same way, so a settlement reference in it is matched automatically.
A deposit to an
XOF, XAF or GHS account is credited straight away in the sandbox, without the proof-of-payment step production uses for those accounts.
A simulated deposit books no deposit fee, so your balance moves by the whole amount even where a real transfer to the same account is charged one in production.
A deposit without accountNumber models money that reached your workspace off-platform, as an operator-credited deposit does in production, and records method: "admin_deposit". A deposit to a magic account number records the same method.
Simulating a rejection
Some currencies’ accounts are subject to an approval step that can refuse the account. To exercise your rejection handling, use a workspace whose legal name containsSANDBOX-REJECT (matched case-insensitively, e.g. Acme SANDBOX-REJECT Ltd). Issuance for that workspace is refused instead of approved: for every currency, the create call fails with a 502 provider error and no account is created, so a repeat create is refused the same way. Any other legal name is always approved.
In production a refusal of an XOF, XAF, GHS, USD or ZAR account can also arrive after the create call has returned it pending: the approval workflow rejects it, a virtual_account.failed webhook fires, and the account never becomes active and never appears in GET /v1/virtual-accounts. A repeat create for that currency then answers with the refusal that stands. For XOF, XAF and GHS that is 409 VIRTUAL_ACCOUNT_DEACTIVATED, while the refused account is parked for operator review; for USD and ZAR it is 409 VIRTUAL_ACCOUNT_VERIFICATION_REQUIRED (see Webhooks). A ZAR refusal that asks you to retry after ten minutes is the exception to the account never becoming active: repeating the request then opens the account again with a new paymentReference. Handle both shapes: the synchronous 502 and the asynchronous virtual_account.failed.
Quotes
Quotes price a currency pair before you commit to it.POST /v1/quotes mints a single-use held quote and locks the rate until expiresAt, in the sandbox as in production. The intent field decides which executor can consume it. There are no magic values here. A sandbox quote is priced at the latest synced market rate and never calls a liquidity provider, and minting one is free, so you can also use the endpoint standalone for rate discovery and simply let unused quotes expire. A convert or order quote, or a payout quote from NGN, is refused with 422 INSUFFICIENT_LIQUIDITY when a rate it prices from has not synced.
rate is expressed in fromCurrency units per one unit of toCurrency, markup included, so totalDebitAmount ≈ targetAmount × rate: here 455.12 EUR × 1.0986 ≈ 500 USD. A convert quote always returns fee and feeCurrency (fee is "0.0000" when your pricing carries no per-conversion fee); the fee is part of totalDebitAmount, so the amount that converts at rate is the debit less the fee.
Convert pairs are directed. The platform converts between USD, GBP and EUR, between any of those and USDT or USDC, between USDT and USDC, and between NGN or ZAR and USDT or USDC in either direction (NGN and ZAR do not convert to USD, GBP or EUR, or to each other). Your account is granted a subset of these: GET /v1/conversions/corridors lists exactly the pairs you can quote. An NGN or ZAR pair is priced off live market depth for the amount you request, so a very large amount can be refused with INSUFFICIENT_LIQUIDITY; try a smaller amount. A ZAR pair is also refused with INSUFFICIENT_LIQUIDITY while no current market price is available. In the sandbox an NGN or ZAR pair is priced at the synced rate whatever the amount (an NGN on-ramp still nets the flat network fee described below), and is refused with INSUFFICIENT_LIQUIDITY above 1,000,000 USDT. An NGN on-ramp (NGN into USDT or USDC) nets a flat network fee off what you receive, so a very small amount is refused with AMOUNT_BELOW_FEE; its details.feeCostSource is the NGN amount that fee costs at the current rate, and the conversion must exceed it. A ZAR on-ramp nets no network fee, so it is never refused with AMOUNT_BELOW_FEE.
Every amount on a convert quote is a whole number of the currency’s smallest unit: cents for USD, GBP, EUR and ZAR, kobo for NGN, and four decimal places for USDT and USDC. A fromAmount in USD, GBP, EUR, NGN or ZAR finer than its smallest unit is refused with AMOUNT_PRECISION_EXCEEDED, whose details.decimalPlaces is the number of places fromCurrency admits; any amount finer than four places is refused by request validation. While the account that holds your cash for one side of the pair is frozen, the quote and the conversion are refused with 422 ACCOUNT_NOT_ACTIVE and nothing is debited. While your balance in one of the pair’s currencies is held in more than one place, the conversion cannot be attributed to one of them, so the quote and the conversion are refused with 422 FUNDING_ACCOUNT_AMBIGUOUS; contact support to resolve it. When the cash on the two sides of the pair is held at different institutions, it cannot be converted in one step, so the quote is refused with 400 HOLDINGS_NOT_CONVERTIBLE and nothing is debited.
Which side of the pair you fix depends on the intent, and each intent is consumed by exactly one executor:
Three rules apply to every quote:
- Single-use. Creating the downstream conversion, order, or payout consumes the quote; a second use is rejected with
QUOTE_ALREADY_USED. - Short-lived. Expiry is typically well under a minute; always read
expiresAtrather than assuming a TTL, and re-quote if it lapses. - The intent is binding. Feeding a convert quote to
POST /v1/orders(or any other mismatch) is rejected withQUOTE_INTENT_MISMATCH.
GET /v1/quotes/{id}, which adds a status of active, used, or expired.
Feed a quote into a conversion
With the USD balance from Step 1, execute an in-wallet conversion by consuming the convert quote above:completed), with the source debit and target credit already applied to your balances. Confirm with GET /v1/ledger/balances. In production a conversion can also be returned pending: the source amount is already debited, and the conversion moves to completed (target credited) or failed (source amount returned) shortly after. Read its status with GET /v1/conversions/{id} rather than assuming the response is terminal.
Feed a quote into an order
Every order starts from a quote withintent: "order"; there is no auto-priced path. Mint the quote with fromAmount or toAmount fixed, then create the order with the returned id as quotationId and a beneficiary holding an active account in the buy currency. The flow is covered end-to-end in Trade Desk Orders; the sandbox twist is the magic sell amounts below.
Deterministic orders
Orders are executed manually by the trade desk, so in the sandbox two magic sell amounts short-circuit the desk and drive an order straight to a terminal state. The match is on the order’s source (sell) amount, is numeric (1111.11 matches 1111.1100), and works in any sell currency:
In a sell currency with no minor unit — XOF, XAF, JPY, KRW, VND, UGX — the triggers are the whole units
1111 and 2222. A quote holds its amounts at the sell currency’s own precision, so 1111.11 XOF is quoted as 1111 and reaches the desk as the whole-unit trigger. Sending either form gives the same outcome; reading totalDebitAmount back off the quote tells you which value the order will carry.order.created, order.funds_received, then order.completed or order.failed). The magic amounts apply on either funding path: a balance-funded order short-circuits at creation, and a settlement-funded order short-circuits the moment its deposit matches (so the sequence gains order.awaiting_funds between order.created and order.funds_received). Any other amount stays in funds_received awaiting desk execution, exactly as in production. To pin the sell amount precisely, fix fromAmount on the order quote:
Feed a quote into a payout
Mint withintent: "payout", fixing either toAmount to the beneficiary amount or fromAmount to what you want debited, then pass the id as quoteId on POST /v1/payouts with amount set to the quote’s targetAmount. On a cross-currency pair, a quote fixed by fromAmount rounds targetAmount down to the smallest unit every payout method in that currency accepts (whole shillings for KES); on a same-currency pair the two are equal. The payout fee is added to the debit when the payout is created. NGN to USD, EUR and GBP quotes take toAmount only. Some cross-currency corridors require a quote; others are auto-priced at creation when quoteId is omitted. The magic beneficiary values from Step 3 drive the outcome exactly as for an auto-priced payout, so a quote-first payout can still land a guaranteed paid or failed.
Tips
- Use distinct
clientRefvalues per test run so polling and webhook handlers can correlate requests cleanly. - Don’t assume status transitions are instant. The create response returns
created; both the move toprocessingand the terminal transition happen asynchronously. Tests that expect immediate state change will be flaky: wait on the webhook or poll the GET endpoint. - Test failures too. It’s easy to verify the happy path; make sure your error-handling code is exercised by the documented failure values as well.
- The beneficiary identifier is what matters. Only the identifier field (
crAccountfor NGN/GHS/KES/UGX/XAF/XOF and the sandbox-only EGP,accountNumberfor USD and the sandbox-only ZMW/MWK and INR bank accounts,ibanfor EUR/GBP/CHFibanaccounts with the magic IBANs, the 8-digitaccountNumberfor a GBP sort code account with the UK magic values,phoneNumberfor mobile money and UPI) is matched; the bank code, routing number, BIC, and mobile provider are free to be any valid value. - Test values only behave deterministically in the sandbox. In production they are subject to normal account validation and will not produce these outcomes.
Next steps
- Webhook Notifications: endpoint setup, signature verification, retries, and idempotency
- Your First Payout: beneficiaries, routes, and the payout request shape
- Error Handling: robust handling of failure paths