Error codes
The error response format, how HTTP status codes map to the code in the response body, and how to handle each error.
Determine whether a request succeeded
Use the HTTP status code to determine whether a request succeeded. The code in an error response body is not always the same as the HTTP status code.
Success response:
{
"code": 200,
"message": "OK",
"traceId": "trace-uuid-string",
"data": {}
}Error response:
{
"code": 500,
"message": "Payment intent not found: pi_MNOL0POUV8IDPXCD",
"traceId": "trace-uuid-string"
}HTTP status codes and body code
| Scenario | HTTP status code | Body code | How to handle |
|---|---|---|---|
| Business error, such as a resource that does not exist or a resource status that does not allow the operation | 400 | 500 | Handle it according to the message. Do not retry it unchanged |
| Parameter validation failed | 400 | 404 | Fix the request parameters according to the message |
| Unauthorized, or invalid token | 401 | — | Get a new access token |
| Internal service error | 500 | — | Contact Stabo technical support and provide the traceId |
The message states the specific reason. When you contact technical support, provide the traceId from the response.
Errors when you get a token
If X-Tenant-ID or X-Tenant-Type is missing, the token endpoint returns invalid_client. See Authentication.
Errors by product
For the status and reason enums of each product, see the appendix of the product guide, for example the Checkout status reference. On-Ramp business errors are identified by data.errorCode in the response body. See On-Ramp business errors.
Troubleshooting tips
- Check the HTTP status code first, then the
messagein the response body. - On a 401, get a new token.
- On a 400, check the request headers,
Idempotency-Key, and data formats against the Conventions. - Record the
traceId, and provide it when you contact technical support.