--- title: "Refund" description: "Refund a payment back to the shopper." url: "https://docs.adyen.com/online-payments/classic-integrations/modify-payments/refund" source_url: "https://docs.adyen.com/online-payments/classic-integrations/modify-payments/refund.md" canonical: "https://docs.adyen.com/online-payments/classic-integrations/modify-payments/refund" last_modified: "2021-03-22T09:58:00+01:00" language: "en" --- # Refund Refund a payment back to the shopper. [View source](/online-payments/classic-integrations/modify-payments/refund.md) **Adyen is no longer developing the Classic API integration** This page is for the Classic API integration, which we no longer accept new integrations with. We strongly recommend migrating to the newer [modification endpoints](/online-payments/modify-payments) using the Checkout API integration. To use this newer integration, you must also [migrate to the Checkout API](/online-payments/upgrade-your-integration/migrate-to-checkout-api). ##### Refund in Customer Area You can also refund payments in your Customer Area. For more information, refer to [Manage payments](/account/manage-payments#refund-a-payment). If you want to return the funds to your shopper, for example if they returned an item, you need to make a [/refund](https://docs.adyen.com/api-explorer/#/Payment/refund) request. In your call to the [/refund](https://docs.adyen.com/api-explorer/#/Payment/refund) endpoint, you need to specify the `pspReference` of the original payment. If you want to refund a payment for which you do not have the `pspReference` available, you can also make an [unreferenced refund](#unreferenced-refund). You can only refund a payment after it has already been captured. Payments that have not yet been captured have to be [cancelled](/online-payments/classic-integrations/modify-payments/cancel) instead. ## Refund a payment In your request to the [/refund](https://docs.adyen.com/api-explorer/#/Payment/refund) endpoint, specify:  * `merchantAccount`: The name of your merchant account that is used to process the payment. * `modificationAmount`: The amount that you want to refund. This must be the same as or [less than](#partial-refund) the captured `amount`. * `originalReference`: The original `pspReference` of the payment that you want to refund. This reference is returned in the response to your payment request, and in the AUTHORISATION webhook event. * `reference`: Your reference for the refund, for example for tagging a partial refund for future reconciliation. The `reference` parameter is required for [GrabPay](/payment-methods/grabpay) refunds. ```json { "merchantAccount" : "YOUR_MERCHANT_ACCOUNT", "modificationAmount" : { "value" : 500, "currency" : "EUR" }, "originalReference" : "9313547924770610", "reference" : "YOUR_MODIFICATION_REFERENCE" } ``` You will receive a `/refund` response containing:  * `pspReference`: The PSP reference associated with this `/refund `request. Note that this is different from the PSP reference associated with the original payment request.   ```json { "pspReference" : "8312534564722331", "response" : "[refund-received]" } ``` ### REFUND webhook Once we have processed your refund request, we send you a [webhook](/development-resources/webhooks) with: * `eventCode`: **REFUND**. * `pspReference`: Same as the `pspReference` in the `/refund` response.  * `success`: Indicates whether the refund request was successful. Possible values: * **true**: The refund request was successful. This usually means that the refund was successful. For information on exceptions, refer to [Failed refund exceptions](#failed-refund). * **false**: The refund request failed. The webhook includes a `reason` field with a short description of the problem. Review [the reason](#unsuccessful-refund-request), fix the issue if possible, and resubmit the refund request. ```json { "live":"false", "notificationItems":[ { "NotificationRequestItem":{ "amount":{ "currency":"USD", "value":50 }, "eventCode":"REFUND", "eventDate":"2018-11-01T00:19:34+01:00", "merchantAccountCode":"YOUR_MERCHANT_ACCOUNT", "originalReference":"8313547924770610", "paymentMethod":"visa", "pspReference":"8312534564722331", "reason":"", "success":"true" } } ] } ``` ```json { "live":"false", "notificationItems":[ { "NotificationRequestItem":{ "amount":{ "currency":"USD", "value":50 }, "eventCode":"REFUND", "eventDate":"2018-11-01T00:19:34+01:00", "merchantAccountCode":"YOUR_MERCHANT_ACCOUNT", "originalReference":"8313547924770610", "paymentMethod":"visa", "pspReference":"8312534564722331", "reason":"Transaction hasn't been captured, refund not possible", "success":"false" } } ] } ``` For more information about the included fields, see [REFUND](https://docs.adyen.com/api-explorer/Webhooks/latest/post/REFUND) webhook reference. ## Partial refund With some payment methods, it is also possible to *partially* refund a payment. In case of a partial refund, you only return a part of the captured amount to the shopper.  To partially refund a payment, make a request to the [/refund](https://docs.adyen.com/api-explorer/#/Payment/refund) endpoint, specifying: * `value`: The amount that you want to refund. This must not exceed the captured `value`. You can also perform *multiple* (partial) refunds, as long as their sum doesn't exceed the captured amount. ## Failed refund An overview of failed and reversed refunds is available in your [Payment accounting report](/reporting/invoice-reconciliation/payment-accounting-report). A refund can fail if: * [The refund request is unsuccessful](#unsuccessful-refund-request). * [The refund is rejected by the card scheme](#rejection-by-card-scheme). * [The refund is reversed](#reversed-refunds). ### Unsuccessful refund request When a refund request is unsuccessful, you receive the `success` value **false** in the [REFUND webhook](#refund-webhook). Below are the most common `reason` values in the **REFUND** webhook: The *balance on the payment* refers to the amount that remains from the original payment. For example, if a transaction has a total of EUR 10 and no refund or chargeback is processed, then the balance on the payment is EUR 10. After a refund or chargeback of EUR 3 is processed, the remaining balance on the payment is EUR 7. | `reason` | Description | | -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Requested refund amount too high** | No chargeback or refund has been processed, and the requested refund amount is more than the balance on the payment. | | **Already partially refunded, new requested refund amount too high** | Partial refund(s) has(/have) been processed, and the requested refund amount is more than the balance on the payment. | | **Already partially disputed, new requested refund amount too high** | Partial chargeback(s) has(/have) been processed, and the requested refund amount is more than the balance on the payment. | | **Already fully refunded, no balance available for new requested refund** | Full refund has been processed, and the remaining balance on the payment is 0. | | **Partially refunded and partially disputed, no balance available for new requested refund** | Partial refund(s) and chargeback(s) have been processed, and the requested refund amount is more than the balance on the payment. Partial refund(s) and chargeback(s) have been processed, and the balance on the payment is a negative amount. | | **Already fully disputed, no balance available for new requested refund** | Full chargeback has been processed, and the balance on the payment is 0. A full chargeback and partial refund(s) have been processed, and the balance on the payment is a negative amount. | | **Insufficient in-process funds on account for refunding this payment** | There is not enough [balance](/account/balances) on your merchant account to process the refund. | | **Transaction hasn't been captured, refund not possible** | The refund was requested before the transaction was captured. You need to [cancel](/online-payments/classic-integrations/modify-payments/cancel) the transaction instead or wait until the transaction is settled. | | **The maximum period for this operation has expired** | The refund was requested past the expiration date permitted by the payment method to process the request. | ### Rejection by card scheme Although rare, a refund can fail after you received a [**REFUND** webhook](#refund-webhook) with `success`: **true**. The successful webhook means that the request has been sent to the card scheme, but it can still be rejected by the card scheme at this point. This may happen even a few days after you submitted the refund request. Most of the time Adyen can fix the issue, so that the shopper will eventually receive the funds. Sometimes, however, you need to take action yourself. To learn why a refund can fail and what, if anything, you need to do in each case, refer to [Reasons for failed refund after a `success`:true](/online-payments/classic-integrations/modify-payments/capture/failure-reasons). When a refund fails, we inform you of this with a [webhook](/development-resources/webhooks) containing: * `eventCode`: **REFUND\_FAILED** * `pspReference`: The `pspReference` of the refund request. ### Reversed refund For some payment methods, for example bank transfers, iDEAL, or Bancontact, the status of the payment can change from **Refunded** to **RefundedReversed**. This means that the funds have been returned to Adyen, and are back in your account. For example, this may happen if the shopper's bank account is no longer valid. To resolve these scenarios, check with the shopper the status of their bank account. When a refund is reversed, we inform you of this with a [webhook](/development-resources/webhooks) containing: * `eventCode`: **REFUNDED\_REVERSED** * `success`: **true** ### Testing failed refunds In our test environment, you can check how your integration handles failed refunds: 1. Make a [card payment](/payment-methods/cards), specifying: * `holderName`: **refund failed** ```json { "amount": { "currency": "EUR", "value": 500 }, "reference": "Refund failed test", "paymentMethod": { "type": "scheme", "encryptedCardNumber": "test_4111111111111111", "encryptedExpiryMonth": "test_03", "encryptedExpiryYear": "test_2030", "encryptedSecurityCode": "test_737", "holderName": "refund failed" }, "returnUrl": "https://your-company.example.com/...", "merchantAccount": "YOUR_MERCHANT_ACCOUNT" } ``` 2. Refund this payment, either [in your Customer Area](/account/manage-payments#refund-a-payment), or by [making a `/refund` request](#refund-a-payment). Once we have processed the request, you'll receive a [webhook](/development-resources/webhooks) with `eventCode`: **REFUND\_FAILED**. This request may take several hours to process. ## Unreferenced refund ##### Payouts For sending funds to your customers, use our [Payout solution](/online-payments/online-payouts) instead. When you [migrate your payment data](/development-resources/migrating-payment-data) to Adyen or integrate with an Adyen [point-of-sale solution](/point-of-sale), you might need to refund a payment for which you have no `pspReference` available. The `/refundWithData` endpoint allows you to make an unreferenced refund to either: * [The shopper's bank account](#refund-to-a-bank-account) * [The shopper's card](#refund-with-raw-card-data) * [Payment details saved in a recurring contract](#refund-to-a-recurring-contract) Refunding with data is limited by default due to anti-money laundering and payment industry regulations. To enable this functionality, contact our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other). ### Refund to a bank account To refund the funds to a shopper's bank account, make a request to the `/refundWithData` endpoint: ```json { "amount": { "value": 1500, "currency": "EUR" }, "bankAccount": { "iban": "NL13TEST0123456789", "ownerName": "A. Klaassen" }, "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "reference": "YOUR_MODIFICATION_REFERENCE", "selectedBrand": "bankTransfer_IBAN", "shopperEmail": "email@shopper.com", "shopperIP": "1.1.1.1", "shopperStatement": "YOUR ORDER 122345677889" } ``` You will receive a  `/refundWithData` response containing a:  * `pspReference`: The PSP reference associated with this `/refundWithData` request.  ```json { "pspReference": "1835015179612534", "resultCode": "Received" } ``` Once we have processed your request, we send you a [REFUND\_WITH\_DATA webhook](#refund-with-data-webhook). ### Refund with raw card data If you are [PCI-compliant at Level 1 or 2](/get-started-with-adyen/adyen-glossary/#pci-compliance), you can include raw card data in your request to the `/refundWithData` endpoint: ```json { "amount": { "value": 1500, "currency": "USD" }, "card": { "number": "4111111111111111", "expiryMonth": "03", "expiryYear": "2030", "holderName": "Simon Hopper" }, "reference": "YOUR_MODIFICATION_REFERENCE", "merchantAccount": "YOUR_MERCHANT_ACCOUNT" } ``` You will receive a  `/refundWithData` response containing a:  * `pspReference`: The PSP reference associated with this `/refundWithData` request.  * `resultCode`: **Received**. If Adyen wasn't the [acquirer](/get-started-with-adyen/adyen-glossary/#acquirer-or-acquiring-bank) for this transaction, it may be **Authorized**. ```json { "pspReference": "1835015179612534", "resultCode": "Received" } ``` Once we have processed your request, we send you a [REFUND\_WITH\_DATA webhook](#refund-with-data-webhook). ### Refund to a recurring contract If a shopper has saved their payment details with you, you can refund a payment by using the recurring contract. In your call to the `/refundWithData` endpoint, specify: * `shopperReference`: your unique ID for the shopper. * `selectedRecurringDetailReference`: the `recurringDetailReference` for the recurring contract. * `shopperInteraction`: **ContAuth**. ```json { "amount":{ "value":1500, "currency":"USD" }, "selectedRecurringDetailReference":"8315535507322518", "shopperReference":"YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j", "reference":"YOUR_MODIFICATION_REFERENCE", "merchantAccount":"YOUR_MERCHANT_ACCOUNT", "recurring":{ "contract":"RECURRING" }, "shopperInteraction":"ContAuth" } ``` You will receive a `/refundWithData` response containing a: * `pspReference`: The PSP reference associated with this `/refundWithData` request. ```json { "pspReference": "8835538461311270", "resultCode": "Received" } ``` Once we have processed your request, we send you a [REFUND\_WITH\_DATA webhook](#refund-with-data-webhook). ### REFUND WITH DATA webhook You receive the outcome of your `/refundWithData` request asynchronously, in a [webhook event](/development-resources/webhooks) that includes: * `eventCode`: **REFUND\_WITH\_DATA**. * `additionalData`: the information in this objects depends on the [additional settings](/development-resources/webhooks/webhook-types/additional-settings) that you enabled. * `originalReference`: the PSP reference of the unreferenced refund request. This is not the PSP reference of the payment that is being refunded, because with an unreferenced refund that PSP reference is unknown. In your Customer Area you can find the refund using the `originalReference` value. * `pspReference`: the PSP reference generated when the refund was captured. * `success`: indicates the outcome of the refund validations. Possible values: * **true**: Adyen's validations were successful and we sent the refund request to the card scheme. This usually means that the refund will be processed successfully. However, in rare cases the refund can be rejected by the card scheme, or reversed. For information about these exceptions, see [**REFUND\_FAILED** webhook](/online-payments/refund#refund-failed), and [**REFUNDED\_REVERSED** webhook](/online-payments/refund#refunded-reversed). * **false**: the refund validations failed. The webhook includes a `reason` field with a short description of the problem. [Review the reason](#failed-refund-request), fix the issue if possible, and resubmit the refund request. ```json { "live":"false", "notificationItems":[ { "NotificationRequestItem":{ "additionalData":{ "fundingSource":"CREDIT" }, "amount":{ "currency":"EUR", "value":40000 }, "eventCode":"REFUND_WITH_DATA", "eventDate":"2023-04-27T17:46:51+02:00", "merchantAccountCode":"YOUR_MERCHANT_ACCOUNT", "merchantReference": "YOUR_MODIFICATION_REFERENCE", "originalReference":"NV4ZPV72LV5X8N82", "paymentMethod":"mc", "pspReference":"NC6HT9CRT65ZGN82", "reason":"", "success":"true" } } ] } ``` For more information about the included fields, see the [REFUND\_WITH\_DATA](https://docs.adyen.com/api-explorer/Webhooks/latest/post/REFUND_WITH_DATA) webhook reference. ## See also * [API Explorer](https://docs.adyen.com/api-explorer/?classes=codeLabel#/Payment/refund) * [Notifications API](https://docs.adyen.com/api-explorer/#/Webhooks) * [Capture](/online-payments/classic-integrations/modify-payments/capture) * [Cancel or refund](/online-payments/classic-integrations/modify-payments/cancel-or-refund) * [Payments lifecycle](/account/payments-lifecycle) * [Payment methods](/payment-methods)