younifyd
Menu

Refund a captured payment

Refund a captured payment

POST/payments/{paymentPspReference}/refunds

Use it in a workflow

  1. Add a step and choose the Adyen connector.
  2. Pick the Refund a captured payment action (under Modifications).
  3. Fill in the fields below, then reference the result from later steps as {{refundACapturedPayment.response.data}}.

Request

Path parameters

paymentPspReferencestringrequired

The [`pspReference`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-pspReference) of the payment that you want to refund.

Headers

Idempotency-Keystring

A unique identifier for the message with a maximum of 64 characters (we recommend a UUID).

Request body

Enter the body as JSON in the step's Body field.

amountobjectrequired
currencystringrequired

The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes) of the amount.

valueinteger (int64)required

The numeric value of the amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units).

applicationInfoobject
adyenLibraryobject2 fields
adyenPaymentSourceobject2 fields
externalPlatformobject3 fields
merchantApplicationobject2 fields
merchantDeviceobject3 fields
shopperInteractionDeviceobject3 fields
capturePspReferencestring

This is only available for PayPal refunds. The [`pspReference`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-pspReference) of the specific capture to refund.

enhancedSchemeDataobject
airlineobject13 fields
carRentalobject12 fields
healthcareobject5 fields
levelTwoThreeobject8 fields
lodgingobject14 fields
temporaryServicesobject7 fields
lineItemsarray<object>

Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip.

amountExcludingTaxinteger (int64)

Item amount excluding the tax, in [minor units](https://docs.adyen.com/development-resources/currency-codes/#minor-units).

amountIncludingTaxinteger (int64)

Item amount including the tax, in [minor units](https://docs.adyen.com/development-resources/currency-codes/#minor-units).

brandstring

Brand of the item.

colorstring

Color of the item.

descriptionstring

Description of the line item.

idstring

ID of the line item.

imageUrlstring

Link to the picture of the purchased item.

itemCategorystring

Item category, used by the payment methods PayPal and Ratepay.

manufacturerstring

Manufacturer of the item.

marketplaceSellerIdstring

Marketplace seller id.

productUrlstring

Link to the purchased item.

quantityinteger (int64)

Number of items.

receiverEmailstring

Email associated with the given product in the basket (usually in electronic gift cards).

returnShippingCompanystring

Shipping company handling the return of the item.

returnTrackingNumberstring

Tracking number for the return of the item.

returnTrackingUristring

Tracking URI for the return of the item.

riskCategorystring

An optional, free-text category for the item to be used in the risk evaluation. When provided, Protect uses this value to evaluate custom risk rules.

shippingCompanystring

Shipping company handling the delivery of the item.

shippingMethodstring

Shipping method used to deliver the item.

sizestring

Size of the item.

skustring

Stock keeping unit.

taxAmountinteger (int64)

Tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes/#minor-units).

taxPercentageinteger (int64)

Tax percentage, represented as a [basis point](https://en.wikipedia.org/wiki/Basis_point) integer. For example: - **530** for 5.3% (five point three percent) - **2100** for 21% (twenty-one percent)

trackingNumberstring

Tracking number for the delivery of the item.

trackingUristring

Tracking URI for the delivery of the item.

upcstring

Universal Product Code.

merchantAccountstringrequired

The merchant account that is used to process the payment.

merchantRefundReasonstring

The reason for the refund request. Possible values: * **FRAUD** * **CUSTOMER REQUEST** * **RETURN** * **DUPLICATE** * **OTHER**

One ofFRAUDCUSTOMER REQUESTRETURNDUPLICATEOTHER

referencestring

Your reference for the refund request. Maximum length: 80 characters.

splitsarray<object>

An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For more information, see how to process payments for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/online-payments/split-payments/).

accountstring

The unique identifier of the account to which the split amount is booked. Required if `type` is **MarketPlace** or **BalanceAccount**. * [Classic Platforms integration](https://docs.adyen.com/classic-platforms): The [`accountCode`](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccount#request-accountCode) of the account to which the split amount is booked. * [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): The [`balanceAccountId`](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/balanceAccounts/_id_#path-id) of the account to which the split amount is booked.

amountobject2 fields
descriptionstring

Your description for the split item.

referencestring

Your unique reference for the part of the payment booked to the specified `account`. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/classic-platforms)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/adyen-for-platforms-model)). For the other types, we also recommend providing a **unique** reference so you can reconcile the split and the associated payment in the transaction overview and in the reports.

