Payin errors fall into two categories:
- Synchronous errors — returned immediately as an HTTP error response when your API request is invalid or cannot be processed.
- Asynchronous errors — occur during background payment processing, after the API has accepted your request. These surface on the payin object itself via
latest_errorandstatus_details.reason.
Synchronous Errors
All API error responses follow a consistent format that includes details about what went wrong:
{
"errors": [
{
"code": "error_code",
"source": {
"parameter": "field_name"
},
"title": "Description of what went wrong"
}
],
"successes": [
{
"resource_type": "payin",
"resource_id": "f1fde464-a8bc-4579-9f29-f21047316709",
"message": "payin created successfully"
}
]
}
Each object in the errors array has three fields:
code— identifies the type of error (see table below).source— the specific field or parameter that caused the error. It can be a path to a specific field in the request body, or a general description of the issue.title— a human-readable explanation of the error.
| Code | Description |
|---|---|
bad_request | The request is malformed or contains invalid parameters. |
decoding | The request body could not be decoded. This could mean that the request body is not valid JSON or that the request body is too large. |
internal_error | An internal error occurred while processing your request. |
invalid_action | The action you are trying to perform is not valid for the current status of the payin. |
invalid_amount | The amount provided is not valid. |
invalid_bank_account | There's something wrong with the Banked bank account you're trying to use for this payin. |
invalid_currency | The currency provided is not valid. |
invalid_expiration_format | The expiration date provided is not valid. |
invalid_expiration | The expiration date provided is not valid. |
invalid_idempotency_key | The idempotency key provided is not valid. This could mean that you tried to reuse an idempotency key that was already used for a different request. |
invalid_redirect_url | The redirect URL provided is not valid. |
invalid_ref_resource | A referenced resource (e.g. bank account, mandate) is invalid or does not exist. |
invalid_reference | The reference provided is not valid. |
invalid_request | The request is invalid or malformed. Check Source and Title to understand what's wrong. |
method_not_allowed | The HTTP method used for the request is not allowed for the endpoint you're trying to access. |
not_found | You're trying to use a resource that doesn't exist or has been deleted (e.g. bank account, mandate, etc.). |
unauthorized | The request is missing authentication credentials or the provided credentials are invalid. |
Optionally, for the case when you sent a request to create a payin with a list of actions to be taken on it you can also receive a list of successes in the response. This list contains the actions that were successfully executed. For example, if the payin was created but the first action fails, you will receive the ID of the created payin.
Asynchronous Errors
Asynchronous errors are errors that happen during background processing of the payin. These errors surface in two ways:
- on the
latest_errorfield of the payin - if the payin reached the status
FAILED, additional detail is available in thestatus_details.reasonfield of the payin
Latest Error
The latest_error field contains the latest error that occurred during the processing of the payin. This field is updated when a new error occurs. The latest_error field is only present if there was an error during processing. It can also be reset to null if the error is resolved through the actions you or the customer take on the payin.
Retryable Errors
When a payin reaches a FAILED state, check next_actions.completion_paths to determine your options. If retry_payment is present, the payment can be reattempted without creating a new payin — otherwise you will need to create a new payin.
Retry is only available for payments made against an active mandate. It will never appear in next_actions for single payments.
Retry Limits
The following retry limits apply per payment within the associated mandate's validity window:
- Up to 10 retries in total
- Up to 5 retries within any 24-hour period
Once the total retry limit has been reached, retry_payment will no longer appear in next_actions.
When to Retry
Not all failures warrant an immediate retry. Use the latest_error code to guide your approach.
For PAYER_ACCOUNT_INSUFFICIENT_FUNDS, an immediate retry is unlikely to succeed — contact the customer or allow time for sufficient funds to become available before reattempting.
For transient failures such as PAYMENT_SETTLEMENT_BANK_UNAVAILABLE, no customer action is required. You can retry after a short delay or once the issue has resolved.
Retryable Error Codes
Errors that may produce a retry_payment action include:
| Code | Description |
|---|---|
BANK_REJECTED | Payer Bank Has Declined |
MANDATE_EXPIRED | Mandate Expired |
MANDATE_INELIGIBLE_AMOUNT_EXCEEDED | Amount Requested Exceeds Mandate Limit |
PAYER_ACCOUNT_BLOCKED | Payer Account is Blocked |
PAYER_ACCOUNT_INSUFFICIENT_FUNDS | Payer Account Has Insufficient Funds |
PAYER_ACCOUNT_LIMIT_EXCEEDED | Payer Account has Exceeded Its Transaction Limit |
PAYMENT_SETTLEMENT_BANK_UNAVAILABLE | Bank Settlement System Failed or Was Offline |
PAYMENT_SETTLEMENT_FAILURE | Payment Failed Due to Settlement Error |
PAYMENT_SETTLEMENT_TIMEOUT | Payment Failed Due to Timeout |
UNKNOWN | An Unexpected Error Occurred. Contact Banked for More Info. |
See Payin Retry for the API call.