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"
}| Field | Description |
|---|---|
type | The error category. See Error types. |
message | A 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
| HTTP | type | Meaning | What to do |
|---|---|---|---|
400 | CLIENT_ERROR | The request is invalid, for example a missing field or an unknown ID format. | Fix the request. message names the problem. |
400, 422 | VALIDATION_ERROR | A value failed a business rule. | Fix the value named in message. |
400 | PROVIDER_UNAVAILABLE | The 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. |
401 | UNAUTHORIZED, CLIENT_ERROR | The token is missing, invalid or expired. | Request a new token. |
403 | FORBIDDEN, CLIENT_ERROR | The 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. |
404 | NOT_FOUND, CLIENT_ERROR | The resource does not exist for this user. | Check the ID. |
405 | METHOD_NOT_ALLOWED | The 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. |
409 | CLIENT_ERROR | The request conflicts with the resource's state, for example a mandate that was already started. | Read the resource's status before acting. |
422 | UNPROCESSABLE_ENTITY | The 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. |
429 | TOO_MANY_REQUESTS | Only 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. |
500 | INTERNAL_ERROR | An unexpected error on our side. | Retry with backoff. If it repeats, contact support with the X-OF-Request-ID. |
500, 502, 504 | PROVIDER_ERROR | The bank returned an error or did not answer. | Retry later. If it repeats, contact support. |
When to retry
- Retry
5xxresponses andPROVIDER_ERRORwith exponential backoff. - Do not retry
4xxresponses unchanged. Fix the request first, except for429. - A payment the bank rejected is not an HTTP error. The request succeeds and the payment status is
RJCT. See Payment Statuses.
Updated about 14 hours ago
Did this page help you?
