POST
/ecr/{serialNumber}/paymentInitiate an ECR payment
Initiates a payment on an ECR terminal. Supply amount in cents and the payment currency; you can also provide payment options, a reference, a tip, or shop items. A successful response includes the payment identifier and current payment details.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
serialNumberstringrequired
The serial number of the ECR terminal to use for the payment.
Payment details and optional receipt, reference, tip, and shop-item information.
amountintegerrequired
in cents
currencystringrequired
The currency for the payment.
paymentMethodstringoptional
Optional. Restricts the transaction to a specific payment method (e.g. "twint"). NexGo only — ignored on Newland terminals. Twint is not yet available on Newland terminals.
paymentReferencestringoptional
A reference to associate with the payment.
printSlipbooleanoptional
Whether to print a payment slip.
shopItemsarray<object>optional
Items associated with the payment. Each item can include a name, price and discount in cents, quantity, unit, and VAT; `name` is required for each item.
tipAmountintegeroptional
In cents, added to the total.
transactionDescriptorstringoptional
Optional free-text descriptor for the transaction.
200Returns payment data, including the payment identifier, amount, currency, payment method, status, and any supplied reference or tip details.
dataobjectoptional
messagestringoptional
Contains error messages
statusstringrequired
400Returned when `amount` or `currency` is missing or the payment request is invalid.
errorobjectoptional
messagestringoptional
reasonstringoptional
statusstringoptional
404Returned when the ECR terminal cannot be found.
errorobjectoptional
messagestringoptional
reasonstringoptional
statusstringoptional
Error handling
A 400 is returned when amount or currency is missing or the payment request is invalid. A 404 is returned when the terminal identified by the serialNumber path parameter cannot be found. amount is expressed in cents.