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

# Cancel Order

> Cancel one of your payment orders that has not yet reached a final state.

Cancels an order you own. Orders that are already final (`cancelled`,
`expired`, `settled`, `refunded`) are returned unchanged with a message noting
they are final.

<Note>
  Cancelling only affects Rails' order record. For a non-custodial EVM/Starknet
  order, if you have already submitted `createOrder` on-chain, settlement follows
  the on-chain state — cancel before you submit.
</Note>

### Header Parameters

<ParamField header="API-Key" type="string" required>
  Unique API key issued manually through Telegram.
</ParamField>

### Path Parameters

<ParamField path="id" type="string" required>
  The order id (`orderRef`) returned at creation.
</ParamField>

### Response

<ResponseField name="status" type="string">Response state (`success`).</ResponseField>

<ResponseField name="data" type="object">
  <ResponseField name="id" type="string">Order id.</ResponseField>
  <ResponseField name="status" type="string">Lifecycle state — `cancelled` on success.</ResponseField>
</ResponseField>

<ResponseExample>
  ```json Response (200 OK) theme={null}
  {
    "status": "success",
    "message": "Order cancelled",
    "data": { "id": "c7326d65-dfff-44c2-8bcc-c0756dfb6c0a", "status": "cancelled" }
  }
  ```
</ResponseExample>
