Download OpenAPI specification:Download
merchantId and secretKey to gain access to the MIA POS APIPOST /ecomm/api/v1/token to obtain ecomm API access tokens. To receive tokens you need to use the parameters obtained in the 1st stepPOST /ecomm/api/v1/token/refresh to get a new access token based on the refresh token.POST /ecomm/api/v1/pay to create a request to pay for an order through the mia pos system.GET /ecomm/api/v1/payment/{paymentId} to check the payment resultcallbackUrl parameter when creating a payment requestGET /api/v1/public-key request to obtain a public key with which to verify the signature of the miaPOS system.Request to obtain a token to access ecomm API using merchant credentials
Merchant credentials for receiving tokens
| merchantId | string Unique merchant identifier in the MIA POS system |
| secretKey | string Merchant secret key within the MIA POS system |
{- "merchantId": "string",
- "secretKey": "H7rwtECx2EtAbnpkZ2DrfCOE52hxBdjp"
}{- "accessToken": "string",
- "accessTokenExpiresIn": 0,
- "refreshToken": "string",
- "refreshTokenExpiresIn": 0,
- "tokenType": "Bearer"
}Updating a pair of tokens based on a refresh token
Data for refreshing access tokens
| refreshToken | string Refresh token based on which you need to get a new pair of tokens |
{- "refreshToken": "string"
}{- "accessToken": "string",
- "accessTokenExpiresIn": 0,
- "refreshToken": "string",
- "refreshTokenExpiresIn": 0,
- "tokenType": "Bearer"
}Registers information about a purchase that must be paid using the mia pos terminal. Payment will go through the checkout page. To start the payment process, the user must be redirected to checkoutPage, which will be returned in the response
Information about the purchase that must be paid using mia pos
| terminalId required | string Merchant terminal ID that must be used to generate a payment request. Ecomm terminal is transmitted in the case of payment via QR, or the RTP terminal in the case of RTP payment |
| orderId required | string Unique order number on the merchant side |
| amount required | number <double> Amount for which you need to generate a payment request |
| currency required | string Payment currency. Currently always MDL |
| language | string Enum: "en" "ro" "ru" Language of the checkout page. Default value: ro |
| payDescription required | string Description of the payment that will be displayed to the user on the checkout page |
| paymentType | string Default: "qr" Enum: "rtp" "qr" Available payment types via ecomm protocol MIA POS |
| clientName | string First name, last name of the client making the payment |
| clientPhone | string Phone number of the client making the payment. Is required for payment type rtp |
| clientEmail | string Email of the client making the payment |
| callbackUrl | string Merchant link to which information about the transaction payment result will be sent. If not passed, the link set in AdminUI will be used |
| successUrl | string Link to the merchant resource where the user will be redirected as a result of successful payment. If not passed, the link set in AdminUI will be used |
| failUrl | string Link to the merchant resource where the user will be redirected as a result of an unsuccessful payment. If not passed, the link set in AdminUI will be used |
{- "terminalId": "TRM0001223",
- "orderId": "string",
- "amount": 145.25,
- "currency": "MDL",
- "language": "en",
- "payDescription": "string",
- "paymentType": "qr",
- "clientName": "string",
- "clientPhone": "79000001",
- "clientEmail": "string",
- "callbackUrl": "string",
- "successUrl": "string",
- "failUrl": "string"
}{- "orderId": "string",
- "paymentId": "472e651e-5a1e-424d-8098-23858bf03ad7",
}Sends a direct payment request to the user, bypassing intermediate checkout pages tracking payment statuses
Information about the payment request that needs to be sent to the user
| terminalId required | string Merchant terminal ID that must be used to generate a payment request. Must support RTP payments. |
| orderId required | string Unique order number on the merchant side |
| amount required | number <double> Amount for which you need to generate a payment request |
| currency required | string Payment currency. Currently always MDL |
| payDescription required | string Description of the payment that will be displayed to the user on the checkout page |
| clientName required | string First name, last name of the client making the payment |
| clientPhone required | string Phone number of the client making the payment |
| clientEmail | string Email of the client making the payment |
| callbackUrl | string Merchant link to which information about the transaction payment result will be sent. If not passed, the link set in AdminUI will be used |
{- "terminalId": "TRM0001223",
- "orderId": "string",
- "amount": 145.25,
- "currency": "MDL",
- "payDescription": "string",
- "clientName": "string",
- "clientPhone": "string",
- "clientEmail": "string",
- "callbackUrl": "string"
}{- "orderId": "string",
- "paymentId": "472e651e-5a1e-424d-8098-23858bf03ad7"
}Allows you to check the status of the payment request, as well as obtain information about the transaction in case of successful payment
| paymentId required | string Unique payment request identifier on the mia pos side |
{- "terminalId": "string",
- "orderId": "string",
- "paymentId": "string",
- "status": "SUCCESS",
- "amount": 145.25,
- "currency": "MDL",
- "paymentType": "rtp",
- "paymentDate": "2024-05-20T16:32:28",
- "swiftMessageId": "string",
- "swiftPayerBank": "string"
}Provides the RSA public key in Base64 format for verifying signatures. This endpoint is secured with an access token and is used by merchants for validation purposes.
{- "publicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAr1f/yhw+UI//z3KdpnJz..."
}Description of the request that will be sent to the merchant with the payment result from the MIA POS system (to callback url)
Information about the result of payment for the order. Before processing the result, you need to check the signature from MIA POS
required | object (OrderPaymentResult) Information about the result of payment for goods on the ecomm mia pos side |
| signature required | string Generated signature of the miaPos system based on the result of order payment |
{- "result": {
- "terminalId": "string",
- "orderId": "string",
- "paymentId": "string",
- "status": "SUCCESS",
- "amount": 145.25,
- "currency": "MDL",
- "paymentType": "rtp",
- "paymentDate": "2024-05-20T16:32:28",
- "swiftMessageId": "string",
- "swiftPayerBank": "string"
}, - "signature": "string"
}