Want to cancel an authorised payment?
If you're using delayed capture or manual capture instead of automatic capture, you can cancel an authorisation.
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 app by sending an
AbortRequest
. - The terminal.
Cancel from your POS app
While a
PaymentRequest
is in progress, you can cancel it by making an AbortRequest
from your POS app.
-
Make a POST request to a Terminal API endpoint, specifying:
-
MessageHeader
: the standardSaleToPOIRequest.MessageHeader
object. This includes:Parameter Required Description MessageClass
Service MessageCategory
Abort
-
AbortRequest
: The request body with:Parameter Required Description AbortReason
MerchantAbort MessageReference
An object with: MessageCategory
: PaymentSaleID
: your unique ID of the POS system component that made the payment request.ServiceID
: TheServiceID
of the payment request being cancelled.
For more details see the AbortRequest API reference.
The example below shows how you would make a request to cancel an in-progress payment with a
ServiceID
of 21796.{ "SaleToPOIRequest":{ "MessageHeader":{ "ProtocolVersion":"3.0", "MessageClass":"Service", "MessageCategory":"Abort", "MessageType":"Request", "SaleID":"POSSystemID12345", "ServiceID":"29239", "POIID":"V400m-324688179" }, "AbortRequest":{ "AbortReason":"MerchantAbort", "MessageReference":{ "MessageCategory":"Payment", "SaleID":"POSSystemID12345", "ServiceID":"21796" } } } }
A successful
AbortRequest
returns a response with a200 OK
HTTP status code and no body.The payment request returns a response containing:
Result
: Failure-
ErrorCondition
: Aborted
If you cancel before the shopper presents the card, the payment prompt disappears from the terminal display.
You can also cancel after the shopper presents the card, as long as the payment isn't completed yet. For example, after presenting the card but before entering the PIN. The terminal then shows Cancelled.After the payment is completed, you cannot use the
AbortRequest
to cancel the payment. -
-
To double-check the payment was indeed cancelled, make a
TransactionStatusRequest
, specifying:-
MessageReference
. This includes:SaleID
: TheSaleID
of the POS system component that made the payment you tried to cancel.ServiceID
: TheServiceID
of the payment you tried to cancel.-
MessageCategory
: Payment
The example below shows how you would check the transaction status of a payment with
ServiceID
21796, which you tried to cancel.{ "SaleToPOIRequest": { "MessageHeader": { "ProtocolVersion": "3.0", "MessageClass": "Service", "MessageCategory": "TransactionStatus", "MessageType": "Request", "SaleID": "POSSystemID12345", "ServiceID": "29240", "POIID": "V400m-324688179" }, "TransactionStatusRequest": { "ReceiptReprintFlag": true, "DocumentQualifier": [ "CashierReceipt", "CustomerReceipt" ], "MessageReference": { "SaleID": "POSSystemID12345", "ServiceID": "21796", "MessageCategory": "Payment" } } } }
If the payment was cancelled, you should receive a successful transaction status response with a
RepeatedResponseMessageBody
that has anErrorCondition
of Aborted. -
Cancel from the terminal
To cancel an in-progress payment on a terminal:
- On the terminal keypad, select the Cancel key
In case of a terminal without a keypad, on the display select the Cancel icon
If this is successful:
- The terminal shows a Cancelled message on the display.
-
The payment request returns a response containing:
Result
: Failure-
ErrorCondition
: Cancel
Cancelling a signature on the display
In a Terminal API integration with a terminal that is configured to let shoppers draw their signature on the display, the transaction is already authorised when the signature prompt appears. Therefore, the terminal always approves the signature even when the shopper selects Cancel on the signature screen. See Signature for more information.
Handling failed cancel requests
If your cancel request failed (and the payment was Approved), you will need to refund the payment. For more information on refunding a payment, see Refund a completed payment.