code for programmatic handling, and message for logging.
Error Envelope
Every error response hassuccess: false and an error object:
| Field | Description |
|---|---|
error.code | Stable, machine-readable error code. Branch on this in your code. |
error.message | Human-readable description. Use for logs and debugging, not for control flow. |
error.metadata.errors | Present on validation failures (400). An array of per-field problems. |
HTTP Status Codes
| Status | Meaning | Notes |
|---|---|---|
200 / 201 | Success | Request processed; resource created on 201. |
400 | VALIDATION_ERROR | Malformed or invalid input. Field-level details in error.metadata.errors. |
401 | NO_TOKEN / INVALID_TOKEN | Missing, malformed, or expired access token. Branch on the status, not the code. |
403 | Forbidden | Authenticated, but insufficient permission for this action. |
404 | Not found | Resource does not exist or belongs to another tenant. |
409 | IDEMPOTENT_REQUEST_IN_PROGRESS | A request with the same idempotency key is still in flight. |
410 | Gone | Resource expired or revoked (e.g. PAYMENT_LINK_EXPIRED). |
422 | Unprocessable | Request is well-formed but cannot be fulfilled. |
500 | Internal error | Server-side issue (rare). Safe to retry idempotent requests. |
503 | IDEMPOTENCY_STORE_UNAVAILABLE | Idempotency store temporarily down. Retryable. |
Validation Errors (400)
A400 indicates the request body or parameters failed validation. The error.metadata.errors array pinpoints each offending field, so you can surface precise feedback.
Cross-Tenant Access Returns 404
If you request a resource that exists but belongs to another merchant, Quidkey returns404, not 403.
Authentication & Permission Errors
| Code / Status | Meaning | Resolution |
|---|---|---|
401 (NO_TOKEN / INVALID_TOKEN) | Missing or expired token | Refresh your access token and retry. See Authentication. |
403 Forbidden | Token lacks the required permission | Verify the credentials have access to this operation. |
404 Not found | Resource missing or cross-tenant | Check the ID; confirm it belongs to your merchant. |
Error Codes
Branch on these stableerror.code values:
| Status | error.code | Meaning |
|---|---|---|
400 | VALIDATION_ERROR | Request body or parameters failed validation. Field-level details in error.metadata.errors. |
409 | IDEMPOTENT_REQUEST_IN_PROGRESS | A request with the same idempotency key is still in flight. Retry with the same key. |
410 | PAYMENT_LINK_EXPIRED | The payment link has passed its expiry. |
410 | PAYMENT_LINK_NOT_ACTIVE | The payment link is not in an active state. |
422 | MISSING_CONVERTED_AMOUNT | A required converted amount was not supplied. |
503 | IDEMPOTENCY_STORE_UNAVAILABLE | Idempotency store temporarily down. Retryable. |
Handling Errors
Body abbreviated. See the Redirect guide for the full required payload.
Retry guidance: retry
409, 503, and 500 with exponential backoff. Do not blindly retry 400, 401, 403, 404, or 410; fix the request or credentials first.Next Steps
Idempotency
Safe retries for create requests
Authentication
Resolve 401 errors with token refresh
Amounts & Currencies
Avoid the most common validation error
API Reference
Response format and conventions