Skip to main content

QR Payments

The ePayment API supports QR payments directly, making it easy to provide One-Time payment QR codes. Read more about the concept in 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?