VippsMobilePay Express Checkout
Introduction
VippsMobilePay Express checkout lets the shopper pay with the Vipps (Norway) or MobilePay (Denmark/Finland) app and, in the same in-app flow, share their name, contact details and delivery address with the merchant — without the shopper re-entering anything on the merchant's page. Optionally, the merchant can offer a fixed list of shipping options (e.g. pickup points or home delivery) that the shopper selects from directly inside the app.
Express checkout is available for the VIPPS and MOBILEPAY brands and for the PA and DB payment types.
Only fixed shipping options are supported at this time (a merchant-supplied list the shopper picks from in-app); dynamic shipping (server-calculated per address) is not currently supported. inline Flow please include this: inlineFlow : ["VIPPS", "MOBILEPAY"]
For details on the shopper consent and privacy model behind Express checkout, refer to Vipps/MobilePay's own documentation: Express checkout – User consent and privacy.
Enabling Express on the Payment Page
Loading the Vipps/MobilePay button via SecurePay payment widget is just like loading any other brand, i.e. in step 2, VIPPS or MOBILEPAY must be specified as a brand. To enable Express, add the following customParameters to your checkout creation call — no separate inline flow setting is required, since Vipps/MobilePay always redirects the shopper into their app.
See an example below.
Fast Checkout on the Cart Page
As with other fast-checkout brands, you can display the Vipps/MobilePay button early in the payment workflow — before a checkout ID exists — and let the shopper decide whether to pay immediately.
In step 2:
- Use
paymentWidgets.jswithout a checkout ID<script src="https://<?php echo whitelabel_getHostName(); ?>/v<?php echo $cnpVersion;?>/paymentWidgets.js"></script>
- Define a callback function in
wpwlOptions.createCheckoutto create a checkout
We will call the callback function once the Vipps/MobilePay button is clicked. The function receives one parameter with the used brand ({brand: 'VIPPS'} or {brand: 'MOBILEPAY'}) and should return a checkout ID. The returned object can be any thenable object — both JavaScript Promise and jQuery Promise are supported.
Example:
var wpwlOptions = {
inlineFlow : ["VIPPS", "MOBILEPAY"],
createCheckout: function (json) {
var shippingGroups = [
{
"brand": "BRING",
"type": "PICKUP_POINT",
"options": [
{
"id": "bring_pickup_1",
"isDefault": true,
"amount": { "currency": currency, "value": 3900 },
"priority": 0,
"name": "Gellerup Shoppen",
"meta": "Gudrunsvej 10, 8220 Brabrand",
"estimatedDelivery": "1-2 business days"
},
{
"id": "bring_pickup_2",
"amount": { "currency": currency, "value": 3900 },
"name": "Pakkeboks Bazar Vest",
"priority": 1,
"meta": "Silkeborgvej 260, 8230 Åbyhøj",
"estimatedDelivery": "1-2 business days"
}
]
},
{
"brand": "BRING",
"type": "HOME_DELIVERY",
"options": [
{
"id": "bring_home_1",
"amount": { "currency": currency, "value": 2900 },
"name": "Delivery to your door",
"meta": "Standard home delivery",
"estimatedDelivery": "2-4 business days"
}
]
}
];
// Call your server to create a checkout
return fetch("https://your.server/checkout-endpoint", {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: new URLSearchParams({
"entityId": entityId,
"amount": "10.00",
"currency": currency,
"paymentType": "DB",
"customer.mobile": testMobile,
"customParameters[VIPPS_MOBILEPAY_EXPRESS]": "true",
"customParameters[VIPPS_MOBILEPAY_EXPRESS_SCOPE]": "name address email phoneNumber",
"customParameters[VIPPS_MOBILEPAY_EXPRESS_SHIPPING_GROUPS]": JSON.stringify(shippingGroups)
})
}).then(function (response) {
return response.json();
}).then(function (json) {
return json.id;
});
}
};
VippsMobilePay Express Checkout Parameters
For using Express checkout you need to pass the following customParameters when creating the checkout.
| Parameter | Mandatory | Description | Default value | Examples | |||
|---|---|---|---|---|---|---|---|
| VIPPS_MOBILEPAY_EXPRESS | Yes | Enables Express checkout for this transaction. When not set (or not true), the payment proceeds as a normal Vipps/MobilePay checkout. |
false | true | |||
| VIPPS_MOBILEPAY_EXPRESS_SCOPE | No | Space-separated list of shopper profile fields requested from the Vipps/MobilePay app (e.g. name, address, email, phoneNumber). Only the fields listed are requested from the shopper. |
name address email phoneNumber | name address phoneNumber | |||
| VIPPS_MOBILEPAY_EXPRESS_SHIPPING_GROUPS | No |
|
N/A | Refer example above | |||