Static QR directing to the merchant site for payment
This flow uses a static QR code that is posted on the vending machine. The QR directs the user to the merchant's landing page where payment is initiated.
π© Here, the user makes selections on the vending machine, but pays on the website.
When to useβ
This QR code can be used when you don't have a screen, and it's not possible to present the dynamic one-time payment QR.
Prerequisitesβ
QR code on the vending machineβ
Generate a merchant redirect QR code linking to a web page containing payment options.
Detailsβ
Step 1: The customer scans the codeβ
When the customer scans the QR code, they are taken to the merchant's landing page,
which is waiting for the product to be selected on the vending machine.
The price is presented, and the user pays for the product in their
Vipps or MobilePay
app.
Step 2: Initiate a payment requestβ
When the user clicks the pay button, create a payment request with the selected amount.
Detailed example
Since the customer has scanned from their phone, you don't need their phone number.
This payment command can do an app-switch and open their Vipps or MobilePay app with the payment request.
Specify "userFlow": "WEB_REDIRECT"
to redirect the user to the app.
You may include order details at this time.
Specify "customerInteraction": "CUSTOMER_PRESENT"
.
Here is an example HTTP POST:
With body:
{
"amount": {
"value": 3000,
"currency": "NOK"
},
"paymentMethod": {
"type": "WALLET"
},
"customer": {
"phoneNumber": 4712345678
},
"customerInteraction": "CUSTOMER_PRESENT",
"receipt":{
"orderLines": [
{
"name": "Fanta",
"id": "21231211",
"totalAmount": 3000,
"totalAmountExcludingTax": 2400,
"totalTaxAmount": 600,
"taxRate": 2500,
},
],
"bottomLine": {
"currency": "NOK",
"posId": "vending_machine_12345",
"receiptNumber": "0527013501"
},
},
"reference": 2486791679658155992,
"userFlow": "WEB_REDIRECT",
"returnUrl": "http://example.com/redirect?reference=2486791679658155992",
"paymentDescription": "Vending machine purchase"
}
Step 3: 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.
To determine that the user has authorized the payment, you can get notifications via the Webhooks API and/or poll for the status.
Once the payment is approved, update the status in your system.
Step 4: Capture the paymentβ
Capture the payment and update the status.
Sequence diagramβ
Integration sequence for static QR directing to the merchant site for payment.
Static QR directing to the merchant site
Next stepsβ
Explore the other flows in this section. When you are ready to learn about the technical details, review some related pages: