> For the complete documentation index, see [llms.txt](https://docs.maibmerchants.md/mia-qr-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maibmerchants.md/mia-qr-api/en/endpoints/payment-initiation/create-hybrid-qr-code.md).

# Create Hybrid QR Code

**POST** `/v2/mia/qr/hybrid`\
A hybrid QR code that can be paid multiple times, with the possibility to modify the amount and expiration date later (via the `POST /v2/mia/qr/{qrId}/extension` endpoint). It can be displayed on static media, such as stickers.

***

### Request Body Parameters

| Parameter    | Type             | Required | Description                                                                                                   |
| ------------ | ---------------- | -------- | ------------------------------------------------------------------------------------------------------------- |
| `amountType` | string (enum)    | Yes      | Type of the amount on the QR code. Possible values: `Fixed`, `Controlled`, `Free`.                            |
|              |                  |          | **Fixed**: fixed amount (uses the `amount` parameter).                                                        |
|              |                  |          | **Controlled**: adjustable amount, but within `amountMin` and `amountMax` limits.                             |
|              |                  |          | **Free**: only for static QR codes, without a predefined amount (the client sets the amount in the bank app). |
| `currency`   | string (enum)    | Yes      | <p><em>Payment currency.</em><br>Possible values: <code>MDL</code>. Format: <strong>ISO 4217</strong>.</p>    |
| `terminalId` | string (max 100) | No       | Terminal ID provided by the bank.                                                                             |
| `extension`  | object           | No       | Object containing the extensions for the QR code.                                                             |

***

#### `extension` Object Parameters

| Parameter     | Type              | Conditionally required            | Description                                                                                                                                                                                                                                        |
| ------------- | ----------------- | --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `expiresAt`   | string (datetime) | Yes                               | <p><strong>Expiration date of the Hybrid QR code</strong> (minimum 1 minute, maximum 60 days).<br>The code expires if no payment has been made in the last 30 days.<br>Format: ISO 8601.<br>Example: <code>"2029-10-22T10:32:28+03:00"</code>.</p> |
| `amount`      | number (decimal)  | Yes, for `Fixed` and `Controlled` | <p><strong>Amount of the QR code.</strong><br>For Fixed and Controlled types, the following must hold: <code>amountMin ≤ amount ≤ amountMax</code>.<br>Values between 0 and 100000.<br>Not used for Free type.</p>                                 |
| `amountMin`   | number (decimal)  | Yes, for `Controlled`             | <p><strong>Minimum allowed amount</strong> (for Controlled).<br>Must be > 0 and less than <code>amountMax</code>.<br>Not used for Free or Fixed types.</p>                                                                                         |
| `amountMax`   | number (decimal)  | Yes, for `Controlled`             | <p><strong>Maximum allowed amount</strong> (for Controlled).<br>Must be > <code>amountMin</code> and ≤ 100000.<br>Not used for Free or Fixed types.</p>                                                                                            |
| `description` | string (max 500)  | Yes                               | Order description.                                                                                                                                                                                                                                 |
| `orderId`     | string (max 100)  | No                                | Order identifier on the merchant's side.                                                                                                                                                                                                           |
| `callbackUrl` | string (max 1000) | No                                | HTTPS URL where the merchant receives data about the successful payment in the bank's application.                                                                                                                                                 |

### Request Body Example

```json
{
  "amountType": "Fixed",
  "currency": "MDL",
  "terminalId": "P011111",
  "extension": {
    "expiresAt": "2029-10-22T10:32:28+03:00",
    "amount": 50.00,
    "description": "Order description",
    "orderId": "123",
    "callbackUrl": "https://example.com/callback"
  }
}
```

***

### Response Parameters

| Parameter            | Type              | Description                                                                                                                                         |
| -------------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `result`             | object            | Object containing the request result.                                                                                                               |
| `result.qrId`        | string (guid)     | Unique identifier of the created QR code.                                                                                                           |
| `result.extensionId` | string (guid)     | Unique identifier of the QR code extension.                                                                                                         |
| `result.url`         | string (max 1000) | QR code URL. HTTPS format.                                                                                                                          |
| `ok`                 | boolean           | <p>Request processing status:<br><code>true</code> – no errors,<br><code>false</code> – an error occurred (see details in <code>errors</code>).</p> |
| `errors`             | array             | List of processing errors (if present).                                                                                                             |

***

#### `errors` Object (if `ok` = false)

| Parameter      | Type   | Description        |
| -------------- | ------ | ------------------ |
| `errorCode`    | string | Error code.        |
| `errorMessage` | string | Error description. |

***

### Response Example

```json
{
  "result": {
    "qrId": "123e4567-e89b-12d3-a456-426614174000",
    "extensionId": "40e6ba44-7dff-48cc-91ec-386a38318c68",
    "url": "https://example.com/qr/123e4567-e89b-12d3-a456-426614174000"
  },
  "ok": true
}
```


---

# 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.maibmerchants.md/mia-qr-api/en/endpoints/payment-initiation/create-hybrid-qr-code.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.
