> For the complete documentation index, see [llms.txt](https://docs.neox.vn/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.neox.vn/docs/payment-gateway/transaction-management/cancel.md).

# Cancel

### Structure of Cancel Request

<mark style="color:blue;"><https://neopay-domain?\\[key1=value]&\\[key2=value]&>...</mark> (below table is the description of key and value, no ordering required)

**Method**: POST

### Table of Parameter

<table><thead><tr><th>Parameter</th><th width="117">Data type</th><th width="101">Required</th><th>Description</th></tr></thead><tbody><tr><td>neo_Command</td><td>String</td><td>Y</td><td>“CANCEL” as default</td></tr><tr><td>neo_MerchantCode</td><td>String</td><td>Y</td><td>The merchant code is provided by NeoX</td></tr><tr><td>neo_MerchantTxnID</td><td>String</td><td>Y</td><td>Unique - The merchant transaction ID is provided by merchant</td></tr><tr><td>neo_Version</td><td>String</td><td>Y</td><td>Version of API, "1" as default</td></tr><tr><td>neo_SecureHash</td><td>String</td><td>Y</td><td>Use <strong>SHA256</strong> to hash the above parameters (sort the key by Alphabet order) + Secret Key (is provided by NeoX after actual integrating)</td></tr></tbody></table>

### Table of Data Response

<table><thead><tr><th width="200">Parameter</th><th width="117">Data type</th><th>Description</th></tr></thead><tbody><tr><td>neo_ResponseCode</td><td>Number</td><td>Result of transaction:<br>0: transaction success<br>!= 0: transaction failed, refer to <a href="/pages/kU24dUIxUPVgYJPLKotj#table-of-error-code">table of error code</a></td></tr><tr><td>neo_ResponseMsg</td><td>String</td><td>Refer to <a href="/pages/kU24dUIxUPVgYJPLKotj">table of error code</a></td></tr></tbody></table>

*Note: Should call this API 5 mins after payment made.*


---

# 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://docs.neox.vn/docs/payment-gateway/transaction-management/cancel.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.
