Skip to main content

Error Handling

When a request fails, the API returns a JSON object with a consistent structure.

Error Format

Error Codes

Examples

Fix: Check your query parameters. limit must be between 1 and 100, and page must be 1 or greater.
Fix: Verify that the X-API-Key header is present and contains a valid, active key.
Fix: Your key is valid but lacks the scope that endpoint requires. Keys are created with full access today, so this error should not appear; if you see it, contact support. See Authentication.
Fix: Verify that the resource ID exists and belongs to your merchant account.
Fix: Wait for the duration indicated in the Retry-After header before retrying. See Rate Limiting for best practices.
422 errors use a different format: detail is an array of objects (Pydantic/FastAPI format), not a string.
Fix: Check your request body. See the API Reference for required fields.
Fix: An internal service failed. Your request is valid — retry after a few seconds. If the issue persists, contact support.
Fix: This is a server-side issue. Retry after a brief delay. If the problem persists, contact developer support.

Handling Errors in Code