POST /cancels
Cancels the authorisation on a payment that has not yet been captured, and returns a unique reference for this request. You get the outcome of the request asynchronously, in a TECHNICAL_CANCEL webhook.
If you want to cancel a payment using the pspReference, use the /payments/{paymentPspReference}/cancels endpoint instead.
If you want to cancel a payment but are not sure whether it has been captured, use the /payments/{paymentPspReference}/reversals endpoint instead.
For more information, refer to Cancel.
Servers
- https://checkout-test.adyen.com/v71
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Idempotency-Key |
String | No |
A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). |
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
applicationInfo |
Object | No |
Information about your application. For more details, see Building Adyen solutions. |
applicationInfo.merchantApplication |
Object | No |
Merchant developed software, such as cashier application, used to interact with the Adyen API. |
applicationInfo.merchantApplication.name |
String | No |
Name of the field. For example, Name of External Platform. |
applicationInfo.merchantApplication.version |
String | No |
Version of the field. For example, Version of External Platform. |
applicationInfo.externalPlatform |
Object | No |
Third-party developed platform used to initiate payment requests. For example, Magento, Zuora, etc. |
applicationInfo.externalPlatform.integrator |
String | No |
External platform integrator. |
applicationInfo.externalPlatform.name |
String | No |
Name of the field. For example, Name of External Platform. |
applicationInfo.externalPlatform.version |
String | No |
Version of the field. For example, Version of External Platform. |
applicationInfo.merchantDevice |
Object | No |
Merchant device information. |
applicationInfo.merchantDevice.osVersion |
String | No |
Version of the operating system on the merchant device. |
applicationInfo.merchantDevice.os |
String | No |
Operating system running on the merchant device. |
applicationInfo.merchantDevice.reference |
String | No |
Merchant device reference. |
applicationInfo.adyenLibrary |
Object | No |
Adyen-developed software, such as libraries and plugins, used to interact with the Adyen API. For example, Magento plugin, Java API library, etc. |
applicationInfo.adyenLibrary.name |
String | No |
Name of the field. For example, Name of External Platform. |
applicationInfo.adyenLibrary.version |
String | No |
Version of the field. For example, Version of External Platform. |
applicationInfo.shopperInteractionDevice |
Object | No |
Shopper interaction device, such as terminal, mobile device or web browser, to initiate payment requests. |
applicationInfo.shopperInteractionDevice.osVersion |
String | No |
Version of the operating system on the shopper interaction device. |
applicationInfo.shopperInteractionDevice.locale |
String | No |
Locale on the shopper interaction device. |
applicationInfo.shopperInteractionDevice.os |
String | No |
Operating system running on the shopper interaction device. |
applicationInfo.adyenPaymentSource |
Object | No |
Adyen-developed software to get payment details. For example, Checkout SDK, Secured Fields SDK, etc. |
applicationInfo.adyenPaymentSource.name |
String | No |
Name of the field. For example, Name of External Platform. |
applicationInfo.adyenPaymentSource.version |
String | No |
Version of the field. For example, Version of External Platform. |
enhancedSchemeData |
Object | No |
Enhanced scheme data that may be required for processing the payment. For example, airline information. |
enhancedSchemeData.airline |
Object | No |
Airline enhanced scheme data that may be required for processing the transaction and/or for interchange savings. |
enhancedSchemeData.airline.travelAgency |
Object | No | |
enhancedSchemeData.airline.travelAgency.name |
String | No |
The name of the travel agency.
|
enhancedSchemeData.airline.travelAgency.code |
String | No |
The unique identifier from IATA or ARC for the travel agency that issues the ticket.
|
enhancedSchemeData.airline.legs[] |
Array | No | |
enhancedSchemeData.airline.legs[].dateOfTravel |
String | No |
Date and time of travel in format
|
enhancedSchemeData.airline.legs[].departureAirportCode |
String | No |
The IATA three-letter airport code of the departure airport. This field is required if the airline data includes leg details.
|
enhancedSchemeData.airline.legs[].destinationAirportCode |
String | No |
The IATA 3-letter airport code of the destination airport. This field is required if the airline data includes leg details.
|
enhancedSchemeData.airline.legs[].carrierCode |
String | No |
The IATA 2-letter accounting code (PAX) that identifies the carrier. This field is required if the airline data includes leg details.
|
enhancedSchemeData.airline.legs[].departureTax |
Integer | No |
The amount of departure tax charged, in minor units.
|
enhancedSchemeData.airline.legs[].fareBasisCode |
String | No |
The fare basis code, alphanumeric.
|
enhancedSchemeData.airline.legs[].flightNumber |
String | No |
The flight identifier.
|
enhancedSchemeData.airline.legs[].classOfTravel |
String | No |
A one-letter travel class identifier. The following are common:
|
enhancedSchemeData.airline.legs[].stopOverCode |
String | No |
A one-letter code that indicates whether the passenger is entitled to make a stopover. Can be a space, O if the passenger is entitled to make a stopover, or X if they are not.
|
enhancedSchemeData.airline.computerizedReservationSystem |
String | No |
The CRS used to make the reservation and purchase the ticket.
|
enhancedSchemeData.airline.customerReferenceNumber |
String | No |
The alphanumeric customer reference number.
|
enhancedSchemeData.airline.flightDate |
String | No |
The flight departure date. Time is optional.
|
enhancedSchemeData.airline.ticket |
Object | No | |
enhancedSchemeData.airline.ticket.issueAddress |
String | No |
The address of the organization that issued the ticket.
|
enhancedSchemeData.airline.ticket.number |
String | No |
The ticket's unique identifier.
|
enhancedSchemeData.airline.ticket.issueDate |
String | No |
The date that the ticket was issued to the passenger.
|
enhancedSchemeData.airline.code |
String | No |
The IATA 3-digit accounting code (PAX) that identifies the carrier.
|
enhancedSchemeData.airline.boardingFee |
Integer | No |
The amount charged for boarding the plane, in minor units.
|
enhancedSchemeData.airline.designatorCode |
String | No |
The IATA 2-letter accounting code (PAX) that identifies the carrier.
|
enhancedSchemeData.airline.passengers[] |
Array | No | |
enhancedSchemeData.airline.passengers[].lastName |
String | No |
The passenger's last name.
|
enhancedSchemeData.airline.passengers[].phoneNumber |
String | No |
The passenger's phone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs.
|
enhancedSchemeData.airline.passengers[].firstName |
String | No |
The passenger's first name.
|
enhancedSchemeData.airline.passengers[].travellerType |
String | No |
The IATA passenger type code (PTC).
|
enhancedSchemeData.airline.passengers[].dateOfBirth |
String | No |
The passenger's date of birth.
|
enhancedSchemeData.airline.documentType |
String | No |
A code that identifies the type of item bought. The description of the code can appear on credit card statements.
|
enhancedSchemeData.airline.agency |
Object | No | |
enhancedSchemeData.airline.agency.planName |
String | No |
The two-letter agency plan identifier.
|
enhancedSchemeData.airline.agency.invoiceNumber |
String | No |
The reference number for the invoice, issued by the agency.
|
enhancedSchemeData.airline.passengerName |
String | Yes |
The passenger's name, initials, and title.
|
enhancedSchemeData.carRental |
Object | No |
Car rental enhanced scheme data that may be required for processing the transaction and/or for interchange savings. |
enhancedSchemeData.carRental.rentalDays |
Integer | No |
The number of days the car is rented for.
|
enhancedSchemeData.carRental.customerServicePhoneNumber |
String | No |
The customer service phone number of the car rental company.
|
enhancedSchemeData.carRental.rateType |
String | No |
Indicates whether the rental rate is daily or weekly.
Valid values:
|
enhancedSchemeData.carRental.rentalAgreementNumber |
String | No |
The rental agreement number for the car rental.
|
enhancedSchemeData.carRental.rentalClassId |
String | No |
The classification of the rental car.
|
enhancedSchemeData.carRental.taxExempt |
Boolean | No |
Indicates if the goods or services were tax-exempt, or if tax was not collected.
|
enhancedSchemeData.carRental.pickupInfo |
Object | No | |
enhancedSchemeData.carRental.pickupInfo.stateOrProvince |
String | No |
The state or province where the car is rented.
|
enhancedSchemeData.carRental.pickupInfo.countryCode |
String | No |
The country where the car is rented, in ISO 3166-1 alpha-2 format.
|
enhancedSchemeData.carRental.pickupInfo.date |
String | No |
The pick-up date.
|
enhancedSchemeData.carRental.pickupInfo.city |
String | No |
The city where the car is rented.
|
enhancedSchemeData.carRental.noShow |
Boolean | No |
Indicates if the customer didn't pick up their rental car.
|
enhancedSchemeData.carRental.renterName |
String | Yes |
The name of the person renting the car.
|
enhancedSchemeData.carRental.returnInfo |
Object | No | |
enhancedSchemeData.carRental.returnInfo.locationId |
String | No |
The agency code, phone number, or address abbreviation.
|
enhancedSchemeData.carRental.returnInfo.stateOrProvince |
String | No |
The state or province where the car must be returned.
|
enhancedSchemeData.carRental.returnInfo.countryCode |
String | No |
The country where the car must be returned, in ISO 3166-1 alpha-2 format.
|
enhancedSchemeData.carRental.returnInfo.date |
String | No |
The date by which the car must be returned.
|
enhancedSchemeData.carRental.returnInfo.city |
String | No |
The city where the car must be returned.
|
enhancedSchemeData.carRental.rentalSurcharges |
Object | No | |
enhancedSchemeData.carRental.rentalSurcharges.insurance |
Integer | No |
Any insurance charges associated with the rental, in minor units.
|
enhancedSchemeData.carRental.rentalSurcharges.fuel |
Integer | No |
The fuel charges associated with the rental, in minor units.
|
enhancedSchemeData.carRental.rentalSurcharges.oneWayDropOff |
Integer | No |
The charge for not returning a car to the original rental location, in minor units.
|
enhancedSchemeData.carRental.rentalRate |
Integer | No |
Rental rate, in minor units.
|
enhancedSchemeData.levelTwoThree |
Object | No |
Level 2 and Level 3 enhanced scheme data that may be required for processing the transaction and/or for interchange savings. |
enhancedSchemeData.levelTwoThree.orderDate |
String | No |
The date of the order.
|
enhancedSchemeData.levelTwoThree.shipFromPostalCode |
String | No |
The postal code of the address where the item is shipped from.
|
enhancedSchemeData.levelTwoThree.dutyAmount |
Integer | No |
The duty tax amount, in minor units.
|
enhancedSchemeData.levelTwoThree.destination |
Object | No |
The destination address information. |
enhancedSchemeData.levelTwoThree.destination.postalCode |
String | No |
The postal code of the destination address.
|
enhancedSchemeData.levelTwoThree.destination.stateOrProvince |
String | No |
The state or province code of the destination address.
|
enhancedSchemeData.levelTwoThree.destination.countryCode |
String | No |
The two-letter ISO 3166-1 alpha-2 or three-letter ISO 3166-1 alpha-3 country code for the destination address.
|
enhancedSchemeData.levelTwoThree.totalTaxAmount |
Integer | No |
The amount of state or provincial tax included in the total transaction amount, in minor units.
|
enhancedSchemeData.levelTwoThree.customerReferenceNumber |
String | No |
The reference number to identify the customer and their order.
|
enhancedSchemeData.levelTwoThree.itemDetailLines[] |
Array | No |
The list of item detail lines. |
enhancedSchemeData.levelTwoThree.itemDetailLines[].description |
String | No |
A description of the item, that provides details about the purchase. For Visa transactions with level 3 ESD, the description must not be the same or very similar to your merchant name, or, consist only of common words like "product", or "service".
|
enhancedSchemeData.levelTwoThree.itemDetailLines[].quantity |
Integer | No |
The number of items. Must be an integer greater than zero.
|
enhancedSchemeData.levelTwoThree.itemDetailLines[].totalAmount |
Integer | No |
The total amount for the line item, in minor units.
See Amount requirements for level 2/3 ESD to learn more about how to calculate the line item total.
|
enhancedSchemeData.levelTwoThree.itemDetailLines[].commodityCode |
String | No |
The code that identifies the item in a standardized commodity coding scheme. There are different commodity coding schemes:
|
enhancedSchemeData.levelTwoThree.itemDetailLines[].discountAmount |
Integer | No |
The discount amount, in minor units.
|
enhancedSchemeData.levelTwoThree.itemDetailLines[].productCode |
String | No |
The product code. Must be a unique product code associated with the item or service. This can be your unique code for the item, or the manufacturer's product code.
|
enhancedSchemeData.levelTwoThree.itemDetailLines[].unitOfMeasure |
String | No |
The unit of measurement for an item.
|
enhancedSchemeData.levelTwoThree.itemDetailLines[].unitPrice |
Integer | No |
The unit price, in minor units.
|
enhancedSchemeData.levelTwoThree.freightAmount |
Integer | No |
The shipping amount, in minor units.
|
enhancedSchemeData.lodging |
Object | No |
Lodging enhanced scheme data that may be required for processing the transaction and/or for interchange savings. |
enhancedSchemeData.lodging.customerServicePhoneNumber |
String | No |
The toll-free phone number for the lodging customer service.
|
enhancedSchemeData.lodging.propertyPhoneNumber |
String | No |
The lodging property location's phone number.
|
enhancedSchemeData.lodging.checkInDate |
String | No |
The check-in date.
|
enhancedSchemeData.lodging.checkOutDate |
String | No |
The check-out date.
|
enhancedSchemeData.lodging.noShow |
Boolean | No |
Indicates if the customer didn't check in for their booking.
|
enhancedSchemeData.lodging.renterName |
String | No |
The name of the person renting the room.
|
enhancedSchemeData.lodging.totalTax |
Integer | No |
The total tax amount, in minor units.
|
enhancedSchemeData.lodging.folio |
Object | No |
The folio information for the booking. |
enhancedSchemeData.lodging.folio.number |
String | No |
The card acceptor's internal invoice or billing ID reference number.
|
enhancedSchemeData.lodging.folio.cashAdvances |
Integer | No |
The folio cash advances, in minor units.
|
enhancedSchemeData.lodging.prepaidExpenses |
Integer | No |
The prepaid expenses for the booking, in minor units.
|
enhancedSchemeData.lodging.foodBeverageCharges |
Integer | No |
Any charges for food and beverages associated with the booking, in minor units.
|
enhancedSchemeData.lodging.fireSafetyCompliance |
Boolean | No |
Indicates that the facility complies with the Hotel and Motel Fire Safety Act of 1990.
|
enhancedSchemeData.lodging.totalRoomTax |
Integer | No |
The total room tax amount, in minor units.
|
enhancedSchemeData.lodging.lodgingChargeType |
String | No |
The category of lodging charges for the payment.
Valid values:
|
enhancedSchemeData.lodging.rooms[] |
Array | No |
The list of rooms booked. |
enhancedSchemeData.lodging.rooms[].rate |
Integer | No |
Room rate per night, in minor units.
|
enhancedSchemeData.lodging.rooms[].numberOfNights |
Integer | No |
The total number of nights the room is booked for.
|
enhancedSchemeData.temporaryServices |
Object | No |
Temporary services enhanced scheme data that may be required for processing the transaction and/or for interchange savings. |
enhancedSchemeData.temporaryServices.jobDescription |
String | No |
The job description of the person working in a temporary capacity.
|
enhancedSchemeData.temporaryServices.endDate |
String | No |
The billing period end date.
|
enhancedSchemeData.temporaryServices.serviceRequestor |
String | No |
The name of the person requesting the temporary services.
|
enhancedSchemeData.temporaryServices.hoursWorked |
Integer | No |
The number of hours worked during the billing period.
|
enhancedSchemeData.temporaryServices.employeeName |
String | No |
The name or ID of the person working in a temporary capacity.
|
enhancedSchemeData.temporaryServices.hourRate |
Integer | No |
The hourly rate for the temporary services, in minor units.
|
enhancedSchemeData.temporaryServices.startDate |
String | No |
The billing period start date.
|
paymentReference |
String | Yes |
The |
merchantAccount |
String | Yes |
The merchant account that is used to process the payment. |
reference |
String | No |
Your reference for the cancel request. Maximum length: 80 characters. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.