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

Refund a payment on an ECR terminal

Submits a refund for a completed payment on an ECR terminal. On Newland terminals, omit amount or send 0 for a full refund; partial refunds are not supported, and refunds are not currently available on NexGo terminals. The response includes the refund result and reversal status.

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

2 parameters · 1 body field
serialNumberstringrequired
The serial number of the ECR terminal associated with the payment.
paymentIdstringrequired
The unique identifier of the payment to refund.

Optional refund request. Omit amount or send 0 for a full refund; Newland supports only the full transaction amount.

amountintegeroptional
In cents. Optional — omit or send 0 for a full refund. Newland only accepts the full transaction amount; a smaller value is rejected.

4 status codes
200Returns the refund result, including payment details and the reversal status.
dataobjectoptional
messagestringoptional
Contains error message
statusstringrequired
400Returned when the refund request is invalid, including when a partial refund is requested on a Newland terminal.
errorobjectoptional
messagestringoptional
reasonstringoptional
statusstringoptional
404Returned when the specified terminal or payment is not found.
errorobjectoptional
messagestringoptional
reasonstringoptional
statusstringoptional
501Returned when a refund is requested on a NexGo terminal, where refunds are not currently available.
errorobjectoptional
messagestringoptional
reasonstringoptional
statusstringoptional

Error handling

A 400 is returned when amount requests a partial refund on Newland; omit it or send 0 for a full refund. A 404 is returned when the serialNumber path parameter or paymentId path parameter does not identify the target terminal or payment. A 501 is returned because refunds are not currently available on NexGo terminals.