Express
The Express feature is coming soon! Just a heads-up that the spec and some of the logic might still see changes before the final release. Stay tuned for updates!
With the new Express feature, you can provide users with different shipping options, which they can then choose from within the Vipps or MobilePay app. The following is the planned flow:
- The user selects to pay with Vipps or MobilePay, and their chosen app opens.
- Through the app, they provide consent to share their address and personal information.
- You respond by displaying available shipping options within the app.
- The user selects the preferred shipping option and approves the payment in the app.
Creating a payment with shipping options
🔥 Under development
Express is initiated by specifying logistics
in the Initiate payment request.
The logistics
property contains one or more logistics options, or groups.
Each group contains all the parameters needed for a shipping method. For example:
type
:HOME_DELIVERY
brand
:DHL
options
: including express shipping, normal shipping, and alternatives with different delivery times and associated costs
Another group might contain:
type
:IN_STORE
brand
:MERCHANT
options
: including all the different stores where the item could be picked up.
If more than one option exists in the group, the user will need to select the store, pick-up point, etc. The merchant-supplied ID of the logistics option will be returned in the API after the payment has been completed.
The following is an illustration of how fields of a logistics group can be mapped to fields in the app.
Expected properties:
callbackUrl
- Either acallbackUrl
orgroups
will be given when creating a payment. IfcallbackUrl
is used, we will send the address to you and expect the samegroups
+options
in return.type
- Defines the type of logistics option:HOME_DELIVERY
,MAILBOX
,IN_STORE
,PICK_UP_POINT
.brand
- The vendor. Could beSTORE
,POSTEN
,DHL
,POSTNORD
,POSTI
,GLS
,DAO
. We'll add the logo based on the vendor in the apps.estimatedDelivery
- Optional text if you want to show to the user.
Merchant endpoints
You will need to set up one or two API endpoints to enable communication with us. These endpoints are used only during Express payments.
Operation | Description | Endpoint |
---|---|---|
Get shipping details | Used to fetch shipping information, 10-second timeout | To be determined |
Remove user consent | Used to inform merchant when the Vipps user removes consent to share information. | To be determined |
Shipping and static shipping details
We will need you to create an API endpoint that let us get the shipping details from you, if they aren't provided in the Initiate payment request.
You'll need to provide this endpoint, and we'll use it only for Express payments, not for regular payments.
If the shipping methods and cost can be known in advance, it's better to provide these when you create the payment to avoid the extra round-trip between our backend and your server. This will speed up the user experience and reduce the risk of drop-offs and errors.
User consent
As part of the express flow, you will request access to the user's personal information. They must approve this in order to proceed.
The user can remove the consent later by using settings in their Vipps or MobilePay app.
Webhooks
There may be a new ePayment webhook event to provide you with the user's shipping details.