# Payment Cancellation

QR code payment cancellation allows invalidating an active QR code that has not yet been used to complete a transaction. This process is useful when the customer's order is modified, canceled, or expires before payment is made.

There are two main scenarios for payment cancellation:

1. [**Cancel active QR code (Static/Dynamic)**](broken://pages/HMoLpPd3K3mfnkcHKq1y)\
   Endpoint: `POST /v2/mia/qr/{qrId}/cancel`\
   Used to cancel a standard QR code (static or dynamic) that is active but has not yet been used for payment. After cancellation, the QR code becomes inactive and cannot be used anymore.\
   The cancellation reason is sent in the request body.\
   The response contains the QR code status (`Cancelled`), confirming successful processing.
2. [**Cancel active extension for Hybrid QR**](broken://pages/xR58FrqIGr8ot2FWjbkQ)\
   Endpoint: `POST /v2/mia/qr/{qrId}/extension/cancel`\
   Applies only to Hybrid QR codes that have been extended (e.g., reused for a different order). This action revokes the active extension without fully canceling the original QR code.\
   Optionally, a cancellation reason for the extension can be provided.\
   The response contains the QR code status (`Cancelled`), confirming successful processing.<br>

> **Note:** Canceling a QR code does not affect payments already processed. If a payment has already been made, cancellation cannot be applied retroactively.


---

# 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://docs.maibmerchants.md/mia-qr-api/en/endpoints/payment-cancellation.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.
