Terminal responses
The customer polls the API with the poll id using the /poll/terminalresponse/{pollId} endpoint. The latest terminal response is delivered in the response.
Contract
The following contract is delivered in the response body. All properties are optional and the endpoints must not fail if new properties are added. Properties will never be removed from the contract.
{ "eventType": "NONE", "callbackUrl": "string", "correlationId": "string", "terminalResponse": { "additionalProp1": "string", "additionalProp2": "string", "additionalProp3": "string" } }
These are the properties you must expect to receive for eventType SALE_COMPLETED. Properties will never be removed from the contract.
"terminalResponse": { "cardholderReceipt": "string", "merchantReceipt": "string", "responseCode": "string", "result": "string", "transCancelled": "string", "cardTypeExtra": "string" "authorizationCode": "string", "amount": "string", "cardPan": "string", "stan": "string", "terminalId": "string", "merchantId": "string", "softwareVersion": "string", "retrievalReferenceNumber": "string", "longitude": "string", "latitude": "string", "radius": "string", "lastSync": "string" }
These are the properties you must expect to receive for eventType TERMINAL_ERROR . Properties will never be removed from the contract.
"terminalResponse": { "errorMessage": "string" }
Event types
SALE_RECEIVED - The terminal has received the request and is in the process of handling it. No action required by the registry system.
SALE_COMPLETED - registry system must confirm reception of the response using the /poll/confirmation endpoint. Failure to do so will cause the terminal to void the result of the transaction.
SALE_CANCELLED - Cardholder or merchant have cancelled the transaction at the POS device. Final state for a transaction, no further actions available.
TERMINAL_BUSY - A terminal can only process one sale at a time. This status indicates that the terminal is in the middle of processing another sale. Retry to check for availability.
TERMINAL_ERROR - The terminal is inoperable. A reason is given in the TerminalResponse. No cleanup required on behalf of the registry system.