Document version 1.1.0.
Issues and PRs are welcome. This document explains the key differences between eCom API v1 and eCom API v2.
Universal payment flows are essential for a good user experience. This is why the eCom v2 API has a single, mandatory landing page for all non-mobile payments.
The initiate payment response will contain a unique URL for each order. Either a standard https://
URL or a deeplink URL, prefixed with vipps://
.
Note: On mobile devices "Universal Linking" will be used for https
URLs, which will automatically open Vipps.
Skipping the landing page is reserved for special cases, where displaying it is not possible. See the details in the skip landing page section in the API guide.
See the FAQ.
The initiate payment call no longer requires a phone number. Instead, the user will be asked to fill in the phone number on the landing page. If phone number is included in the initiate payment body, then the landing page wil be "pre-filled" with that number.
If isApp
is false
in the initiate payment body, then a https
URL with a unique token for that specific order will be generated.
If isApp
is true
then an appswitch deeplink URL with a unique token for that specific order will be generated.
See here for full overview of initiate payment.
{
"customerInfo": {
"mobileNumber": "48059528"
},
"merchantInfo": {
"merchantSerialNumber": "123456",
"callbackPrefix":"https://example.com/vipps/callbacks-for-payment-update",
"fallBack": "https://example.com/vipps/fallback-result-page/order123abc"
},
"transaction": {
"orderId": "order123abc",
"amount": 20000,
"transactionText": "One pair of Vipps socks"
}
}
{
"orderId": "id170",
"url": "vipps://?token=eyJraWQiOiJqd3RrZXkiLCJ[...]"
}
{
"orderId": "id170",
"url": "https://api.vipps.no/dwo-api-application/v1/deeplink/vippsgateway?v=2&token=eyJraWQiOiJqd3RrZXkiLCJ[...]"
}
The initiate payment must contain a fallBack
URL. This is where the user will be redirect to after the payment.
This is set in the initiate payment body.
For apps, this URL will be the appswitch URL.
See here for details.
If you have already signed an agreement with Vipps, and have API keys for eCom v1, you can use the same API keys for eCom v2.
When you have received confirmation that your new salesunit is created, then you can retrieve the API keys on https://portal.vipps.no. See Getting started.
The eCom v2 API is available at ecomm/v2/payments
:
- Test:
https://apitest.vipps.no/ecomm/v2/payments
- Prod:
https://api.vipps.no/ecomm/v2/payments
The eCom v2 API documentation is available here: https://github.com/vippsas/vipps-ecom-api
We're always happy to help with code or other questions you might have! Please create an issue, a pull request, or contact us.
Sign up for our Technical newsletter for developers.