POST /payments/{paymentPspReference}/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 CANCELLATION webhook.

If you want to cancel a payment but don't have the pspReference, use the /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

Path parameters

Name Type Required Description
paymentPspReference String Yes

The pspReference of the payment that you want to cancel.

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.

  • Encoding: ASCII
  • minLength: 1 character
  • maxLength: 25 characters
  • Must not start with a space or be all spaces.
  • Must not be all zeros.
enhancedSchemeData.airline.travelAgency.code String No

The unique identifier from IATA or ARC for the travel agency that issues the ticket.

  • Encoding: ASCII
  • minLength: 1 character
  • maxLength: 8 characters
  • Must not start with a space or be all spaces.
  • Must not be all zeros.
enhancedSchemeData.airline.legs[] Array No
enhancedSchemeData.airline.legs[].dateOfTravel String No

Date and time of travel in format yyyy-MM-ddTHH:mm.

  • Use local time of departure airport.
  • minLength: 16 characters
  • maxLength: 16 characters
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.

  • Encoding: ASCII
  • Example: Amsterdam = AMS
  • minLength: 3 characters
  • maxLength: 3 characters
  • Must not start with a space or be all spaces.
  • Must not be all zeros.
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.

  • Example: Amsterdam = AMS
  • Encoding: ASCII
  • minLength: 3 characters
  • maxLength: 3 characters
  • Must not start with a space or be all spaces.
  • Must not be all zeros.
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.

  • Example: KLM = KL
  • minLength: 2 characters
  • maxLength: 2 characters
  • Must not start with a space or be all spaces.
  • Must not be all zeros.
enhancedSchemeData.airline.legs[].departureTax Integer No

The amount of departure tax charged, in minor units.

  • Encoding: Numeric
  • minLength: 1
  • maxLength: 11
  • Must not be all zeros.
enhancedSchemeData.airline.legs[].fareBasisCode String No

The fare basis code, alphanumeric.

  • minLength: 1 character
  • maxLength: 15 characters
  • Must not start with a space or be all spaces.
  • Must not be all zeros.
enhancedSchemeData.airline.legs[].flightNumber String No

The flight identifier.

  • minLength: 1 character
  • maxLength: 5 characters
  • Must not start with a space or be all spaces.
  • Must not be all zeros.
enhancedSchemeData.airline.legs[].classOfTravel String No

A one-letter travel class identifier. The following are common:

  • F: first class

  • J: business class

  • Y: economy class

  • W: premium economy

  • Encoding: ASCII

  • minLength: 1 character

  • maxLength: 1 character

  • Must not start with a space or be all spaces.

  • Must not be all zeros.

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.

  • Encoding: ASCII
  • minLength: 1 character
  • maxLength: 1 character
enhancedSchemeData.airline.computerizedReservationSystem String No

The CRS used to make the reservation and purchase the ticket.

  • Encoding: ASCII
  • minLength: 4 characters
  • maxLength: 4 characters
enhancedSchemeData.airline.customerReferenceNumber String No

The alphanumeric customer reference number.

  • Encoding: ASCII
  • maxLength: 20 characters
  • If you send more than 20 characters, the customer reference number is truncated
  • Must not start with a space or be all spaces.
enhancedSchemeData.airline.flightDate String No

The flight departure date. Time is optional.

  • Format for date only: yyyy-MM-dd
  • Format for date and time: yyyy-MM-ddTHH:mm
  • Use local time of departure airport.
  • minLength: 10 characters
  • maxLength: 16 characters
enhancedSchemeData.airline.ticket Object No
enhancedSchemeData.airline.ticket.issueAddress String No

The address of the organization that issued the ticket.

  • minLength: 0 characters
  • maxLength: 16 characters
enhancedSchemeData.airline.ticket.number String No

The ticket's unique identifier.

  • minLength: 1 character
  • maxLength: 15 characters
  • Must not start with a space or be all spaces.
  • Must not be all zeros.
enhancedSchemeData.airline.ticket.issueDate String No

The date that the ticket was issued to the passenger.

  • minLength: 10 characters
  • maxLength: 10 characters
  • Format ISO 8601: yyyy-MM-dd
enhancedSchemeData.airline.code String No

The IATA 3-digit accounting code (PAX) that identifies the carrier.

  • Format: IATA 3-digit accounting code (PAX)
  • Example: KLM = 074
  • minLength: 3 characters
  • maxLength: 3 characters
  • Must not start with a space or be all spaces.
  • Must not be all zeros.
enhancedSchemeData.airline.boardingFee Integer No

The amount charged for boarding the plane, in minor units.

  • Encoding: Numeric
  • minLength: 1 character
  • maxLength: 11 characters
enhancedSchemeData.airline.designatorCode String No

The IATA 2-letter accounting code (PAX) that identifies the carrier.

  • Encoding: ASCII
  • Example: KLM = KL
  • minLength: 2 characters
  • maxLength: 2 characters
  • Must not start with a space or be all spaces.
enhancedSchemeData.airline.passengers[] Array No
enhancedSchemeData.airline.passengers[].lastName String No

The passenger's last name.

This field is required if the airline data includes passenger details or leg details.

  • Encoding: ASCII
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.

  • Encoding: ASCII
  • minLength: 3 characters
  • maxLength: 30 characters
enhancedSchemeData.airline.passengers[].firstName String No

The passenger's first name.

This field is required if the airline data includes passenger details or leg details.

  • Encoding: ASCII
enhancedSchemeData.airline.passengers[].travellerType String No

The IATA passenger type code (PTC).

  • Encoding: ASCII
  • minLength: 3 characters
  • maxLength: 6 characters
enhancedSchemeData.airline.passengers[].dateOfBirth String No

The passenger's date of birth.

  • Format yyyy-MM-dd
  • minLength: 10
  • maxLength: 10
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.

  • Encoding: ASCII
  • Example: Passenger ticket = 01
  • minLength: 2 characters
  • maxLength: 2 characters
enhancedSchemeData.airline.agency Object No
enhancedSchemeData.airline.agency.planName String No

The two-letter agency plan identifier.

  • Encoding: ASCII
  • minLength: 2 characters
  • maxLength: 2 characters
enhancedSchemeData.airline.agency.invoiceNumber String No

The reference number for the invoice, issued by the agency.

  • Encoding: ASCII
  • minLength: 1 character
  • maxLength: 6 characters
enhancedSchemeData.airline.passengerName String Yes

The passenger's name, initials, and title.

  • Format: last name + first name or initials + title
  • Example: FLYER / MARY MS
  • minLength: 1 character
  • maxLength: 20 characters
  • If you send more than 20 characters, the name is truncated
  • Must not start with a space or be all spaces.
  • Must not be all zeros.
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

  1. Add HTTP Task to your workflow definition.
  2. 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.
  3. Click Test request to test run your request to the API and see the API's response.