> 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
}
```
