Search

Are you looking for test card numbers?

Would you like to contact support?

Point-of-sale icon

Cancel a payment

Learn how to cancel a transaction while it is in-progress.

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 payments can be cancelled from:

Cancel from cash register

While a payment request is in-progress, you can cancel it by making an cancel request from your cash register.

  1. Make a POST request to a Terminal API endpoint, specifying:

    • AbortRequest: The request body with:

      Parameter Required Description
      AbortReason -white_check_mark- MerchantAbort
      MessageReference -white_check_mark- An object with:
      • MessageCategory: Payment
      • SaleID: Your unique ID of the cash register that made the payment request.
      • ServiceID: The ServiceID of the payment request being cancelled.

    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"
          }
        }
      }
    }

    For a complete list of fields you can pass when cancelling an in-progress payment, see the AbortRequest API reference.

    No API response is generated for the cancel request. You only receive a 200 OK HTTP response.

    If cancelling was successful:

    • The terminal shows a Cancelled message on the display.
    • The payment request returns a response containing:

      • Result: Failure
      • ErrorCondition: Aborted

  2. To double-check the payment was indeed cancelled, make a TransactionStatusRequest , specifying:

    • MessageReference: An object with:

      • SaleID: The SaleID of the cash register that made the payment transaction you tried to cancel.
      • ServiceID: The ServiceID of the payment transaction 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 transaction not found response. The TransactionStatusResponse.Response has an ErrorCondition of NotFound.

Cancel from terminal

To cancel an in-progress payment from a terminal:

  1. Select the button on the terminal keypad.
  2. On the display of the terminal, confirm that you want to cancel the transaction.

If this is successful:

  • The terminal displays a Cancelled message on the screen.
  • The payment request returns a response containing:

    • Result: Failure
    • ErrorCondition: Cancel

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.

Next steps