E-commerce checkout
Integrate miaPOS as an instant-payment checkout in your online store. Token, register, callback, verify — four endpoints, signed responses.
Overview
The miaPOS e-commerce protocol exposes a small REST surface that turns any web checkout into an instant-payment endpoint. The customer pays from their banking app via QR or Request to Pay; you receive a signed server-to-server callback with the final status.
Use this paypoint when you need to accept instant payments directly in a web flow without a hardware terminal. If you run on WooCommerce, OpenCart or CS-Cart, see the matching plugin instead — it implements this protocol for you.
Prerequisites
- A miaPOS merchant account with at least one configured terminal.
- Six credentials:
merchantId,secretKey,terminalId,language,paymentType(qrorrtp), andecommBaseUrl. - A publicly reachable HTTPS endpoint for callbacks.
- The miaPOS public key for verifying signatures — see Signature verification.
ecomm-test.miapos.md. All four endpoints behave identically to production; payments are simulated. See Sandbox & environments.Steps
1. Collect the order
Before initiating a payment, gather:
orderId— unique identifier generated by youamount— decimal, e.g.100.00currency— ISO 4217, e.g.MDLpayDescription— human-readable, e.g."Payment for Order #123"clientName,clientPhone,clientEmail— optional
2. Obtain an access token
curl -X POST https://ecomm-test.miapos.md/ecomm/api/v1/token \
-H "Content-Type: application/json" \
-d '{"merchantId":"M12345","secretKey":"...","terminalId":"T0001"}'
3. Register the payment
{
"orderId": "ORD-2026-00123",
"amount": 100.00,
"currency": "MDL",
"payDescription": "Payment for Order #123",
"language": "en",
"paymentType": "qr",
"successUrl": "https://shop.example.md/checkout/success",
"failUrl": "https://shop.example.md/checkout/fail",
"callbackUrl":"https://shop.example.md/api/miapos/callback"
}
4. Handle the result
Customer is redirected to successUrl or failUrl. Independently, miaPOS POSTs the signed result to callbackUrl.
GET /payment/{paymentId} before fulfilling.5. Verify the callback signature
Full algorithm in Signature verification.
API summary
Complete request/response schemas in the E-comm API reference.
Errors
All error responses use a consistent envelope:
{
"error": {
"code": "INVALID_SIGNATURE",
"message": "Callback signature did not match the published public key.",
"requestId": "req_01HZP2K7..."
}
}
Catalog of common codes: INVALID_TOKEN, TOKEN_EXPIRED, INVALID_AMOUNT, UNKNOWN_PAYMENT, INVALID_SIGNATURE, RATE_LIMITED. Full list in Errors.
Examples & references
The integration repo on GitHub finergy-tech/mia-pay-ecomm-integration is the authoritative source for the protocol. It contains the protocol overview, signature-verification guide, and pointers to every official plugin and SDK.
Try it live — interactive demo at ecomm-test.miapos.md/demo-page.html. Enter your own success / fail / callback URLs and step through the full flow with the sandbox.
Ready-made plugins and SDKs — handle token / pay / callback / signature verification end-to-end:
- PHP SDK · finergy-tech/mia-pay-ecomm-php-sdk
- WooCommerce · finergy-tech/mia-pay-gateway-for-woocommerce
- OpenCart · finergy-tech/mia-pay-gateway-for-opencart
- CS-Cart · finergy-tech/mia-pay-gateway-for-cscart
Protocol details:
- Protocol overview — flow, parameters, endpoints
- Signature verification guide — Java & Python reference implementations