# Glossary

**QR MIA** – maib's system for generating, managing, and processing payments via QR codes (static, dynamic, hybrid), intended for merchants who want a fast, redirect-free solution for collecting payments.

**QR Code** – a code generated through the QR MIA API that contains the necessary information to initiate a payment. It can be Static, Dynamic, or Hybrid, depending on the context and purpose.

**Static QR** – a QR code containing only fixed data, without an amount or personalized details. Useful for repeated payments without a predefined value (e.g., donations).

**Dynamic QR** – a QR code generated for a specific purpose, used only once, and includes detailed transaction data (amount, customer, etc.).

**Hybrid QR** – a combination of static and dynamic. Can be used for both one-time and repeated payments.

**qrId** – the unique identifier of the generated QR, UUID type. Used as a reference in all API calls.

**PayId** – the unique identifier of the payment made under a QR. Returned in the payment response and used to track the transaction.

**Sandbox** – a secure testing environment where payments can be simulated without real funds. Intended for merchant app integration testing.

**Production** – the live environment where transactions are made with real funds, used by active merchants.

**Executed (executedAt)** – the moment when the payment was finalized. Returned in ISO 8601 format.

***

### QR Statuses

* **Active** – QR is active and available for payment.
* **Inactive** – Static or hybrid QR that has not been used for 30 days.
* **Expired** – Dynamic or hybrid QR whose validity period has expired without being used.
* **Paid** – Successful payment was made using this QR.
* **Cancelled** – QR was cancelled via the dedicated `/cancel` endpoint.

***

### Relevant Parameters

* **iban** – IBAN account of the payer, used to identify them within the transaction.
* **payerName** – Shortened name of the payer, required for identification and traceability.
* **currency** – Currency in which the payment is made. Currently, only MDL is supported.
* **amount** – Transacted amount. Expressed as a decimal number.

***

### [HTTP Status Codes](#chttp-status-codes)

| Code | Meaning               | Description                                                                                      |
| ---- | --------------------- | ------------------------------------------------------------------------------------------------ |
| 200  | OK                    | The request was successfully processed.                                                          |
| 400  | Bad Request           | The parameters sent in the request are invalid or missing. Check the format and required fields. |
| 401  | Unauthorized          | The authentication token is missing, expired, or incorrect.                                      |
| 403  | Forbidden             | Access to the resource is forbidden. There may be IP or permission restrictions.                 |
| 404  | Not Found             | The requested resource was not found (e.g., non-existent `qrId`).                                |
| 500  | Internal Server Error | An internal server error occurred. Please try again later or contact the support team.           |

***

### Response Structure

* **ok** – indicates whether the operation was successfully processed (`true`) or an error occurred (`false`).
* **errors** – list of errors encountered during the request processing.
  * **errors.errorCode** – unique error code (e.g., `ERR_QR_NOT_FOUND`).
  * **errors.errorMessage** – detailed description of the issue encountered.
