# Order Cancel

Hosted Checkout order cancellation APIs

## Cancel Hosted Checkout Order

> Cancels an unpaid hosted checkout order and updates\
> the order status to CANCELLED.<br>

```json
{"openapi":"3.1.0","info":{"title":"KwikPaisa Order Cancel API","version":"1.0.0"},"tags":[{"name":"Order Cancel","description":"Hosted Checkout order cancellation APIs"}],"servers":[{"url":"https://sandbox.kwikpaisa.com","description":"Sandbox Environment"},{"url":"https://api.kwikpaisa.com","description":"Production Environment"}],"paths":{"/api/v3/pg/order/cancel":{"post":{"tags":["Order Cancel"],"summary":"Cancel Hosted Checkout Order","description":"Cancels an unpaid hosted checkout order and updates\nthe order status to CANCELLED.\n","operationId":"cancelHostedCheckoutOrder","parameters":[{"in":"header","name":"X-API-KEY","required":true,"schema":{"type":"string"}},{"in":"header","name":"X-SIGNATURE","required":true,"schema":{"type":"string"}},{"in":"header","name":"X-TIMESTAMP","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrderRequest"}}}},"responses":{"200":{"description":"Order cancelled successfully","content":{"application/json":{}}},"401":{"description":"Authentication failed","content":{"application/json":{}}},"404":{"description":"Order not found","content":{"application/json":{}}},"409":{"description":"Permission denied","content":{"application/json":{}}}}}}},"components":{"schemas":{"CancelOrderRequest":{"type":"object","required":["order_id"],"properties":{"order_id":{"type":"string"}}}}}}
```


---

# Agent Instructions: 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:

```
GET https://developers.kwikpaisa.com/v3-api-reference/payment-gateway/readme/order-cancel.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
