POST {{baseURL}}/v2/pos/transactions/{{posTransactionId}}/cancel
This endpoint cancels a POS transaction by ID.
This sends a cancellation signal to the gateway to abort an in-progress POS transaction.
It can only be called while the transaction is in a cancellable state. This is typically before the customer has presented their card on the terminal.
A cancellation request is not guaranteed if the terminal has already begun processing the payment. In that case the posTransactionStatus reflects the actual terminal outcome.
This endpoint is idempotent. See the idempotency-key header entry. For more information, see Idempotency.
This endpoint requires a merchant API token. A partner API token will result in a permissions error including possibly a 403 response.
See Also:
To list POS transactions, see GET /v2/pos/transactions.
To retrieve a POS transaction by ID, see GET /v2/pos/transactions/{posTransactionId}.
To create a POS transaction reversal, see POST /v2/pos/transactions/reversal.
To print a receipt for a POS transaction, see POST /v2/pos/transactions/{posTransactionId}/print-receipt.
Specifies the client-generated idempotency-key.
This key is optional. We recommend using the key to prevent multiple invocations of the operation. This key makes this request safely retryable, or idempotent. If the idempotency key is not included, the call will not have idempotency protection.
A retry with the same key, made within the retention window, returns the original response verbatim. The operation is not repeated. The retention window, also called the TTL (time to live) is 1440 minutes (24 hours) by default but this setting may be changed.
A retry with the same key while the original request is still processing returns 409 Conflict (IdempotencyKeyInProgress). Retry again after a short delay.
Reusing the same key with a different request body returns 422 Unprocessable Content (IdempotencyKeyConflict). Generate a new key for each distinct operation.
A 500 series server error is not stored under the key. A retry with the same key after a 500 series response processes the request again.
- Sandbox environmenthttps://sandbox.api.flute.com/v2/pos/transactions/{posTransactionId}/cancel
- Production environmenthttps://api.flute.com/v2/pos/transactions/{posTransactionId}/cancel
// Language is not supported.Indicates the POS transaction identifier.
Example: f77b4b4d-2f35-4cd2-8631-31318a4713a1
Indicates the status of the transaction.
Valid values are:
| Value | Description |
|---|---|
| Cancelled | The POS transaction was canceled before it completed. |
| Completed | The POS transaction finished processing successfully. |
| Failed | The POS transaction did not complete because of an error. |
| InProgress | The POS transaction is still being processed. |
Example: Completed
Indicates the date-time, in ISO 8601 UTC format, when the POS transaction was created.
Example: 2026-01-15T10:30:56.264Z
Indicates the date-time (in an ISO 8601 UTC date-time format) when the POS transaction was last updated.
Example: 2026-03-16T16:32:58.743Z
Specifies the merchant identifier.
Example: 5611f824-48ef-4255-978d-91ce13953bbd
Identifies the customer to link this payment method to.
This value may be null when this payment method is an orphan owned by the merchant directly. An orphan payment method is a payment method in the merchant's vault but has no customer record associated with it.
A list of customer identifiers can be retrieved with GET /v2/customers.
Example: 8fa8e727-73c6-436e-b56f-6f55aabf3b1c
Indicates the terminal identifier that handles the transaction.
The terminal must be in semi-integrated mode and available (online and ready). A semi-integrated terminal is one that is connected to a POS system, typically through a network or cable.
Example: 0dfac966-9dbd-4608-a65f-d6a4c961dd35
Specifies the payment processor.
This defaults to the merchant's default processor.
A list of payment processor identifiers for a specified customer can be retrieved with GET /v2/settings/payment-configuration.
Example: 76215e54-a85b-4d42-9553-163fe393cb02
Indicates the external POS terminal identifier.
Example: POS-DEVICE-001
Specifies an external transaction identifier for client-side tracking.
It is also used in duplicate control validation. A unique value allows similar transactions to process as distinct, bypassing duplicate blocking when needed.
Example: REF-EXT-12345
Specifies the capture method.
Capture is the step that converts an authorization, funds reserved before a transaction, into an actual charge or funds captured for settlement.
Possible values:
| Value | Description |
|---|---|
| Auto | The transaction is captured automatically at the same time as authorization or immediately after, with no separate action required. |
| Manual | The transaction has been authorized. However, an explicit capture request must be made later to actually allocate the money. Care must be taken because if the transaction is never captured, the authorization simply expires and no funds move. |
Example: Auto
Identifies how the transaction reaches the terminal.
Valid values are:
| Name | Description |
|---|---|
| Cloud | Specifies communications by pushing through the cloud. Flute's backend sends (pushes) the transaction request to the physical terminal device over Flute's own cloud connection. The terminal maintains a persistent link to Flute's servers. The transaction details arrive there without the merchant's POS application having to talk to the terminal directly. |
| Deeplink | Specifies communications by calling the POS software application terminal's payment directly on the device. This is through a deep link or URL scheme such as a local, on-device handoff rather than a round-trip through Flute's cloud. waitForAcceptanceByTerminal must be false for Deeplink. |
Example: Cloud
Indicates the attached transaction identifier.
This value is available after processing.
Example: f01339ec-8184-48c7-b58d-0780d6499ef4
Identifies the base transaction amount (in USD) before adjustments.
Examples:
125
125.5
125.50
Specifies the transaction's currency code (in uppercase ISO 4217 currency code).
Example: USD
Identifies the extra amounts for the transaction.
To accept tips, the merchant is required to have tips enabled and tip-adjustment disabled. If tip collection is enabled and committed at creation time, the tip gets prompted to the customer directly on the device.
Indicates the transaction amount (in USD).
The value will be null until the transaction is completed.
Examples:
87.39 (for $87.39)
null
{ "posTransactionId": "2eca4f2c-0cc2-4355-aa0b-a3e65368591d", "posTransactionStatus": "Cancelled", "createdOn": "2026-06-03T21:59:31.891Z", "modifiedOn": "2026-06-03T22:00:05.412Z", "merchantId": "746ba4dd-b1b4-47c3-a034-72aa55007e86", "customerId": "8fa8e727-73c6-436e-b56f-6f55aabf3b1c", "terminalId": "a84af02c-6de3-40ac-abda-0d8db96dec7b", "paymentProcessorId": "451e4f53-9d81-48d8-a7c4-8167595adffa", "posDeviceId": "POS-DEVICE-001", "referenceId": "REF-EXT-12345", "captureMethod": "Auto", "initiationChannel": "Cloud", "transactionId": null, "baseAmount": 135.5, "currencyCode": "USD", "extraAmounts": null, "processedAmount": null, "linkedTransaction": null }