Cancel a Terminal Transaction
There is no dedicated void or refund sub-resource for terminal payments. Cancellations and reversals are expressed by updating the terminal payment's status via PATCH /terminal-payment/{id}.
Update the statusβ
curl -X PATCH https://api.ali.app/rest/terminal-payment/{id} \
-H "Authorization: Bearer <token>" \
-H "x-application-id: YOUR_APP_ID" \
-H "Content-Type: application/json" \
-d '{ "status": "cancelled" }'
The body is { externalId?, totalAmount?, status?, additionalData? }, where status is a CardTransfersStatus value:
| Status | Meaning |
|---|---|
created | Initial state |
approved | Approved |
processed | Processed |
denied | Denied |
reversed | Reversed |
refunded | Refunded |
cancelled | Cancelled |
in_progress | In progress |
liquidated | Liquidated / settled |
To cancel, set status to cancelled (or reversed). To mark a refund, set status to refunded. The response is the standard CustomResponse:
{
"success": true,
"data": { }
}
There is no action, reason, or reasonDetail field. If you need to attach contextual notes, use the free-form additionalData object on the terminal payment.
Device queries for transactionsβ
Retrieve past transactions on a specific device (useful for end-of-day reconciliation). The list covers the device's transactions for the last 180 days; there is no date filter.
# All transactions on a device (last 180 days)
curl "https://api.ali.app/rest/devices/{deviceId}/transactions" \
-H "Authorization: Bearer <token>"
# A specific transaction (numeric transactionId)
curl https://api.ali.app/rest/devices/{deviceId}/transactions/{transactionId} \
-H "Authorization: Bearer <token>"
deviceId is a string (e.g. device-abc123) and transactionId is a numeric integer id (e.g. 12345).
Webhooksβ
Outbound terminal_payment.* webhooks are not available.