Requirements
HTTP responses
Handle 200 responses
Although an HTTP response status code of200 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
pspReferencein this notification is the same as thepspReferencein the capture modification response. - The
successfield value is false, and thereasonfield includes a short message to explain the cause of the failure.
- The
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 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 thepspReference 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

