SDK / API Reference
Errors
API error codes and responses
All errors follow a consistent format:
{
"error": "error_code",
"message": "Human-readable description",
"status": 400
}Error Codes
| Status | Error Code | Description |
|---|---|---|
400 | bad_request | Missing or invalid request body |
401 | unauthorized | Missing, invalid, or expired API key |
403 | forbidden | API key lacks required scope |
404 | not_found | Resource not found or not accessible |
413 | payload_too_large | Request body exceeds 2MB limit |
429 | rate_limited | Too many requests (200/min per project, 60/min per IP) |
500 | internal_error | Server error |
Common Scenarios
Missing required field
{
"error": "bad_request",
"message": "amount and resource are required",
"status": 400
}Payment not found
{
"error": "not_found",
"message": "Payment not found",
"status": 404
}This also occurs when trying to access a payment that belongs to a different project.
Scope violation
{
"error": "forbidden",
"message": "Missing required scope: payments:accept",
"status": 403
}Rate limited
{
"error": "rate_limited",
"message": "Too many requests",
"status": 429
}