typestringrequired

The part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): * **BalanceAccount**: Books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: The aggregated amount of the interchange and scheme fees. * **PaymentFee**: The aggregated amount of all transaction fees. * **AdyenFees**: The aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: The transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: The transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: The fees paid to the issuer for each payment made with the card network. * **SchemeFee**: The fees paid to the card scheme for using their network. * **Commission**: Your platform's commission on the payment (specified in `amount`), booked to your liable balance account. * **Remainder**: The amount left over after a currency conversion, booked to the specified `account`. * **Surcharge**: The payment acceptance fee imposed by the card scheme or debit network provider, paid by your user's customer. * **TopUp**: Allows you and your users to top up balance accounts using direct debit, card payments, or other payment methods. * **VAT**: The value-added tax charged on the payment, booked to your platforms liable balance account. * **Default**: In very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/classic-platforms): **Commission**, **Default**, **MarketPlace**, **PaymentFee**, **VAT**.

One ofAcquiringFeesAdyenCommissionAdyenFeesAdyenMarkupBalanceAccountCommissionDefaultInterchangeMarketPlacePaymentFeeRemainderSchemeFeeSurchargeTipTopUpVAT

storestring

The online store or [physical store](https://docs.adyen.com/point-of-sale/design-your-integration/determine-account-structure/#create-stores) that is processing the refund. This must be the same as the store name configured in your Customer Area. Otherwise, you get an error and the refund fails.

json
{
  "amount": {
    "currency": "string",
    "value": 0
  },
  "merchantAccount": "string",
  "applicationInfo": {
    "adyenLibrary": {
      "name": "string",
      "version": "string"
    },
    "adyenPaymentSource": {
      "name": "string",
      "version": "string"
    },
    "externalPlatform": {
      "integrator": "string",
      "name": "string",
      "version": "string"
    },
    "merchantApplication": {
      "name": "string",
      "version": "string"
    },
    "merchantDevice": {
      "os": "string",
      "osVersion": "string",
      "reference": "string"
    },
    "shopperInteractionDevice": {
      "locale": "string",
      "os": "string",
      "osVersion": "string"
    }
  },
  "capturePspReference": "string",
  "enhancedSchemeData": {
    "airline": {
      "passengerName": "string",
      "agency": {
        "invoiceNumber": "string",
        "planName": "string"
      },
      "boardingFee": 0,
      "code": "string",
      "computerizedReservationSystem": "string",
      "customerReferenceNumber": "string",
      "designatorCode": "string",
      "documentType": "string",
      "flightDate": "2025-01-01T00:00:00Z",
      "legs": [
        {
          "carrierCode": "string",
          "classOfTravel": "string",
          "dateOfTravel": "2025-01-01T00:00:00Z",
          "departureAirportCode": "string",
          "departureTax": 0,
          "destinationAirportCode": "string",
          "fareBasisCode": "string",
          "flightNumber": "string",
          "stopOverCode": "string"
        }
      ],
      "passengers": [
        {
          "dateOfBirth": "2025-01-01",
          "firstName": "string",
          "lastName": "string",
          "phoneNumber": "string",
          "travellerType": "string"
        }
      ],
      "ticket": {
        "issueAddress": "string",
        "issueDate": "2025-01-01",
        "number": "string"
      }
    },
    "carRental": {
      "renterName": "string",
      "customerServicePhoneNumber": "string",
      "noShow": false,
      "pickupInfo": {
        "city": "string",
        "countryCode": "string",
        "date": "2025-01-01",
        "stateOrProvince": "string"
      },
      "rateType": "daily",
      "rentalAgreementNumber": "string",
      "rentalClassId": "string",
      "rentalDays": 0,
      "rentalRate": 0,
      "rentalSurcharges": {
        "fuel": 0,
        "insurance": 0,
        "oneWayDropOff": 0
      },
      "returnInfo": {
        "city": "string",
        "countryCode": "string",
        "date": "2025-01-01",
        "locationId": "string",
        "stateOrProvince": "string"
      },
      "taxExempt": false
    },
    "healthcare": {
      "totalHealthcareValue": 0,
      "dentalValue": 0,
      "otherMedicalValue": 0,
      "prescriptionValue": 0,
      "visionPrescriptionValue": 0
    },
    "levelTwoThree": {
      "customerReferenceNumber": "string",
      "destination": {
        "countryCode": "string",
        "postalCode": "string",
        "stateOrProvince": "string"
      },
      "dutyAmount": 0,
      "freightAmount": 0,
      "itemDetailLines": [
        {
          "commodityCode": "string",
          "description": "string",
          "discountAmount": 0,
          "productCode": "string",
          "quantity": 0,
          "totalAmount": 0,
          "unitOfMeasure": "string",
          "unitPrice": 0
        }
      ],
      "orderDate": "2025-01-01",
      "shipFromPostalCode": "string",
      "totalTaxAmount": 0
    },
    "lodging": {
      "checkInDate": "2025-01-01",
      "checkOutDate": "2025-01-01",
      "customerServicePhoneNumber": "string",
      "fireSafetyCompliance": false,
      "folio": {
        "cashAdvances": 0,
        "number": "string"
      },
      "foodBeverageCharges": 0,
      "lodgingChargeType": "advanceDeposit",
      "noShow": false,
      "prepaidExpenses": 0,
      "propertyPhoneNumber": "string",
      "renterName": "string",
      "rooms": [
        {
          "numberOfNights": 0,
          "rate": 0
        }
      ]
    },
    "temporaryServices": {
      "employeeName": "string",
      "endDate": "2025-01-01",
      "hourRate": 0,
      "hoursWorked": 0,
      "jobDescription": "string",
      "serviceRequestor": "string",
      "startDate": "2025-01-01"
    }
  },
  "lineItems": [
    {
      "amountExcludingTax": 0,
      "amountIncludingTax": 0,
      "brand": "string",
      "color": "string",
      "description": "string",
      "id": "string",
      "imageUrl": "string",
      "itemCategory": "string",
      "manufacturer": "string",
      "marketplaceSellerId": "string",
      "productUrl": "string",
      "quantity": 0
    }
  ],
  "merchantRefundReason": "FRAUD",
  "reference": "string",
  "splits": [
    {
      "type": "AcquiringFees",
      "account": "string",
      "amount": {
        "value": 0,
        "currency": "string"
      },
      "description": "string",
      "reference": "string"
    }
  ],
  "store": "string"
}

Response

Returns 201 with an object. Read it in later steps with {{refundACapturedPayment.response.data.<field>}}.

amountobject
currencystringrequired

The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes) of the amount.

