Are you looking for test card numbers?

Would you like to contact support?

No momento, esta página não está disponível em inglês
Default icon

Refund

Refund a payment back to the shopper.

Refund in Customer Area

You can also refund payments in your Customer Area. For more information, refer to Manage payments.

If you want to return the funds to your shopper, for example if they returned an item, you need to refund the payment. You get the outcome of the refund request asynchronously, in a REFUND webhook.

You can refund either the full captured amount or a part of the captured amount. You can also perform multiple partial refunds, as long as their sum doesn't exceed the captured amount.

Some payment methods do not support partial refunds. To learn if a payment method supports partial refunds, refer to the payment method page such as cards, iDEAL, or Klarna.

You can only refund a payment after it has already been captured. Payments that have not yet been captured have to be cancelled instead. If you want to refund a payment but are not sure whether it has been captured, you can reverse the payment instead.

Refund a payment

To return funds to your customer:

  1. From the AUTHORISATION webhook, get the pspReference of the authorisation you want to refund.
  2. Make a POST request to the /payments/paymentPspReference/refunds endpoint, where paymentPspReference is the pspReference of the authorisation you want to refund.
    In your request, include:
    Parameter Required Description
    merchantAccount -white_check_mark- The name of your merchant account that is used to process the payment.
    amount -white_check_mark- The amount that you want to refund.
    • The value must be the same or, in case of a partial refund, less than the captured amount.
    • The currency must match the currency used in the authorisation.
      reference Your reference for the refund, for example for tagging a partial refund for future reconciliation. The reference parameter is required for GrabPay refunds.
      The next example below shows how you would refund 25.00 EUR on an authorisation that has the pspReference XB7XNCQ8HXSKGK82.
      curl https://checkout-test.adyen.com/checkout/v68/payments/XB7XNCQ8HXSKGK82/refunds \
      -H 'X-API-Key: YOUR_API_KEY' \
      -H 'Content-Type: application/json' \
      -d '{
          "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
          "amount": {
              "value": 2500,
              "currency": "EUR"
          },
          "reference": "YOUR_UNIQUE_REFERENCE"
      }'
      String xApiKey = "YOUR_X-API-KEY";
      Client client = new Client(xApiKey,Environment.TEST);
      Checkout checkout = new Checkout(client);
      var paymentRefundRequest = new CreatePaymentRefundRequest();
      var amount = new Amount();
      amount.setCurrency("EUR");
      amount.setValue(2500L);
      paymentRefundRequest.setAmount(amount);
      paymentRefundRequest.setMerchantAccount("YOUR_MERCHANT_ACCOUNT");
      paymentRefundRequest.setReference("YOUR_UNIQUE_REFERENCE");
      String paymentPspReference = "XB7XNCQ8HXSKGK82";
      var response = checkout.paymentsRefunds(paymentPspReference, paymentRefundRequest);
    • When you receive the /payments/paymentPspReference/refunds response, note:
      • paymentPspReference: the PSP reference of the authorisation you want to refund.
      • pspReference: Adyen's unique reference associated with this refund request.
      {
          "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
          "paymentPspReference": "XB7XNCQ8HXSKGK82",
          "pspReference" : "JDD6LKT8MBLZNN84",
          "reference": "YOUR_UNIQUE_REFERENCE",
          "status" : "received"
      }
    • Wait for the REFUND notification webhook to learn the outcome of the refund request.

    REFUND webhook

    You receive the outcome of the refund request asynchronously, in a notification webhook that includes:

    • eventCode: REFUND.
    • pspReference: the pspReference from the response for your refund request.
    • 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 REFUND_FAILED webhook, and REFUNDED_REVERSED webhook.
      • false: the refund request failed. The webhook includes a reason field with a short description of the problem. Review the reason, fix the issue if possible, and resubmit the refund request.
    {
       "live":"false",
       "notificationItems":[
          {
             "NotificationRequestItem":{
                "amount":{
                   "currency":"EUR",
                   "value":2500
                },
                "eventCode":"REFUND",
                "eventDate":"2021-11-01T00:19:34+01:00",
                "merchantAccountCode":"YOUR_MERCHANT_ACCOUNT",
                "merchantReference": "YOUR_UNIQUE_REFERENCE",
                "originalReference":"XB7XNCQ8HXSKGK82",
                "paymentMethod":"visa",
                "pspReference":"JDD6LKT8MBLZNN84",
                "reason":"",
                "success":"true"
             }
          }
       ]
    }

    For more information about the included fields, see the REFUND notification reference.

    Failed refund request

    When a refund request fails, you receive a webhook with success: false and the reason why the request failed. The next table shows the most common reason values in the webhook.

    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 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 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.

    Balance on the payment

    The balance on the payment refers to the amount that remains from the original payment. For example, if a transaction has a total of 10 EUR and no refund or chargeback is processed, then the balance on the payment is 10 EUR. After a refund or chargeback of 3 EUR is processed, the remaining balance on the payment is 7 EUR.

    REFUND_FAILED webhook

    Although rare, a refund can fail after you received a REFUND webhook with success: true. A successful REFUND webhook means that the request has been sent to the card scheme, but the refund can still be rejected by the card scheme. This can 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 Failed refunds.

    When a refund fails after you received success: true in the REFUND webhook, we inform you of this with another webhook containing:

    • eventCode: REFUND_FAILED
    • pspReference: the pspReference of the refund request.

    For more information about the included fields, see the REFUND_FAILED notification reference.
    An overview of failed refunds is available in your Payment accounting report.

    Testing failed refunds

    In our test environment, you can check how your integration handles failed refunds:

    1. Make a card payment, specifying:

      • holderName: refund failed
      {
        "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.com/...",
        "merchantAccount": "YOUR_MERCHANT_ACCOUNT"
      }
    2. Refund this payment, either in your Customer Area, or by making an API request.

    Once we have processed the request, you'll receive a webhook with eventCode: REFUND_FAILED.

    This request may take several hours to process.

    REFUNDED_REVERSED webhook

    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. This can happen, for example, if the shopper's bank account is no longer valid. Before you retry the refund, contact the shopper about the status of their bank account.

    When a refund is reversed, we inform you of this with a webhook containing:

    • eventCode: REFUNDED_REVERSED
    • success: true

    For more information about the included fields, see the REFUNDED_REVERSED notification reference.
    An overview of reversed refunds is available in your Payment accounting report.

    See also