# Endpoints

This section provides an overview of the functionalities exposed through the QR MIA API, presenting the complete list of available endpoints. Each endpoint is defined by the HTTP method, URL path, and its main purpose within the flow of generating and managing QR codes and associated payments.\
The endpoints cover operations such as authentication, QR code generation (static, dynamic, hybrid), extending or canceling codes, retrieving details, transaction listing, and payment simulation.

The QR MIA API exposes the following endpoints:

* Authentication
  * Obtain authentication token
* Generate and manage QR codes
  * Create QR code
  * Create hybrid QR code
  * Get QR details by ID
  * Cancel active QR code by ID
  * Create QR code extension
  * Cancel active QR code extension
  * Get list of QR codes (with filters)
  * Get list of QR code extensions (with filters)
* Payment management
  * Get payment details by ID
  * Get list of payments (with filters)
  * Refund payment by ID
* Testing
  * Simulate payment (test)

The table below presents all available endpoints:

| HTTP Method | URL                                  | Description                          |
| ----------- | ------------------------------------ | ------------------------------------ |
| `POST`      | `/v2/auth/token`                     | Get Authentication Token             |
| `POST`      | `/v2/mia/qr`                         | Create QR Code                       |
| `POST`      | `/v2/mia/qr/hybrid`                  | Create Hybrid QR Code                |
| `GET`       | `/v2/mia/qr/{qrId}`                  | Get QR Details by ID                 |
| `POST`      | `/v2/mia/qr/{qrId}/cancel`           | Cancel Active QR Code by ID          |
| `POST`      | `/v2/mia/qr/{qrId}/extension`        | Create QR Code Extension             |
| `POST`      | `/v2/mia/qr/{qrId}/extension/cancel` | Cancel Active QR Code Extension      |
| `GET`       | `/v2/mia/qr`                         | Get QR Code List (with filter)       |
| `GET`       | `/v2/mia/payments/{payId}`           | Get Payment Details by ID            |
| `GET`       | `/v2/mia/payments`                   | Get Payment List (with filter)       |
| `POST`      | `/v2/payments/{payId}/refund`        | Refund Payment by ID                 |
| `GET`       | `/v2/mia/qr/extension`               | Get QR Extensions List               |
| `POST`      | `/v2/mia/test-pay`                   | Simulate Payment in Test Environment |


---

# 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.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.
