Cancel a request that is still in progress.
| Message category | Class | Direction |
|---|---|---|
Abort | Service | ECR → terminal |
Used in these guidesConnect your ECR · Implement the payment flow · Cancel an in-progress payment · Handle responses and timeouts · Loyalty and card acquisition · Test and get approved
Attempt to abort a transaction that has been requested by the ECR, but not yet started. E.g. after a service request has been sent by the ECR, but before the cardholder has tapped the card or entered PIN and pressed OK.
Note: there is no AbortResponse - if successfully aborted, the status will be communicated in the original service response, in this example the PaymentResponse. If the abort request is unsuccessful, the transaction continues as it would otherwise.
Example request and response
All fields
Example request
{
"SaleToPOIRequest": {
"MessageHeader": {
"ProtocolVersion": "3.1",
"ServiceID": "2",
"MessageClass": "Service",
"MessageCategory": "Abort",
"MessageType": "Request",
"SaleID": "ECR123",
"POIID": "AT12345"
},
"AbortRequest": {
"MessageReference": {
"MessageCategory": "Payment",
"ServiceID": "1"
},
"AbortReason": "Aborted from ECR"
}
}
}| Field | Required | Description |
|---|---|---|
AbortRequest | Required | Contains the fields below |
↳ MessageReference | Required | Contains the fields below |
↳ MessageCategory | Optional | MessageCategory of request to be aborted |
↳ ServiceID | Must be present if DeviceID absent | ServiceID of request to be aborted |
↳ DeviceID | Must be present if ServiceID absent. | DeviceID of request to be aborted |
↳ AbortReason | Required | Reason for abort. Used for logging purposes |
Example response, successful abort
{
"SaleToPOIResponse": {
"MessageHeader": {
"MessageCategory": "Payment",
"MessageClass": "Service",
"MessageType": "Response",
"POIID": "AT12345",
"ProtocolVersion": "3.1",
"SaleID": "ECR123",
"ServiceID": "1"
},
"PaymentResponse": {
"Response": {
"AdditionalResponse": "",
"ErrorCondition": "Aborted",
"Result": "Failure"
},
"SaleData": {
"SaleTransactionID": {
"TransactionID": "12345"
}
},
"POIData": {
"POITransactionID": {
"TransactionID": "0"
}
}
}
}
}In this example, the Abort request was successful, and this is communicated to the ECR by setting Response/Result to 'Failure' and Response/ErrorCondition to 'Aborted' in the PaymentResponse message belonging to the PaymentRequest that was aborted. The returned transaction ID can be ignored, as the transaction was never initiated.