Implement the payment flow
The requests and features every ECR must support before going live, with one guide for each.
Integrate your ECR · task 5 of 8
This task covers the requests and features every ECR must support before going live. Your ECR can already connect and open a session (see Connect your ECR).
Every ECR needs to:
- Make a payment, with a Payment request.
- Cancel an in-progress payment, with an Abort request.
- Generate receipts from the receipt data in the payment response.
- Verify transaction status when a response is lost, with a TransactionStatus request.
- Check the connection to the terminal and the payment host, with a Diagnosis request.
- Handle events from the terminal, with Event notifications.
- Handle responses and timeouts for every request.
Together with Login and Logout from task 4, this is the minimum message set. Everything else, such as refunds, reversals and cashback, is optional: see Add optional features.
- 1Your ECR → TerminalLoginYour ECR opens a session with the terminal. Do it once, before anything else.
- 2Terminal → Your ECRLogin responseResult Success: the terminal is ready. The response also lists the card brands it accepts.
- 3Your ECR → TerminalPaymentYour ECR sends the amount and its own transaction ID.
- 4Terminal → Your ECRDisplay: WAITING_FOR_CARDThe terminal tells your ECR what it's doing. Show it to the cashier.
- ·MeanwhileCustomer taps, inserts or swipes the cardAbove the contactless limit, the terminal asks for the PIN.
- 5Terminal → AeraAuthorisationThe terminal asks for approval.
- 6Aera → TerminalApprovedAera answers the terminal.
- 7Terminal → Your ECRPayment response: AeResponseCode 000Your ECR reads AeResponseCode (0xx is approved) and prints the receipt text exactly as it comes.
Minimum message set
| Message | Why | Guide |
|---|---|---|
| Login and Logout | Open and close a session | Open a session |
| Payment | Take a payment | Make a payment |
| Abort | Cancel a payment from the ECR | Cancel an in-progress payment |
| TransactionStatus | Find the result if a response was lost | Verify transaction status |
| Diagnosis | Check the connection to the terminal and host | Check the connection |
| Event | Handle notifications from the terminal, including rejects of messages it can't read | Handle events |
Rules for every ECR
- Ignore fields you don't recognise. New fields are added over time, and an unknown field must not make your ECR fail.
- Show Display messages to the cashier. They can arrive at any time during a transaction. Don't rely on their order, number or text: these can change with the terminal's software version and language.
- Never charge twice. If a response is lost, reconnect if needed and check TransactionStatus before you try again.
- Use UTF-8.
Specifications
- Messages: every message, with full examples and all fields.
- Nexo Retailer specifications (NIS v4 package). Aera's XSD file for this implementation is available on request from Aera.
Next steps
Work through these in order. All are required.
Send a Payment request and handle the result.
Cancel from the ECR with Abort.
Print Aera's receipt data as it is.
Find the result when a response is lost.
Check the terminal and payment host with Diagnosis.
Handle notifications and rejects from the terminal.
Error conditions, timeouts and unknown results.
Next
Updated 5 days ago