POST/ecr/{serialNumber}/payment/{paymentId}/cancel

Cancel an ECR payment

Cancels a payment made through an ECR terminal. Supply the terminal's serialNumber and the payment's paymentId to identify the payment. The response returns the payment data and its current status.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

2 parameters
serialNumberstringrequired
The serial number of the ECR terminal associated with the payment.
paymentIdstringrequired
The identifier of the payment to cancel.

2 status codes
200Returns payment data, including amount, payment method, status, and any reversal status.
dataobjectoptional
messagestringoptional
Contains error message
statusstringrequired
400Returned when the payment cancellation request cannot be processed.
errorobjectoptional
messagestringoptional
reasonstringoptional
statusstringoptional

Error handling

A 400 is returned when the payment cancellation request cannot be processed. The serialNumber path parameter identifies the terminal, and the paymentId path parameter identifies the payment to cancel.