How the merchant callback QR works
In this flow, a user pays by scanning a QR with their Vipps
or MobilePay
app.
The merchant gets their ID and sends a payment request to them through the app.
Optionally, the merchant can also get the phone number of the user and enroll them in their loyalty program.

Prerequisites​
Merchant callback QR: Generate a merchant callback QR code, as described in the QR API: Merchant callback QR codes.
Webhooks: Set up webhooks to receive event notifications when the QR is scanned and when the payment is approved.
Details​
Step 1: Products are added for payment​
Step 2: The customer scans the QR​
Step 3: The merchant's system sends the payment request​
Your system will receive a webhook notification that the customer has scanned the QR and is ready to pay with Vipps MobilePay. The notification will contain a token you can use to start a payment.
Use the token to send the customer a Create Payment request.
Step 4: The customer authorizes the payment​
The payment request will appear in the customer's Vipps or MobilePay app, where they can select to pay or cancel.
Step 5: The merchant's system updates the status​
Your system will receive a webhook notification regarding their choice. You can also poll for the status.
Once the payment is approved, update the status in your system. You may capture the payment immediately and provide a receipt.
Sequence diagram​
Integration sequence for payments.
Payment-only flow
See a more complex flow
A more complex flow could involve getting access to the customer's phone number when they scan the QR code. This uses the Customer token exchange endpoint.
Once you have the phone number, you could check if the customer is a member of your loyalty program. If not, you can ask them to enroll. This uses the Login flow to gather consent from the customer.
The steps needed to get consent from the user are explained in detail there. The merchant initiated login flow will send a push to the user, and once the user has finished the flow, they will be ready to pay.
Sequence diagram for complete flow including phone number lookup, customer enrollment and payment is as follows.
Flow with lookup, enrollment, and payment
Next steps​
See: