API errors
Errors return JSON with error_code, message, details, request_id and doc_url (a link to the page for that code). Quote the request_id if you contact us.
| Code | HTTP | Retry? | Meaning |
|---|---|---|---|
| UNAUTHENTICATED | 401 | No, fix first | The Authorization header is missing, malformed, or the key is unknown or revoked. |
| FORBIDDEN | 403 | No, fix first | The key is valid but the request names a merchant_id that does not match the key. |
| PLAN_REQUIRED | 403 | No, fix first | The plan does not allow this: a live key (vl_live_) needs a paid plan, or the plan’s merchant limit is reached. |
| VALIDATION_ERROR | 400 | No, fix first | The request body or parameters failed validation, for example a non-integer amount or an unknown currency. |
| IDEMPOTENCY_CONFLICT | 409 | After a wait | This Idempotency-Key was already used with a different request body, or the first request with it is still running. |
| NOT_FOUND | 404 | No, fix first | No transaction with that ID exists for this key’s account and environment. |
| ALREADY_REFUNDED | 409 | No, fix first | The line has already been refunded in full. |
| INSUFFICIENT_REFUNDABLE | 422 | No, fix first | The refund asks for more units than remain on the line, or would come to zero (for example a line that was free). |
| RATE_LIMITED | 429 | After a wait | Too many requests a minute for this key’s plan. |
| QUOTA_EXCEEDED | 429 | After a wait | The month’s operations allowance for the plan is used up. Reads and replays still work. |
| SERVICE_UNAVAILABLE | 503 | After a wait | A dependency (database or rate-limit store) is not reachable, so the API refuses writes rather than risk a wrong result. |
| INTERNAL_ERROR | 500 | Yes | Something failed on our side. Calculations and refunds are written in one database transaction, so a failed write leaves nothing half-done. |