API reference

HTTP 500 Internal Server Error

A 500 Internal Server Error means an unexpected error occurred on our side. The response body is the standard <a href="/reference/error-envelope-and-status-codes/">error envelope</a> with type: api_error. This is retry-able with backoff.

2 min read

500Internal Server Error
api_errorerror.type
RetryHandling

What it means

An unexpected error occurred on our side.

Common causes

A transient fault in the platform. It is not caused by your request being wrong.

Example response

{
  "error": {
    "type": "api_error",
    "code": "api",
    "message": "An unexpected error occurred on our side."
  }
}

How to handle

Retry with exponential backoff. If it persists, contact support with the request id.

Honour the Retry-After header and see Retrying failed requests.

Where it sits in the error model

A 500 is one of the api_error class of responses. On the Credicorp API the HTTP status is only the broad classification; the exact reason travels in error.code, and — for field-level problems — the offending input is named in error.param. Build your handling around the code, not the wording of error.message, which may be refined over time.

Because this class is transient, a well-behaved client retries it automatically with exponential backoff and jitter, so an occasional blip never surfaces to the user. Distinguish it clearly from the fix-the-request classes (400, 422) which must never be retried blindly.

Frequently asked questions

Should I retry a 500?

Yes — with exponential backoff. This class is transient.

Where is the specific reason?

In error.code and, for field errors, error.param. The HTTP status is the class; the code is the specifics.

Is the response body always JSON?

Yes — API errors are always the JSON error envelope. HTML back means you hit an edge/proxy layer, not the API.

Funding for UK limited companies

Credicorp lends to your company, not to you personally — short-term working capital with no personal guarantee. See what your business could access.