Minimum user age
Set the minimum age required for the customer to make the purchase.
For example, make a
POST:/epayment/v1/payments
request with the following body:
{
"amount":{
"currency":"DKK",
"value":16000
},
"customer":{
"phoneNumber":"4712345678"
},
"minimumUserAge": 25,
"paymentMethod":{
"type":"WALLET"
},
"reference":"acme-shop-123-order123abcd",
"paymentDescription": "Reference acme-shop-123-order123abcd. Thank you for shopping at our webshop!",
"returnUrl":"https://example.com/redirect?reference=12345989434343",
"userFlow":"WEB_REDIRECT"
}
If the user owning the phone number is younger than the specified age (in years), an error message will be provided:
-
In the
WEB_REDIRECT
flow (e.g., for apps and web shops), the user will either get switched to the Vipps/MobilePay app or go to the landing page.-
If the user is on a device where the Vipps/MobilePay app is installed, it will open automatically. If they don't meet the age requirements, they will see a detailed message (e.g., "You need to be at least 18 years old to pay to the merchant").
-
If the user is on a device without the Vipps/MobilePay app, they will be directed to the landing page. There, they can enter in their own phone number. If they don't meet the age requirements, the payment will not be sent to their app, and they will instead see a generic message (e.g., "You can't pay to this business"). This message is generic for privacy reasons: Another user could use the phone number to get the age of the user.
- Vipps
- MobilePay
-
-
In the
PUSH_MESSAGE
flow (e.g., for POS), a payment request is pushed directly to a user's Vipps/MobilePay app. However, this message is not sent if the user doesn't meet the age requirements. Then, you will get a generic error message in the response to your API request (e.g., "The phone number does not belong to a Vipps user, or the user cannot pay businesses"). The generic message protects the privacy of the individual. We don't provide the age of customers without consent.
If you need the specific age of the payer, use the User Info feature instead. The app displays a consent screen to the user, informing them of the information they are sharing with you. If you have requirements for documenting whether the age check has been performed, you may log the payment requests.