Sometimes your shoppers change their mind in mid-purchase, or store staff realize they've made a mistake while the shopper is using the terminal.A cancel request lets either a shopper or store staff abort an in-progress payment. When the cancel request is received before a payment is Approved, the payment is cancelled.Here we explain how you can cancel payments from your POS terminal using the sample request below.To double-check the payment was indeed cancelled, make a request to Get Payment Details. The status of the payment should be failure, in the adyen_response you can optionally look for the errorCondition of the payment.Adyen docs behind this request
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json
payment_id
string<uuid>
required
The ID of the payment which will be cancelled
Example:
c568741f-783d-4b40-9a6f-d33af99d
Example
{"payment_id":"c568741f-783d-4b40-9a6f-d33af99d"}
Responses
🟢200Success
application/json
Body
event_type
string
required
The sent Adyen event message type
Example:
service.abort.request
event
string
required
If the cancellation was successful
Examples:
successfailure
event_condition
string|null
required
The condition of the event
Examples:
abortednotfoundnull
payment_id
string
required
The ID of your Payment of the cancellation
store_id
string
required
The Store ID associated with the API Key and payment
terminal_id
string
required
The ID of the pysical Adyen terminal where the payment took place
pos_id
string
required
The ID of your POS terminal where the payment took place