Are you looking for test card numbers?

Would you like to contact support?

Cancel a payment

Learn how to cancel an in-progress transaction.

Sometimes your shoppers change their mind about a purchase, or store staff realize they've made a mistake as 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.

To make a cancel request:

  • Make a POST request to a Terminal API endpoint, specifying:

    • content-type: application/json.
    • x-api-key: Your API key. This is only required if you're using cloud-based communications.
    • SaleToPOIRequest.AbortRequest:

      • AbortReason: MerchantAbort
      • MessageCategory: Payment
      • SaleID: Your unique ID of the cash register that made the payment request.
      • ServiceID: The ServiceID of the payment request being cancelled.
    • SaleToPOIRequest.MessageHeader:

      • ProtocolVersion: 3.0
      • MessageClass: Service
      • MessageCategory: Abort
      • MessageType: Request
      • SaleID: Your unique ID for the cash register making the cancel request.
      • ServiceID: Your unique ID generated by this cash register for this cancel request. This value must be unique within the last 48 hours.
      • POIID: Unique ID of the terminal making the cancel request.

        The POIID = [Terminal model]-[Serial number], for example: P400Plus-123456789.

    The example below shows how you would make a request to cancel an in-progress payment with a ServiceID of 21796.

    The integration in this example uses synchronous, cloud-based communication.

    curl -H "content-type:application/json" -H "x-api-key:YOUR_API_KEY" -X POST --data-binary '{
    }' --url

    For a complete list of fields you can pass in a cancel request, see the AbortRequest API reference.

    No API response is generated for the cancel request. Instead, you receive a 200 OK HTTP response.

If the cancel request is successful:

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

Cancel from terminal

To cancel an in-progress payment from a terminal:

  1. Press the button on the terminal keypad.
  2. On the terminal screen, 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 ErrorCondition: Aborted.

Terminal API endpoints

For test transactions, use the endpoint below that corresponds to your integration architecture.

For more information on these architectures, see our Terminal API overview.


Endpoints for local communications with the Terminal API use the format:

  • https://[TERMINAL]:8443/nexo/ on port 8443 (https).
    Replace [TERMINAL] with the IP or resolvable hostname of the terminal.


For cloud-based communications with the Terminal API use either:

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