Refunds a captured payment.

POST /refund

Refunds a payment that has previously been captured, returning a unique reference for this request. Refunding can be done on the full captured amount or a partial amount. Multiple (partial) refunds will be accepted as long as their sum doesn't exceed the captured amount. Payments which have been authorised, but not captured, cannot be refunded, use the /cancel method instead.

Some payment methods/gateways do not support partial/multiple refunds. A margin above the captured limit can be configured to cover shipping/handling costs.

For more information, refer to Refund.

Body

  • This field contains additional data, which may be required for a particular modification request.

    The additionalData object consists of entries, each of which includes the key and value. For more information on possible key-value pairs, refer to the ModificationRequest.additionalData section.

  • merchantAccount string Required

    The merchant account that is used to process the payment.

  • The amount that needs to be captured/refunded. Required for /capture and /refund, not allowed for /cancel. The currency must match the currency used in authorisation, the value must be smaller than or equal to the authorised amount.

    Hide modificationAmount attributes Show modificationAmount attributes object
    • currency string Required

      The three-character ISO currency code.

      Minimum length is 3, maximum length is 3.

    • value integer(int64) Required

      The payable amount that can be charged for the transaction.

      The transaction amount needs to be represented in minor units according to the following table.

  • The original merchant reference to cancel.

  • originalReference string Required

    The original pspReference of the payment to modify. This reference is returned in:

    • authorisation response
    • authorisation notification
  • Optionally, you can specify your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters.

  • splits array[object]

    The details of how the payment should be split when distributing a payment to a Marketpay Marketplace and its Accounts.

    Hide splits attributes Show splits attributes array[object]
    • account string

      The account to which this split applies.

      Required if the type is MarketPlace.

    • amount object Required

      The amount of this split.

      Hide amount attributes Show amount attributes object
      • currency string

        The three-character ISO currency code.

        If this value is not provided, the currency in which the payment is made will be used.

        Minimum length is 3, maximum length is 3.

      • value integer(int64) Required

        The payable amount that can be charged for the transaction.

        The transaction amount needs to be represented in minor units according to the following table.

    • A description of this split.

    • The reference of this split. Used to link other operations (e.g. captures and refunds) to this split.

      Required if the type is MarketPlace.

    • type string Required

      The type of this split.

      Permitted values: Default, PaymentFee, VAT, Commission, MarketPlace, Verification.

      Values are Commission, Default, MarketPlace, PaymentFee, VAT, or Verification.

  • The transaction reference provided by the PED. For Point-of-sale integrations only.

  • Unique terminal ID for the PED that originally processed the request. For Point-of-sale integrations only.

Responses

  • OK - the request has succeeded.

    Hide response attributes Show response attributes object
    • This field contains additional data, which may be returned in a particular modification response.

    • Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request.

    • response string

      Indicates if the modification request has been received for processing.

      Values are [capture-received], [cancel-received], [refund-received], or [cancelOrRefund-received].

  • Unauthorized - authentication required.

  • Forbidden - insufficient permissions to process the request.

  • Unprocessable Entity - a request validation error.

  • Internal Server Error - the server could not process the request.

POST /refund
curl \
 -X POST https://pal-test.adyen.com/pal/servlet/Payment/v40/refund \
 -H "Content-Type: application/json" \
 -d '{"additionalData":{},"merchantAccount":"string","modificationAmount":{"currency":"string","value":42},"originalMerchantReference":"string","originalReference":"string","reference":"string","splits":[{"account":"string","amount":{"currency":"string","value":42},"description":"string","reference":"string","type":"Commission"}],"tenderReference":"string","uniqueTerminalId":"string"}'
Request example
{
  "additionalData": {},
  "merchantAccount": "string",
  "modificationAmount": {
    "currency": "string",
    "value": 42
  },
  "originalMerchantReference": "string",
  "originalReference": "string",
  "reference": "string",
  "splits": [
    {
      "account": "string",
      "amount": {
        "currency": "string",
        "value": 42
      },
      "description": "string",
      "reference": "string",
      "type": "Commission"
    }
  ],
  "tenderReference": "string",
  "uniqueTerminalId": "string"
}
Request examples
{
  "additionalData": {},
  "merchantAccount": "string",
  "modificationAmount": {
    "currency": "string",
    "value": 42
  },
  "originalMerchantReference": "string",
  "originalReference": "string",
  "reference": "string",
  "splits": [
    {
      "account": "string",
      "amount": {
        "currency": "string",
        "value": 42
      },
      "description": "string",
      "reference": "string",
      "type": "Commission"
    }
  ],
  "tenderReference": "string",
  "uniqueTerminalId": "string"
}
Response examples (200)
{
  "additionalData": {},
  "pspReference": "string",
  "response": "[capture-received]"
}
Response examples (200)
{
  "additionalData": {},
  "pspReference": "string",
  "response": "[capture-received]"
}