2xx status and a JSON body. Use the
code field to decide what to do. Treat message as English fallback text
that can change.
Error response format
Most Partner API endpoints return this body:code is omitted when a response has no stable code, for example most 422
validation errors. Codes are a public contract. Bitwage can add new codes, so
handle unknown codes with your generic error path.
Legacy error body
Some older endpoints return a simpler body withoutrequest_id or code:
400:
POST /api/user/createPOST /api/user/updatePOST /api/user/payer/create,/updateand/deletePOST /api/user/kyc-initiate
{field: [messages]} object. Read
the body defensively: look for message, then error, then the raw body.
HTTP status codes
For
500 and 502, the body contains a generic message that includes the
request_id. It does not include a code you can branch on beyond
unexpected-error.
Validation errors (422)
A422 response puts every failing field under schema. message is the
first error in that tree.
worker.email on
POST /api/company/{company_id}/recipients/create is reported under
schema.worker.email.
Authentication and permission errors
All return403.
With API key authentication, a
company_id or user_id in the query string
or JSON body that you do not own produces invalid-api-key, not a
404. If a known-good key suddenly fails on one request, check the IDs.
IDs in the URL path return partner-company-not-found instead.Idempotency errors
See the Idempotency guide.
Only successful responses are stored against a key. If a request fails, retry
it with the same key and it runs again.
Errors by lifecycle step
Company onboarding
Recipients (contractors, employees, vendors)
Distributions
Payroll
POST /api/company/payroll/create validates the whole request and returns
422 with the failing field under schema. These are the messages you can
expect. They don’t have a code; match on the field and handle unknown
messages generically.
Payroll status
Retrying safely
- Check
data.retryable.falsemeans the same request will fail the same way.truemeans a provider failed and a retry can succeed. - Reuse the
Idempotency-Keyon every retry of a write request. If the first attempt did succeed but you never got the response, you get the stored response back and no second side effect. - Back off on
500and502. Wait and retry a few times, then contact support with therequest_id. - Don’t retry
4xxresponses other than a400withdata.retryable: true. Fix the request instead.