valueinteger (int64)required

The numeric value of the amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units).

capturePspReferencestring

This is only available for PayPal refunds. The [`pspReference`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-pspReference) of the specific capture to refund.

lineItemsarray<object>

Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip.

amountExcludingTaxinteger (int64)

Item amount excluding the tax, in [minor units](https://docs.adyen.com/development-resources/currency-codes/#minor-units).

amountIncludingTaxinteger (int64)

Item amount including the tax, in [minor units](https://docs.adyen.com/development-resources/currency-codes/#minor-units).

brandstring

Brand of the item.

colorstring

Color of the item.

descriptionstring

Description of the line item.

idstring

ID of the line item.

imageUrlstring

Link to the picture of the purchased item.

itemCategorystring

Item category, used by the payment methods PayPal and Ratepay.

manufacturerstring

Manufacturer of the item.

marketplaceSellerIdstring

Marketplace seller id.

productUrlstring

Link to the purchased item.

quantityinteger (int64)

Number of items.

receiverEmailstring

Email associated with the given product in the basket (usually in electronic gift cards).

returnShippingCompanystring

Shipping company handling the return of the item.

returnTrackingNumberstring

Tracking number for the return of the item.

returnTrackingUristring

Tracking URI for the return of the item.

riskCategorystring

An optional, free-text category for the item to be used in the risk evaluation. When provided, Protect uses this value to evaluate custom risk rules.

shippingCompanystring

Shipping company handling the delivery of the item.

shippingMethodstring

Shipping method used to deliver the item.

sizestring

Size of the item.

skustring

Stock keeping unit.

taxAmountinteger (int64)

Tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes/#minor-units).

taxPercentageinteger (int64)

Tax percentage, represented as a [basis point](https://en.wikipedia.org/wiki/Basis_point) integer. For example: - **530** for 5.3% (five point three percent) - **2100** for 21% (twenty-one percent)

trackingNumberstring

Tracking number for the delivery of the item.

trackingUristring

Tracking URI for the delivery of the item.

upcstring

Universal Product Code.

merchantAccountstring

The merchant account that is used to process the payment.

merchantRefundReasonstring

Your reason for the refund request.

One ofFRAUDCUSTOMER REQUESTRETURNDUPLICATEOTHER

paymentPspReferencestring

The [`pspReference`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-pspReference) of the payment to refund.

pspReferencestring

Adyen's 16-character reference associated with the refund request.

referencestring

Your reference for the refund request.

splitsarray<object>

An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For more information, see how to process payments for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/online-payments/split-payments/).

accountstring

The unique identifier of the account to which the split amount is booked. Required if `type` is **MarketPlace** or **BalanceAccount**. * [Classic Platforms integration](https://docs.adyen.com/classic-platforms): The [`accountCode`](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccount#request-accountCode) of the account to which the split amount is booked. * [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): The [`balanceAccountId`](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/balanceAccounts/_id_#path-id) of the account to which the split amount is booked.

amountobject2 fields
descriptionstring

Your description for the split item.

referencestring

Your unique reference for the part of the payment booked to the specified `account`. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/classic-platforms)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/adyen-for-platforms-model)). For the other types, we also recommend providing a **unique** reference so you can reconcile the split and the associated payment in the transaction overview and in the reports.

