Response Errors
API Error format and codes
Error Response Format
Requests resulting in an error response will contain an HTTP status code, error message, and an error code for non-authentication related errors.
HTTP Status Codes
While the samples below show HTTP Status Codes that indicate errors, a
200
status code can indicate the request body is valid, but the end result was not successful. Examples are show in the API specification.Scenarios include but are not limited to:
- Attempts to add bank accounts that are invalid
- Attempts to add debit cards that are invalid or not supported
- Declined transactions
401
- Invalid authorization token
{
"http_status": 401,
"error_message": "401 UNAUTHORIZED"
}
403
- Forbidden access to a resource of feature
{
"http_status": 403,
"error_message": "403 FORBIDDEN"
}
400
- Invalid or missing parameters in the JSON request body
{
"http_status": 400,
"error_code": "ERR_INVALID_RECIPIENT_ID",
"error_message": "Invalid recipient ID"
}
404
- Resource or entity not found
{
"http_status": 404,
"error_code": "ERR_INVALID_ACCOUNT_ID",
"error_message": "Invalid account ID"
}
422
- Unable to process due to business constraints
{
"http_status": 422,
"error_code": "ERR_PAYMENT_MAX",
"error_message": "Payment amount is greater than max amount"
}
Updated over 1 year ago