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

ScenarioHTTP status codeBody codeHow to handle
Business error, such as a resource that does not exist or a resource status that does not allow the operation400500Handle it according to the message. Do not retry it unchanged
Parameter validation failed400404Fix the request parameters according to the message
Unauthorized, or invalid token401—Get a new access token
Internal service error500—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

  1. Check the HTTP status code first, then the message in the response body.
  2. On a 401, get a new token.
  3. On a 400, check the request headers, Idempotency-Key, and data formats against the Conventions.
  4. Record the traceId, and provide it when you contact technical support.

On this page