Skip to main content

Quick start

Before you begin

Be aware that these are only running on the production server, https://api.vipps.no and not in the test environment.

🔥 To reduce risk of exposure, never store production keys in Postman or any similar tools. 🔥

Important: Partner keys must be kept secret. They can be used to act on behalf of all the partner's merchants. It is the partner's responsibility to manage the partner keys securely. See Partner keys.

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.

Get information about your merchant sales units

Step 1 - Setup

You must have already signed up as an organization with Vipps MobilePay and have your test credentials from the merchant portal. See Getting started guide for help.

Get these API key values for your sales unit:

  • client-id - Partner key is required for getting the access token.
  • client-secret - Partner key is required for getting the access token.
  • Ocp-Apim-Subscription-Key - Partner subscription key is required for all requests.
  • merchantSerialNumber - The unique ID for a test sales unit. Merchant ID is only required for Get sales unit details based on MSN, but can be included in all headers.
  • orgno -The Organization number for the merchant.

See How to find the API keys.

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.

Note to use the address to the production server and provide keys for a production sales unit.

curl -X POST 'https://apitest.vipps.no/accesstoken/get' \
-H "Content-Type: application/json" \
-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' \
-H 'Vipps-System-Plugin-Name: acme-webshop' \
-H 'Vipps-System-Plugin-Version: 4.5.6' \
--data ''

Replace the value of the Vipps-System headers with your own values. See HTTP headers for more details.

note

When a partner uses partner keys for requests that are not for a specific merchant, the Merchant-Serial-Number can be omitted.

The property access_token should be used for all other API requests in the Authorization header as the Bearer token.

Step 3 - Get merchant sales units by business identifier

Send request GET:/management/v1/merchants/{scheme}/{id}/sales-units, where scheme is the type of organization identifier and id is the ID used for identifying the merchant.

curl -X GET https://api.vipps.no/management/v1/merchants/{scheme}/{id}/sales-units \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR-ACCESS-TOKEN" \
-H 'Ocp-Apim-Subscription-Key: YOUR-SUBSCRIPTION-KEY' \
-H 'Vipps-System-Name: acme' \
-H 'Vipps-System-Version: 3.1.2' \
-H 'Vipps-System-Plugin-Name: acme-webshop' \
-H 'Vipps-System-Plugin-Version: 4.5.6' \

Take note of the merchant serial numbers returned and use one of these in the next step.

Step 4 - Get sales unit by Merchant Serial Number

Send request GET:/management/v1/sales-units/{msn}, where msn is the Merchant Serial Number.

This returns a JSON structure with the details, including the org number.

curl -X GET https://api.vipps.no/management/v1/sales-units/{msn} \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR-ACCESS-TOKEN" \
-H 'Ocp-Apim-Subscription-Key: YOUR-SUBSCRIPTION-KEY' \
-H 'Vipps-System-Name: acme' \
-H 'Vipps-System-Version: 3.1.2' \
-H 'Vipps-System-Plugin-Name: acme-webshop' \
-H 'Vipps-System-Plugin-Version: 4.5.6' \

See Get information about a sales unit for more information.

Next steps

See the Management API guide to read about the concepts and details.

Help us improve our documentation

Did you find what you were looking for?