QR unattended model
What’s QR unattended model?
With this model, you won’t have to create a specific payment order on Mercado Pago. The order is generated by choosing a product or service and scanning the QR on the Point of Sale (POS). We recommend this model for gas stations, vending machines and systems integrated with multiple wallets.
Model features
The main characteristics are:
- Each Point of Sale has an associated URL to which Mercado Pago will ask if there is an order ready to pay.
- When a client scans the QR code in a Point of Sale, Mercado Pago sends a recurrent request to the URL associated on the POS. When order is ready, it will show the amount to pay in the client app.
- Client will be able to pay only if there’s an order created for the scanned QR.
Model flow
This is how the QR unattended model works:
- Clients scan QR code from their app.
- Using the associated URL, Mercado Pago searches for the order in the merchant server.
- (A) Point of sale informs status to the merchant server.
(B) If information is not available, merchant server will answer with a HTTP 400
.
(C) Mercado Pago shows a waiting screen on the app.
(D) And searches again for the order in merchant server.
4. (A) Point of sale sends order data to the merchant server.
(B) When order is available, merchant server answers a HTTP 200
with the payment information needed to charge clients.
5. (A) Next, shows a payment screen on the client app.
(B) Merchant server receives an order notification.
(C) And confirms reception.
6. Finally, the client pays the order.
7. (A) The client sees a payment confirmation.
(B) Merchant server receives an order notification.
(C) And confirms reception.
8. (A) Merchant server consults order status with the received ID from the last notification to know if it’s closed or still pending.
(B) Mercado Pago returns respective data like status and payment information, among others.
9. Once order is closed, receipt can be printed.
POS for the unattended model
To create Points of Sale for the the unattended model, you need to declare your web address, to which Mercado Pago will later make requests for available orders.
curl -X POST \
-H 'Authorization: Bearer PROD_ACCESS_TOKEN' \
https://api.mercadopago.com/pos \
-d \
{
"name":"Main pos",
"fixed_amount": true,
"category": 621102,
"external_store_id": "STORE001",
"external_id": "POS0001",
"url": "https://www.mystore.com/pay-mp?locationId=6232&positionId=1"
}