# Abort (/global/en/docs/Terminal/SystemServices/Abort)

## Abort

Sometimes your shoppers change their mind about mid-purchase, or store staff realize they've made a mistake while the shopper is using the terminal.\
A cancel request lets either a shopper or store staff abort an in-progress transaction. When the cancel request is received before a payment is approved, the payment is cancelled.

#### Abort Request

**AbortParam**

**orgTransactionReference** *string*

Global reference of the original sale transaction for the sale system. Not required when clearing a Display using orgExchangeIdentification.

**More parameters**

**abortReason** *string*

Reason for aborting a transaction.

**orgExchangeIdentification** *string*

Unique identification of original exchange occurrence.

#### Abort Response

**AbortResult**

**recipientPartyIdentification** *string* — Required

Unique identification of the partner that is the recipient of the message exchange.\
For example, the POS SN

**response** *enum* — Required

Result of the requested transaction.

**Possible enum values**

- `SUCC` — "Success.\nProcessing OK. Information related to the result of the processing is contained in other parts of the response message."
- `FAIL` — "Failure.\nProcessing of the request fails for various reasons."
- `PART` — "Partial Approved.\nThe service was partially completed. Use the Message Status service to query the final transaction status."

**responseReason** *string*

Detail of the response.

**Possible enum values**

- `ABRT` — "Aborted.\nThe initiator of the request has sent an abort message request, which was accepted and processed."
- `BUSY` — "Busy.\nThe system is busy, try later."
- `CANC` — "Cancel.\nThe user has aborted the transaction on the PED keyboard, for instance during PIN entering."
- `DEVO` — "DeviceOut.\nDevice out of order."
- `WPIN` — "WrongPIN.\nThe user has entered the PIN on the PED keyboard and the verification fails."
- `NHOS` — "UnreachableHost.\nAcquirer or any host is unreachable or has not answered to an online request, so is considered as temporary unavailable.\nDepending on the Sale context, the request could be repeated(to be compared with \\"Refusal\\")"
- `UNVS` — "UnavailableService.\nThe service is not available (not implemented, not configured, protocol version too old…)."
- `UNVD` — "UnavailableDevice.\nThe hardware is not available (absent, not configured…)"
- `REFU` — "Refusal.\nThe transaction is refused by the host or by the local rules associated to the card or the POI."
- `TNFD` — "NotFound.\nThe transaction is not found (e.g. for a reversal or a repeat)."
- `WIPG` — "InProgress.\nThe transaction is still in progress and then the command cannot be processed."

**additionalResponseInformation** *string*

Additional information to be logged for further examination.

```java
AbortParam param = AbortParam.newBuilder()
        .orgExchangeIdentification("000000001")
        .abortReason("User cancel")
        .build();
RetailerManager.provideSystemService()
        .newAbortExchange(param)
        .startAsyncExchange(new Exchange.RetailerSDKCallback<AbortResult>() {
            @Override
            public void onError(int code, String msg) {
                Log.e(TAG, "failed: " + code + ", " + msg);
            }
            @Override
            public void onResult(AbortResult result) {
                Log.i(TAG, "result: " + GsonUtils.toJson(result));
            }
        });
```