> ## Documentation Index
> Fetch the complete documentation index at: https://devzone.nayax.com/llms.txt
> Use this file to discover all available pages before exploring further.

# abortTransaction

The `abortTransaction` method cancels an ongoing transaction before it is registered in the database, meaning before a doTransaction Response is received (= prior to a consumer's card presentation / prior to a transaction timeout taking place).\
This ensures that transactions in progress but not yet finalized can be safely terminated without affecting the merchant's records.

This method is beneficial when a user initiates a transaction but cancels before completion or when an issue is detected during processing that requires stopping the transaction.

## Request

<Note>
  **JSON-RPC 2.0**

  All methods in TweezerComm follow a JSON-RPC 2.0 structure. See [Integration](/docs/integrate-pos-device/tweezercomm/tweezercomm-get-started) for more details on how the requests are structured and sent.
</Note>

In the request, the `method` field needs to be set to `abortTransaction`. As in the example request below:

```json theme={null}
{
    "jsonrpc":"2.0",
    "method":"abortTransaction",
    "id":"123454352",
    "params": [
            "engine",{
                "vuid": "cb740169-7758-4f55-b685-b90652b9aba6"
                    }
        ]
}
```

### Request Parameters

The table below describes the request parameters for this method.

| Name   | Type   | Description                                    |
| ------ | ------ | ---------------------------------------------- |
| `vuid` | string | Vendor (client) unique transaction identifier. |

## Response

A successful request will return the following response:

```json theme={null}
{
    "jsonrpc": "2.0",
    "id": "123454352",
    "result": {
        "statusCode": 0,
        "statusMessage": "ok"
    }
}
```

### Response Parameters

The table below describes the response parameters for this method.

| Name            | Type    | Description                        |
| --------------- | ------- | ---------------------------------- |
| `statusCode`    | integer | The operation status (0 = success) |
| `statusMessage` | string  | Operation message                  |
