Errors
Error format, codes, and how to handle them.
Errors use standard HTTP status codes and a JSON body:
{ "code": "SLUG_NOT_FOUND", "message": "SLUG_NOT_FOUND" }Branch on code, not on the status or message. message repeats the code and is not meant for customers.
Every response carries an X-Request-Id header. Include it when you contact us about a request.
Codes
| Status | Code | What to do |
|---|---|---|
| 400 | INVALID_INPUT | Fix the request: invalid JSON, a missing or invalid field or header, or an unknown field. |
| 400 | BODY_TOO_LARGE | The body is larger than 8 KiB. |
| 401 | UNAUTHORIZED | Check the API key. See Authentication. |
| 404 | ORDER_NOT_FOUND | No order with this ID belongs to you. |
| 409 | IDEMPOTENCY_CONFLICT | The idempotency key was used for a different order. See Idempotency. |
| 409 | ORDER_IN_PROGRESS | The first request with this key is still running. Retry after Retry-After seconds. |
| 409 | MERCHANT_DISABLED | Your account or this pay link is disabled. Contact us. |
| 422 | SLUG_NOT_FOUND | slug is not one of your pay links. |
| 429 | RATE_LIMITED | Slow down and retry with backoff. See Rate limits. |
| 500 | INTERNAL_ERROR | Retry with the same idempotency key. Contact us if it persists. |
| 503 | PAYMENTS_PAUSED | Payments are paused for now. Retry later. |
| 503 | QUOTE_UNAVAILABLE | The exchange rate is unavailable. Retry later. |
| 503 | WALLET_UNAVAILABLE | The invoice could not be created. Retry with the same idempotency key. |
| 503 | PAYMENTS_UNAVAILABLE | Temporary failure. Retry with the same idempotency key. |
503 PAYMENTS_NOT_CONFIGURED and 503 WALLET_NOT_CONFIGURED mean the service is misconfigured on our side. Retry later and contact us if it persists.
When order creation fails, no order is saved. You can safely retry with the same idempotency key, or show the customer an error and let them try again.