This is a work in progress. Issues and PRs are welcome.
Universal payment flows are essential for a good user experience. This is why the v2 API has a single, mandatory landing page for all payments. The initiate payment response will contain a unique URL to the landing page for each order.
Note: If the landing page realizes it's on a mobile browser it will switch to the Vipps app if it is installed.
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": false
in the initiate payment body, then a https deeplink with a unique token for that specific order will be generated.
If "isApp": true
then an appswitch deeplink with a unique token for that specific order will be generated.
See here for full overview of initiate payment
{
"customerInfo": {
"mobileNumber": "48059528"
},
"merchantInfo": {
"callbackPrefix": "https://www.callback.com/",
"fallBack": "https://fallback.com/",
"merchantSerialNumber": "210462",
"isApp": true
},
"transaction": {
"amount": 1234,
"orderId": "id170",
"timeStamp":"2020-06-24T08:34:25-07:00",
"requestId": "1234",
"transactionText": "Initiate Payment"
}
}
{
"orderId": "id170",
"url": "vipps://?token=eyJraWQiOiJqd3RrZXkiLCJ <snip>"
}
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 v1, you can use the same API keys for v2.
When you have received confirmation that your new salesunit is created, then you can retrieve the keys in the developer portal. See the Getting started guide for full details
The 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 v2 API documentation is available in markdown on GitHub
Technical documentation is available in swagger-format here
We highly recommend going through the whole flow using our Postman collection and environment following our guide.