typestringrequired

The part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): * **BalanceAccount**: Books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: The aggregated amount of the interchange and scheme fees. * **PaymentFee**: The aggregated amount of all transaction fees. * **AdyenFees**: The aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: The transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: The transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: The fees paid to the issuer for each payment made with the card network. * **SchemeFee**: The fees paid to the card scheme for using their network. * **Commission**: Your platform's commission on the payment (specified in `amount`), booked to your liable balance account. * **Remainder**: The amount left over after a currency conversion, booked to the specified `account`. * **Surcharge**: The payment acceptance fee imposed by the card scheme or debit network provider, paid by your user's customer. * **TopUp**: Allows you and your users to top up balance accounts using direct debit, card payments, or other payment methods. * **VAT**: The value-added tax charged on the payment, booked to your platforms liable balance account. * **Default**: In very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/classic-platforms): **Commission**, **Default**, **MarketPlace**, **PaymentFee**, **VAT**.

One ofAcquiringFeesAdyenCommissionAdyenFeesAdyenMarkupBalanceAccountCommissionDefaultInterchangeMarketPlacePaymentFeeRemainderSchemeFeeSurchargeTipTopUpVAT

statusstring

The status of your request. This will always have the value **received**.

One ofreceived

storestring

The online store or [physical store](https://docs.adyen.com/point-of-sale/design-your-integration/determine-account-structure/#create-stores) that is processing the refund. This must be the same as the store name configured in your Customer Area. Otherwise, you get an error and the refund fails.

json
{
  "amount": {
    "currency": "string",
    "value": 0
  },
  "merchantAccount": "string",
  "paymentPspReference": "string",
  "pspReference": "string",
  "status": "received",
  "capturePspReference": "string",
  "lineItems": [
    {
      "amountExcludingTax": 0,
      "amountIncludingTax": 0,
      "brand": "string",
      "color": "string",
      "description": "string",
      "id": "string",
      "imageUrl": "string",
      "itemCategory": "string",
      "manufacturer": "string",
      "marketplaceSellerId": "string",
      "productUrl": "string",
      "quantity": 0
    }
  ],
  "merchantRefundReason": "FRAUD",
  "reference": "string",
  "splits": [
    {
      "type": "AcquiringFees",
      "account": "string",
      "amount": {
        "value": 0,
        "currency": "string"
      },
      "description": "string",
      "reference": "string"
    }
  ],
  "store": "string"
}

Need more? See the Adyen guide for connection setup and behaviour shared by every action.