Personal QR
If you have a 2D QR code scanner, you can get the customer's identity by scanning their Vipps/MobilePay personal QR.
- Vipps
- MobilePay
How it works
This can happen in two ways:
- Customer-facing scanner - The store will have a permanent customer-facing scanner and customers can scan their personal Vipps/MobilePay QR code at any time.
- Cashier scanner - The customer's personal QR code is scanned by the cashier using a wired scanner. This could happen while the cashier is scanning wares or immediately before the payment.
Use the Personal QR exchange endpoint to get the phone number from the personal QR code.
For example:
curl -X POST https://apitest.vipps.no/qr/v1/exchange \
-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" \
-d '{
"qrCode": "https://qr.vipps.no/p/qwjhewqhueheuqwhuqwhe",
}'
Example response:
{
"msisdn": "4712345678",
"timestamp": 1634025600,
"version": "2.0"
}
Your system can send the payment request by using the
createPayment
endpoint. Set userFlow
to PUSH_MESSAGE
.
Per regulations, specify "customerInteraction": "CUSTOMER_PRESENT"
.
Detailed example for payment request
Set userFlow
to PUSH_MESSAGE
. This will send a push directly to the customer.
Attach the order details simultaneously.
For example:
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": {
"value": 49800,
"currency": "NOK"
},
"paymentMethod": {
"type": "WALLET"
},
"customer": {
"personalQr": "https://qr.vipps.no/p/qwjhewqhueheuqwhuqwhe"
},
"receipt":{
"orderLines": [
{
"name": "Orange hoodie",
"id": "hoodie1234",
"totalAmount": 29900,
"totalAmountExcludingTax": 23920,
"totalTaxAmount": 5980,
"taxRate": 2500
},
{
"name": "White T-shirt",
"id": "tshirt1234",
"totalAmount": 19900,
"totalAmountExcludingTax": 15920,
"totalTaxAmount": 3980,
"taxRate": 2500
},
],
"bottomLine": {
"currency": "NOK",
"posId": "Butikken-23412",
"receiptNumber": "0527013501"
},
},
"reference": 2486791679658155992,
"userFlow": "PUSH_MESSAGE",
"returnUrl": "http://example.com/redirect?reference=2486791679658155992",
"paymentDescription": "Payment to Butikken",
"customerInteraction": "CUSTOMER_PRESENT"
}'
Troubleshooting
"The parameter PersonalQr is invalid"
The PersonalQr
only accepts the input from the user's personal QR code.
This is retrieved by scanning the user's QR code in their Vipps or MobilePay app.
If you receive "The parameter PersonalQR
is invalid." when initiating payments,
it means that we can't recognize the input you are supplying in the request.
Double-check the input to ensure that the entire content of the QR is supplied. Verify that it is the QR from Vipps or MobilePay app that is scanned and not other QR codes near the scanner.