maib MIA QR API
EN
EN
  • Overview
    • General Technical Specifications
    • MIA QR Types
  • Endpoints
    • Authentication
      • Obtain Authentication Token
    • Payment Initiation
      • Create QR Code (Static, Dynamic)
      • Create Hybrid QR Code
        • Create Extension for QR Code by ID
    • Payment Cancellation
      • Cancel Active QR (Static, Dynamic)
      • Cancel Active QR Extension (Hybrid)
    • Payment Refund
      • Refund Completed Payment
    • Information Retrieval (GET)
      • Display List of QR Codes with Filtering Options
      • Retrieve QR Details by ID
      • Retrieve List of Payments with Filtering Options
      • Retrieve Payment Details by ID
  • Payment Simulation (Sandbox)
  • Notifications on Callback URL
  • Errors
    • API Errors
    • HTTP Status Codes
  • Glossary
  • maib e-commerce API
Powered by GitBook
On this page

Payment Simulation (Sandbox)

POST/v2/mia/test-pay

Payment simulation is allowed exclusively in the sandbox environment (testing). This endpoint allows testing the payment process by sending a payload with payment details.


Request

Method: POST

URL: /v2/mia/test-pay


Request Parameters (body JSON)

Parameter
Type
Required
Description

qrId

string (guid)

Yes

Unique identifier of the QR code

amount

number (decimal)

Yes

Payment amount

iban

string(100)

Yes

Payer's IBAN

currency

string (enum)

Yes

Payment currency (possible values: MDL)

payerName

string(200)

Yes

Short name of the payer

Request example

{
  "qrId": "123e4567-e89b-12d3-a456-426614174000",
  "amount": 10,
  "iban": "MD88AG000000011621810140",
  "currency": "MDL",
  "payerName": "John D."
}

Response parameters

result

Type: object Object containing the response result.


Fields of the object result

Field
Type
Description

qrId

string(guid)

Unique identifier of the QR code.

qrStatus

string(enum)

Status of the QR code. Possible values: Active, Inactive, Expired, Paid, Cancelled.

Active – Status for an active QR code.

Inactive – Status for a Static or Hybrid QR if no payment has been made in the last 30 days.

Expired – Status for a Dynamic or Hybrid QR if the validity period has expired without a payment.

Paid – Status for a Dynamic or Hybrid QR after a payment has been made.

Cancelled – Status after a cancel request (POST /v2/mia/qr/{qrId}/cancel).

orderId

string(100)

Order identifier from the merchant side.

payId

string(guid)

Unique identifier of the payment.

amount

number(decimal)

Payment amount.

commission

number(decimal)

Fee charged for the payment.

currency

string(enum)

Currency in which the payment was made. Possible values: MDL. Format: ISO 4217.

payerName

string(200)

Abbreviated name of the payer.

payerIban

string(100)

IBAN of the payer (International Bank Account Number).

executedAt

string(datetime)

Date and time when the payment was executed. Format: ISO 8601-1:2019.

signature

string

Signature for validating the notification.


Other Response Fields

Field
Type
Description

ok

boolean

errors

array

List of errors encountered while processing the request.

Objects in errors

Field
Type
Description

errorCode

string

The specific code of the encountered error.

errorMessage

string

Detailed description of the error.

Response example

{
  "result": {
    "qrId": "123e4567-e89b-12d3-a456-426614174000",
    "qrStatus": "Active",
    "orderId": "123",
    "payId": "6d24e4a5-c6bf-4d3e-bf7a-8d2123faf4e9",
    "amount": 10,
    "commission": 2.50,
    "currency": "MDL",
    "payerName": "John D.",
    "payerIban": "MD88AG000000011621810140",
    "executedAt": "2024-11-29T10:56:52.1380956+00:00",
    "signature": "592b6999-fdd0-4fd3-9708-5cb9df590dee"
  },
  "ok": true
}

Notes

  • This endpoint is available only in the sandbox environment for testing.

  • If ok is false, the errors field will contain details about the issues encountered.

  • The qrStatus value reflects the current status of the QR code after the payment simulation.

  • The signature in the result.signature field must be verified according to the algorithm defined in the callback (notification) documentation.

PreviousRetrieve Payment Details by IDNextNotifications on Callback URL

Last updated 1 day ago

Request processing status – true means no errors; false means an error occurred (see for details).

errors