Skip to main content

One-time payment QRs

Generate one-time QR codes for in-store payments. Scanning opens the Vipps or MobilePay app for instant approvalβ€”no phone number needed.

Scenario​

Generate the payment request with the POST:/epayment/v1/payments endpoint with:

  • "userFlow": "QR".
  • (Optional) qrFormat and size for the QR

One-time payment QR Flow

Since the customer will scan 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.

Example​

Generate the payment request with dynamic QR:

curl -X POST https://apitest.vipps.no/epayment/v1/payments \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR-ACCESS-TOKEN" \
-H "Ocp-Apim-Subscription-Key: YOUR-SUBSCRIPTION-KEY" \
-H "Merchant-Serial-Number: YOUR-MSN" \
-H "Idempotency-Key: YOUR-IDEMPOTENCY-KEY" \
-H "Vipps-System-Name: acme" \
-H "Vipps-System-Version: 3.1.2" \
-H "Vipps-System-Plugin-Name: acme-webshop" \
-H "Vipps-System-Plugin-Version: 4.5.6" \
-d '{
"userFlow": "QR",
"qrFormat": {
"format": "IMAGE/SVG+XML",
"size": 1024
},
"amount": {
"value": 42924,
"currency": "NOK"
},
"paymentMethod": {
"type": "WALLET"
},
"customerInteraction": "CUSTOMER_PRESENT",
"receipt":{
"orderLines": [
{
"name": "Ear buds",
"id": "21231211",
"totalAmount": 42924,
"totalAmountExcludingTax": 34339,
"totalTaxAmount": 8585,
"taxRate": 2500,
},
],
"bottomLine": {
"currency": "NOK",
"posId": "vending_machine_12345",
"receiptNumber": "0527013501"
},
},
"reference": 2486791679658155992,
"returnUrl": "http://example.com/redirect?reference=2486791679658155992",
"paymentDescription": "Ear buds"
}'

Specify "customerInteraction": "CUSTOMER_PRESENT", since the customer is present. You can also specify the order details at this time.

Display the dynamic QR on a screen facing the customer.

When the customer scans the QR code and are directed to the Vipps or MobilePay app, the payment screen is presented and they click Pay.

Once the payment is approved, update the status in your system. To determine that the user has authorized the payment, you can get notifications via the Webhooks API and/or poll for the status.

The result of this request will contain a redirectUrl pointing to a link where you can download the QR image. This page should confirm that the payment was successful.

Help us improve our documentation

Did you find what you were looking for?