Antylogic
DemoApp login

399 operational guides

Docs sections
DocsTPV and payments
Device

Cancel a TPV payment operation

Stop a TPV payment operation before it becomes a completed ticket payment, while keeping the cancellation visible for later review.

In this article

Use this guide when an in-progress payment operation should be stopped from the ticket payment workflow. The ticket payment screen is the main path because it can record the richest cancellation context.

The terminal operations panel is a secondary path for terminal-scoped operations during an active service session. It marks the operation as cancelled through the backend update path only.

Before you start

  • Work in the correct organisation and location, for example Harbor Demo Group > Harbor Soho.
  • The operator can open TPV surfaces for the location; the UI requires `tpv:use`.
  • A `tpv_payment_operation` already exists in the current location and is visible for the selected ticket or active service session.
  • The operation is visible for the selected terminal and is not already completed or cancelled.
  • External cancellation details are only recorded when the active payment method matches a local adapter such as `redirect_payment`, `http_bridge_payment` or `mock_payment`.

Instructions

  1. 1.

    Open the ticket payment screen

    Open the advanced TPV payment screen for the active ticket, terminal and staff member. The screen loads the ticket, active payment methods and payment operations for that ticket, then refreshes the operations list periodically.

  2. 2.

    Confirm the operation can be cancelled

    Find the pending, claimed, requires_action or failed operation. Confirm it by amount, status, terminal context and any external reference. The reviewed UI shows Cancel only when the operation is not already completed or cancelled.

  3. 3.

    Press Cancel

    Select Cancel on the operation. From the ticket payment screen, Antylogic checks the payment method first. If a matching adapter can cancel externally, the app calls it before updating Antylogic. If no adapter applies, the operation is cancelled as manual or backend-only according to the method context.

  4. 4.

    Check the cancelled result

    After the update succeeds, the operation appears as cancelled. The advanced ticket payment screen can show the cancellation time, reason, cancelling staff member, terminal claim, external reference and adapter cancellation payload when those details were available.

  5. 5.

    Use terminal operations when needed

    From the TPV floor screen, open More TPV actions > Terminal payment operations. This panel cancels terminal-scoped operations for the active service session with terminal fields only; it does not call the local adapter and does not send cancellation reason or cancelling staff fields.

Validations and limits

  • There is no dedicated `/cancel` endpoint; cancellation uses `PUT /api/app/{orgId}/{locationId}/tpv-payment-operations/{operationId}`.
  • If the adapter fails or throws an error, the ticket payment screen shows the error and does not send the backend cancellation update.
  • The backend sets `cancelled_at` when the operation is first marked as cancelled; the frontend update type does not send that timestamp.
  • Cancellation does not create a ticket payment, ticket payment allocation or TPV output job.
  • The terminal operations panel excludes operations with `execution_mode` `manual` or `backend_api` and sorts by latest requested time.

Expected result

The payment operation is marked `cancelled`, the ticket remains unchanged by the cancellation itself, and the operation keeps the available audit context for later review.

Related articles