Errors

The error response body, the error types, and when to retry.

Error body

A failed request returns an HTTP status code and a JSON body with two fields:

{
  "type": "CLIENT_ERROR",
  "message": "connection not found"
}
FieldDescription
typeThe error category. See Error types.
messageA human-readable explanation.

API responses carry an X-OF-Request-ID header. Include it when you contact support. Requests the gateway rejects (see below) do not have it.

Validation errors

When the request body or query fails validation, the response is 400 with type: CLIENT_ERROR, and message is a JSON-encoded list with the first problem found:

{
  "type": "CLIENT_ERROR",
  "message": "[\"\\\"paymentInformation\\\" is required\"]"
}

Rejected before reaching the API

A missing, malformed or expired access token is rejected by the gateway with 401 and a body without type:

{ "message": "Unauthorized" }

Request a new token (see Access Tokens) and retry.

Error types

HTTPtypeMeaningWhat to do
400CLIENT_ERRORThe request is invalid, for example a missing field or an unknown ID format.Fix the request. message names the problem.
400, 422VALIDATION_ERRORA value failed a business rule.Fix the value named in message.
400PROVIDER_UNAVAILABLEThe bank is not accepting new consents or payments right now.Check status.consents.enabled or status.payments.enabled in GET /providers, then try later or offer another bank.
401UNAUTHORIZED, CLIENT_ERRORThe token is missing, invalid or expired.Request a new token.
403FORBIDDEN, CLIENT_ERRORThe token is valid but not allowed to do this, for example a missing scope or a resource of another user.Check the token's scopes and the user it belongs to.
404NOT_FOUND, CLIENT_ERRORThe resource does not exist for this user.Check the ID.
405METHOD_NOT_ALLOWEDThe mandate cannot be cancelled in its current status. In the sandbox, payments and mandates return CANCELLATION_INVALID or SERVICE_INVALID instead.Read the status before cancelling.
409CLIENT_ERRORThe request conflicts with the resource's state, for example a mandate that was already started.Read the resource's status before acting.
422UNPROCESSABLE_ENTITYThe resource's state does not allow this call, for example a connection status that is not valid for the route.Read the resource's status before acting.
429TOO_MANY_REQUESTSOnly on the public mandate link start endpoint. By default a link accepts 30 requests a minute from one IP address and 120 a minute in total.Wait a minute and retry.
500INTERNAL_ERRORAn unexpected error on our side.Retry with backoff. If it repeats, contact support with the X-OF-Request-ID.
500, 502, 504PROVIDER_ERRORThe bank returned an error or did not answer.Retry later. If it repeats, contact support.

When to retry

  • Retry 5xx responses and PROVIDER_ERROR with exponential backoff.
  • Do not retry 4xx responses unchanged. Fix the request first, except for 429.
  • A payment the bank rejected is not an HTTP error. The request succeeds and the payment status is RJCT. See Payment Statuses.

Did this page help you?