Skip to main content
After submitting an API call to Adyen, you receive a response to inform you that your request was received and processed. Depending on the HTTP status code of the response, you can build logic to handle errors.

Requirements

HTTP responses

Handle 200 responses

Although an HTTP response status code of 200 means that the request was submitted correctly and Adyen processed it successfully, it does not necessarily mean that the payment or modification request was successfully executed. When the payment response includes a resultCode with a value of Refused or Error, a refusalReason field is added. Check the refusal reason messages to learn more about the possible issues with payment or modification requests. For example:
  • You send a capture payment request.
  • The response to your capture request returns an HTTP response status code of 200. This means:
    • We received your request.
    • We will execute a payment capture.
    • We still do not know if the capture operation will be successful or not.
    • We will let you know in the corresponding webhook event.
  • If the capture operation fails, for example, because the acquirer declines to accept the shopper’s card, the payable amount for the transaction is not collected.
  • Based on your settings, you’ll receive a webhook message that includes the information about this capture example:
    • The  pspReference in this notification is the same as the  pspReference in the capture modification response.
    • The success field value is false, and the reason field includes a short message to explain the cause of the failure.

Handle 4xx and 5xx responses

In the following scenarios, the Adyen payments platform does not accept or store submitted requests:
  • The request does not pass validation.
  • The request violates a security constraint.
  • The request violates a configuration constraint.
  • An internal error occurs on the Adyen payments platform.
In these cases, you receive an error message with an error code containing a description of the problem.
In general, you should handle it as an exception.
There is no charge for rejected payment requests accompanied by an error message.

Debugging APIs

While building your integration into the Adyen APIs, you can reach out to us if you need additional help. If you contact our Support Team, provide the pspReference returned in the header of the API response. The pspReference is a unique ID for that specific API request, and can be used by our Support Team to identify specific API calls.

Error response fields

In case of an error, the response object contains the following fields: Example error response
For the complete list of error codes and corresponding messages, see Error codes and messages.

See also