How to integrate the QR Attended Model
To charge with a QR Attended Model, you need to create an order and associate it with a Point of Sale.
Model flow
This is how the attended model works:
- The store registers a sale (1a) and creates an order assigned to the point of sale (1b). The order is then available for scanning (2).
- When the customer scans the QR Code (3) and completes the payment (5a), Mercado Pago sends a notification with the topic
merchant_order
and thestatus:closed
to the seller's server (5b). They must respond aHTTP STATUS 200 (OK)
or201 (CREATED
to confirm its reception (5c). Otherwise, Mercado Pago will continue to resend the notification according to our retry logic. If you want more information about this retry logic, go to Notifications. - With this information, the seller must confirm if the order status is closed (6a and 6b) and proceed with the ticket printing (7).
Create an order
For more information on how to create orders access our API Reference.
The order is available for scanning and payment after its creation.
Eliminate an order
For more information on how to delete the order associated with a QR before its expiration, or closing, see our API Reference.
HTTP 204 No Content
.Receive notifications of your orders
A notification is an automatic message that notifies the creation of new orders and their status updates. I.e.: If an order is approved, rejected, or pending.
Go to Notifications to learn how to implement them.
More specifically for QR Code, you must activate the merchant_order
notifications, which are the ones associated with orders. You will be able to identify each one of theses orders by the external_reference
parameter.