> For the complete documentation index, see [llms.txt](https://developer.magtek.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.magtek.com/hardware/card-readers/mms-dyna-devices/dynaprox/documents/programmers-manuals/programmers-manual-commands/commands/transactions/cancel-transaction.md).

# Cancel Transaction

## Command 0x1008 - Cancel Transaction

The host can use this command to cancel a transaction in progress that it initiated using Command 0x1001 - Start Transaction.

Sequence of events:

{% stepper %}
{% step %}

### Host has already started a transaction

The host has already called Command 0x1001 - Start Transaction and the transaction is still in process.
{% endstep %}

{% step %}

### Construct the command request

The host constructs the command request in the format below.
{% endstep %}

{% step %}

### Send the command request

The host sends the command request to the device.
{% endstep %}

{% step %}

### Device sends a response

The device sends a response in the format below to the host:

* If the transaction is in a state where it cannot be canceled, the device’s response returns operation status detail: Failed, Device State Issue, Cannot Cancel.
* If there is no transaction in progress, the device’s response returns operation status detail: Failed, Device State Issue, No Transaction.
* If the device successfully cancels the transaction, the device’s response returns operation status detail: All Good, Requested Operation Was Successful, shows "CANCELED" and returns to the idle state. The display (if any) shows "CANCELED".
  {% endstep %}
  {% endstepper %}

## Table - Request Data for Command 0x1008 - Cancel Transaction

<table><thead><tr><th width="288.54541015625">Tag</th><th width="73.33331298828125">Len</th><th width="124.66668701171875">Value / Description</th><th width="74.33331298828125">Typ</th><th width="76.66668701171875">Req</th><th width="94.666748046875">Default</th></tr></thead><tbody><tr><td>Beginning of any wrappers, at minimum including Request Message</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>1008 = Command 0x1008 - Cancel Transaction</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>No parameters.</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>End of any wrappers, at minimum including Request Message</td><td></td><td></td><td></td><td></td><td></td></tr></tbody></table>

## Table - Response Data for Command 0x1008 - Cancel Transaction

<table><thead><tr><th width="300">Tag</th><th width="74">Len</th><th width="124.66668701171875">Value / Description</th><th width="76.33331298828125">Typ</th><th width="78.33331298828125">Req</th><th width="94.33331298828125">Default</th></tr></thead><tbody><tr><td>Beginning of any wrappers, at minimum including <a href="https://magtek.gitbook.io/magtek-pilot-gitbooks/internal-documentation/index/3.0-messages-requests-responses-notifications-and-files/3.3-message-structure#response-message">Response Message</a></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>1008 = Command 0x1008 - Cancel Transaction</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>No parameters.</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>End of any wrappers, at minimum including <a href="https://magtek.gitbook.io/magtek-pilot-gitbooks/internal-documentation/index/3.0-messages-requests-responses-notifications-and-files/3.3-message-structure#response-message">Response Message</a></td><td></td><td></td><td></td><td></td><td></td></tr></tbody></table>

## Table - Request Example

Example (Hex)

```hex
AA 00 81 04 01 13 10 08 84 02 10 08
```

## Table - Response Example

Example (Hex)

```hex
AA 00 81 04 82 13 10 08 82 04 00 00 00 00
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.magtek.com/hardware/card-readers/mms-dyna-devices/dynaprox/documents/programmers-manuals/programmers-manual-commands/commands/transactions/cancel-transaction.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
