Error response format
When an error occurs,data is null and the errors array contains one or more error objects:
Error codes
| Code | HTTP | Description | Retryable |
|---|---|---|---|
AUTHENTICATION_REQUIRED | 401 | Missing or invalid API key | No |
INSUFFICIENT_SCOPE | 403 | Key lacks the required scope | No |
MERCHANT_NOT_IN_PORTFOLIO | 403 | Merchant exists but belongs to a different org | No |
RESOURCE_NOT_FOUND | 404 | Merchant, statement, or export not found | No |
VALIDATION_ERROR | 422 | Invalid query parameters (bad date, pagination, etc.) | No |
RATE_LIMIT_EXCEEDED | 429 | Over the request limit for your key | Yes |
UPSTREAM_UNAVAILABLE | 503 | Data source temporarily down | Yes |
SERVICE_UNAVAILABLE | 503 | Service-level issue | Yes |
INTERNAL_ERROR | 500 | Unexpected server error | Yes |
Retry strategy
For errors with"retryable": true, use exponential backoff:
Validation errors
VALIDATION_ERROR responses include a field property indicating which parameter failed:
Tips
- Always check
errors.length > 0before accessingdata - Use
meta.request_idwhen contacting support — it uniquely identifies the request - For
429responses, prefer theretry_after_secondsvalue over a fixed delay - For
503responses, retry with exponential backoff (1s, 2s, 4s)