Quick start
Version 2 is available now. Version 1 is deprecated.
Available for MobilePay in selected markets at the Vipps MobilePay joint platform launch.
Before you begin
*Please note: The Management API is not available in the test environment. See Limitations of the test environment.
Be aware that the API requests mentioned here are running on the production server, https://api.vipps.no.
🔥 To reduce the risk of exposure, never store production API keys in Postman or any similar tools. 🔥
The provided example values in this guide must be changed with the values for your sales unit and user. This applies for API keys, HTTP headers, reference, phone number, etc.
Getting your ledgers
Step 1 - Setup
You must have already signed up as an organization with Vipps MobilePay and have your test credentials from the merchant portal.
You will need the following values, as described in the Getting started guide:
client_id
- client_id for a sales unit.client_secret
- client_id for a sales unit.Ocp-Apim-Subscription-Key
- Subscription key for a sales unit.merchantSerialNumber
- The unique ID for a sales unit.
Step 2 - Authentication
For all the following, you will need an access_token
from the
Access token API:
POST:/accesstoken/get
.
This provides you with access to the API.
curl https://api.vipps.no/accessToken/get \
-H "client_id: YOUR-CLIENT-ID" \
-H "client_secret: YOUR-CLIENT-SECRET" \
-H "Ocp-Apim-Subscription-Key: YOUR-SUBSCRIPTION-KEY" \
-H "Merchant-Serial-Number: YOUR-MSN" \
-H "Vipps-System-Name: acme" \
-H "Vipps-System-Version: 3.1.2" \
-X POST \
--data ''
The property access_token
should be used for all other API requests in the Authorization
header as the Bearer token.
Step 3 - Get all ledgers
Send
GET:/settlement/v1/ledgers
to get the ledgers you have access to.
curl https://api.vipps.no/settlement/v1/ledgers \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1Ni <truncated>" \
-H "Ocp-Apim-Subscription-Key: 0f14ebcab0ec4b29ae0cb90d91b4a84a" \
-H "Vipps-System-Name: acme" \
-H "Vipps-System-Version: 3.1.2" \
-X GET
Step 4 - Get a funds ledger
Send
GET:/report/v2/ledgers/{ledgerId}/{topic}/dates/{ledgerDate}
for a list of payments/transactions.
Set topic
to funds
.
Set ledgerId
to the 6-digit value that is the unique ledger ID for the ledger you want.
Set ledgerDate
to a value in format YYYY-MM-DD (e.g., 2022-10-01
).
curl https://api.vipps.no/report/v2/ledgers/{ledgerId}/funds/dates/2022-10-01 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1Ni <truncated>" \
-H "Ocp-Apim-Subscription-Key: 0f14ebcab0ec4b29ae0cb90d91b4a84a" \
-H "Vipps-System-Name: acme" \
-H "Vipps-System-Version: 3.1.2" \
-X GET
Step 5 - Get a fees ledger
Send
GET:/report/v2/ledgers/{ledgerId}/{topic}/dates/{ledgerDate}
for a list of payments/transactions.
Set topic
to fees
.
Set ledgerId
to the 6-digit value that is the unique ledger ID for the ledger you want.
Set ledgerDate
to a value in format YYYY-MM-DD (e.g., 2022-10-01
).
curl https://api.vipps.no/report/v2/ledgers/{ledgerId}/fees/dates/2022-10-01 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1Ni <truncated>" \
-H "Ocp-Apim-Subscription-Key: 0f14ebcab0ec4b29ae0cb90d91b4a84a" \
-H "Vipps-System-Name: acme" \
-H "Vipps-System-Version: 3.1.2" \
-X GET
Step 6 - Get a continuous feed of data (optional)
If you want to continuously stream data as it becomes available, use the
GET:/report/v2/ledgers/{ledgerId}/{topic}/feed
endpoint.
Set topic
to funds
or fees
, for the type of ledger you require.
Set ledgerId
to the 6-digit value that is the unique ledger ID for the ledger you want.
curl https://api.vipps.no/report/v2/ledgers/{ledgerId}/{topic}/feed \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1Ni <truncated>" \
-H "Ocp-Apim-Subscription-Key: 0f14ebcab0ec4b29ae0cb90d91b4a84a" \
-H "Vipps-System-Name: acme" \
-H "Vipps-System-Version: 3.1.2" \
-X GET
Next Steps
See the Report API guide to read about the concepts and details.