Errors
Send Accept: application/json on every request your backend makes. Without it, failures are rendered
as an HTML error page and none of the JSON shapes below apply. The single exception is
GET /oauth/authorize, which the user's browser navigates to — see
Authentication.
Note also which success code you get: POST /payments/v2/payout, POST /payments, POST /payments/debit,
both template creations, POST /payment-requests/v1/users and POST /payment-requests/v1/users/{uid}/fund
answer 201, everything else answers 200. Creating a record is not the rule —
POST /payment-requests/v1/single, POST /payment-requests/v1/bulk,
POST /payment-requests/v1/users/{uid}/payout and POST /oauth/employee-invitations create records and
still answer 200. Provisioning a system user answers 200 when the email already belongs to one of yours,
because nothing was created that time. Treat any 2xx as success rather than matching 200 exactly.
The three shapes
An HTTP error with a numeric code in message
Permission and precondition failures return a 4xx status, and the body carries the numeric code as a
string in message — there is no separate code field:
{ "message": "2000" }
Match on that value, not on any text: it is stable across releases.
Not every 4xx carries a code. Token problems are rejected before the payment layer is reached and come back
as {"message": "Unauthenticated."} — see Authentication.
A successful HTTP response with a failed payout
A payout that is accepted for processing and then rejected still answers with a success code — 201 when
it was just created, 200 on a status lookup. The outcome lives in the body, not in the status line:
{
"data": {
"id": 15832,
"request_id": "your-unique-request-id",
"status": 3,
"err_msg": "3000"
}
}
status |
Meaning |
|---|---|
1 |
Processing — poll again |
2 |
Success |
3 |
Failed — read err_msg |
status is always a number. The JSON type of err_msg depends on which endpoint answered: creating
a payout returns it as a number (3000), a status lookup returns the same value as a string ("3000").
Cast before comparing — a strict === breaks on one of the two.
Never treat a success code as "money moved": always read status, and on 3 read err_msg.
Validation — HTTP 422
Field-level validation uses the standard shape:
{
"message": "The request id has already been taken.",
"errors": {
"request_id": ["The request id has already been taken."],
"data.0.amount": ["The amount must be a number."]
}
}
message is not a fixed sentence — it repeats the first failed message and, when more than one
field failed, appends the count: (and 1 more error) for two failures, (and 3 more errors) for four.
The word is singular or plural depending on the number, so do not match the suffix by the literal
more errors. Branch on errors, keyed by the field you sent and dotted for arrays (data.0.wallet);
treat message as display text only.
On /oauth* these texts are translated — see Overview — which is one more reason to
read errors rather than parse message.
Partner endpoints answer with the shapes above and nothing more — never rely on stack traces or debug fields being present.
What status means where
The word status appears in six places and means something different in each. Nothing here shares a
scale, so never reuse a comparison between endpoints:
| Where | Values |
|---|---|
Payout — /payments*, field data.status |
1 processing · 2 success · 3 failed |
Batch record — data.payout.status of /payment-requests/v1 |
same column as above, but about processing: 1 running · 2 processing finished · 3 gave up. Not a verdict on the money |
Batch entry — data.draft_payment_request.status |
1 success · 2 error — inverted compared to a payout, there is no third value |
The withdrawal itself — data.payment_request.status |
a string: new · pending · waiting · success · error · reject |
Employee payment — status of /payments/v2/employee-payments |
a string: completed · pending |
Employee invitation — status of /oauth/employee-invitations |
1 invited · 2 accepted |
Error code reference
| Code | Meaning | Where it appears |
|---|---|---|
1000 |
The token is valid, but no account is bound to the client | 401 on any partner endpoint. Not returned for missing or expired tokens — those give Unauthenticated. |
2000 |
The client's account is not a company account | 403 on any partner endpoint |
3000 |
Company balance is below the requested amount | err_msg on a payout |
4000 |
Unhandled server-side error — reported internally, safe to retry | 400 on payout requests and template creation, or err_msg. A template refused by the payment provider is not this code: that is 406 with errors and no message |
5000 |
Debit transactions are disabled for this client | 403 on POST /payments/debit |
6000 |
Company has no exposed transactions to pay from | err_msg on POST /payments/debit only — this code and the two below belong to the debit direction, never to a payout |
7000 |
Exposed transactions total less than the requested amount | err_msg on POST /payments/debit only |
8000 |
The balance is below the requested amount | err_msg on POST /payments/debit, and 400 on POST /payment-requests/v1/single and POST /payment-requests/v1/users/{uid}/payout. On those two the amount limit is validated first, so this code is the narrow case where the funds went away in between — an amount above the balance is 422 |
9000 |
No B2B partner found for the payout route | err_msg on a payout |
10000 |
Reserved. Not currently returned by any endpoint | — |
11000 |
No active company wallet for the requested region and currency | 403 on every endpoint that takes region and currency. Always the HTTP status, never an err_msg: the request is refused before a payout record exists |
11001 |
The recipient belongs to a user of a different network (MCN). Enforced for specific integrations only. On a payout the check runs on the whole request — one foreign recipient refuses all of them | 403 on POST /payments/v2/payout (by recipient wallet) and on POST /payments/v2/employee-payments (by recipient email). Also 403 on the deprecated POST /payments, which carries the same recipient wallets. Batches and templates never raise it — they pay out to a template of the company's own wallet, so there is no recipient user to check. On POST /payments/debit the same restriction is enforced for every client, not only for enforced ones, and it surfaces as a 422 on the wallet field instead |
12000 |
Payment method is not enabled for the partner API on this wallet | 403 on reading (GET) and deleting (DELETE) a payout template, of your company or of a system user alike. Creating a template with such a method fails validation with 422 instead |
12010 |
Payout template is unavailable — deleted, belongs to another wallet, or its method is no longer enabled for the partner API | err_msg of a batch entry. On calculate and single the same situation is caught by validation instead — 422 on template_id, never this code |
12011 |
Template data no longer passes the payment method's field validation | 403 on calculate, single and a system user payout, err_msg of a batch entry |
12012 |
Account is not allowed to withdraw. On calculate, single and bulk that means KYC; per batch entry the check is wider — KYC and a confirmed email and enabled two-factor authentication |
403 on calculate, single and bulk, err_msg of a batch entry |
12020 |
Exchange calculation failed | 400 on calculate and single, err_msg of a batch entry |
12021 |
Payout amount is below the minimum for the payment method | err_msg of a batch entry |
12022 |
Payout amount is above the maximum for the payment method, or above the balance available for it | err_msg of a batch entry |
13000 |
The email already belongs to an account that is not a system user of your network — an ordinary Garna account, or a system user of another network | 409 on POST /payment-requests/v1/users. Creating a system user is idempotent by email within your network otherwise: a repeated request returns the existing user with 200 instead of 201 |
14000 |
Identity verification is not available for this system user | 403 on POST /payment-requests/v1/users/{uid}/kyc-start |
14001 |
The verification provider did not accept the request — reported internally, safe to retry | 502 on POST /payment-requests/v1/users/{uid}/kyc-start |
14002 |
Your network requires a verification step this API cannot complete — an address check with a provider that does not support it, or an additional document, which is uploaded in the dashboard only | 403 on POST /payment-requests/v1/users/{uid}/kyc-start. The session is not opened at all: its result would not make the person verified. Ask us to review the network's verification settings |
15000 |
The system user has no wallet behind the company wallet resolved from region and currency |
422 on the system user's payment methods, payout templates and funding. Distinct from 11000, which is about the company wallet and answers 403 |
15001 |
The system user has not passed identity verification | 403 on creating a payout template for a system user, on calculating and on paying one out |
15002 |
The system user's identity is already approved, so their details are fixed | 409 on PUT /payment-requests/v1/users/{uid}. Corrections are accepted only while the identity step is not approved |
16000 |
Another money operation of your company still holds the lock — nothing was created, repeat the request after Retry-After |
429 with Retry-After on funding, payouts, single, bulk, POST /payments/v2/payout and legacy /payments. In practice it takes a batch of the same company running in parallel. Distinct from a rate-limit 429, which carries Too Many Attempts. instead of a code |
Note that a
regionandcurrencypair passes validation whether or not your company has a wallet behind it — including on transaction export. A pair with no wallet is refused with403and11000.
Retrying
4000 is the only code that means "our side, try again". Everything else is a decision — a balance, a
permission, a KYC state, an amount limit — and retrying the same request unchanged will produce the same
result.
Do not blind-retry a payout after a network error. request_id is yours, 16–255 characters, and
sending the same one twice is rejected with 422 — that uniqueness is what protects you from paying
twice, but it also means a retry is not idempotent and will not return the original payout.
The scope of that uniqueness differs by endpoint, and the two families do not share a counter, so the same value can be accepted twice if you send it to both:
| Endpoints | request_id must be unique |
|---|---|
POST /payments/v2/payout, legacy POST /payments and POST /payments/debit, POST /payments/v2/employee-payments, POST /payment-requests/v1/users/{uid}/fund |
Globally — a value another integration already used is refused too |
POST /payment-requests/v1/single, POST /payment-requests/v1/bulk, POST /payment-requests/v1/users/{uid}/payout |
Within your company |
Keep one identifier space of your own across both families rather than relying on ours: prefixing your values is what makes a retry safe to reason about.
Provisioning a system user is the one exception in this API: it is idempotent, by email within your
network, so a retry after a lost response returns the same user with 200. Everything that moves money,
including funding a system user, keeps the request_id rule above.
On POST /payments/v2/employee-payments request_id is optional — and that is exactly why it matters:
send it, or a retry after a timeout pays twice with nothing to look the first attempt up by.
A 429 is the other retryable answer: the endpoint's rate limit was exceeded, and Retry-After says how
many seconds to wait — see Overview.
After a timeout or a connection error, resolve the state first:
curl "$BASE_URL/payments/v2/status?request_id=<your request id>" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Accept: application/json"
Read the answer as follows:
200— the payout exists; read itsstatusinstead of resending.422with an error onrequest_id— it was never created; send it again, reusing the samerequest_id.404— a payout with thisrequest_idexists but belongs to another client or another payout type. The body is{"message": "Not found."}and says nothing more; resending will fail validation, so investigate rather than retry.
Where to go next
- Authentication — the two layers behind
401and403, and how to tell them apart - Payouts and transfers — where
3000,11000and the other payout codes come from - Single and bulk requests — per-entry
err_msgof a batch - System users — where
13000to15002come from, step by step - Endpoints: Payouts · Payout requests · System users — which codes each call can answer with, response by response