Skip to main content

QR Payments

You can use the ePayment API to generate QR codes that can be scanned by a customer in a physical store setting. Once the QR code is scanned, the Vipps or MobilePay app will automatically open with the payment ready for approval. This avoids them needing to provide their phone number.

For more background information, see QR: One-Time payment QR.

Create a QR Payment

Remember to have a fresh access token, see Set up and Authorize. Then, call the Create Payment endpoint with userFlow = "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 '{
"amount": {
"currency": "NOK",
"value": 1000
},
"paymentMethod": {
"type": "WALLET"
},
"reference": "acme-shop-123-order123abc,
"returnUrl": "https://example.com/redirect?reference=acme-shop-123-order123abc",
"userFlow": "QR",
"paymentDescription": "Two pairs of socks, paid with a QR code",
"qrFormat": {
"format": "IMAGE/SVG+XML",
"size": 1024
}
}'

Complete the payment

The result of this request will contain a redirectUrl pointing to a link where you can download the QR image. Simply scan the image with your mobile device and the Vipps or MobilePay app will automatically open, where you can approve the payment.

Help us improve our documentation

Did you find what you were looking for?