> 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/create-extension-for-qr-code-by-id.md).

# Create Extension for QR Code by ID

**POST**  `/v2/mia/qr/{qrId}/extension`

Allows extending the validity period and/or modifying the amount for an existing Hybrid QR code. Useful when a QR code needs to be reused for a new order or requires a new validity period.

***

#### Request parameters (body)

| Parameter     | Type              | Required                         | Description                                                                                                                                                                                                            |
| ------------- | ----------------- | -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `expiresAt`   | string (datetime) | Yes                              | <p>New expiration date of the QR code. Must comply with: minimum 1 minute, maximum 60 days from the current moment. </p><p>(min>0 / max=100000)<br>ISO 8601 format (ex: <code>"2029-10-22T10:32:28+03:00"</code>).</p> |
| `amount`      | number (decimal)  | Yes, for `Fixed` or `Controlled` | Payment amount. Must satisfy the limits: `amountMin <= amount <= amountMax`. Not allowed for `Free`.                                                                                                                   |
| `amountMin`   | number (decimal)  | Yes, for`Controlled`             | Minimum payment amount. Not allowed for `Fixed` or `Free`.                                                                                                                                                             |
| `amountMax`   | number (decimal)  | Yes, for`Controlled`             | Maximum payment amount. Not allowed for `Fixed` or `Free`.                                                                                                                                                             |
| `description` | string (max 500)  | Yes                              | Order description.                                                                                                                                                                                                     |
| `orderId`     | string (max 100)  | No                               | Order ID from the Merchant.                                                                                                                                                                                            |
| `callbackUrl` | string (max 1000) | No                               | URL for payment notification. Format: HTTPS.                                                                                                                                                                           |

#### Request example

```json
{
  "expiresAt": "2029-11-22T10:32:28+03:00",
  "amount": 100.00,
  "description": "Updated order description",
  "orderId": "456",
  "callbackUrl": "https://example.com/callback"
}
```

***

#### Response (200 OK)

| Parameter             | Type          | Description                                                        |
| --------------------- | ------------- | ------------------------------------------------------------------ |
| `result`              | object        | Response object.                                                   |
| `result.extensionId`  | string (guid) | ID of the added extension.                                         |
| `ok`                  | boolean       | `true` if the request was processed successfully`false` otherwise. |
| `errors`              | array         | Errors list, if any.                                               |
| `errors.errorCode`    | string        | Error code.                                                        |
| `errors.errorMessage` | string        | Error description.                                                 |

***

#### Response example

```json
{
  "result": {
    "extensionId": "fe7e93a2-d5f2-4e7f-81a3-3c7d17c224f2"
  },
  "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/create-extension-for-qr-code-by-id.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.
