Skip to main content

Quick start

Before you begin

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.

This API can only be tested on the production server, https://api.vipps.no and not in the test environment.

warning

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

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.

You will use the production server: https://api.vipps.no.

Get keys for a production sales unit (How to find the API keys):

  • 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.

No additional setup needed :)

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.

Production Server

Use the address to the production server (https://api.vipps.no) and your keys for a production sales unit.

curl -X POST 'https://api.vipps.no/accesstoken/get' \
-H "Content-Type: application/json" \
-H 'client_id: YOUR-PRODUCTION-CLIENT-ID' \
-H 'client_secret: YOUR-PRODUCTION-CLIENT-SECRET' \
-H 'Ocp-Apim-Subscription-Key: YOUR-PRODUCTION-SUBSCRIPTION-KEY' \
-H 'Merchant-Serial-Number: YOUR-PRODUCTION-MSN' \
--data ''

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. For more information, see Access token API.

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 (e.g., business:NO:ORG, business:DK:CVR, business:FI:Y-tunnus). The id is used for identifying the merchant. For Norwegian companies, this is the organization number.

curl -X GET https://api.vipps.no/management/v1/merchants/business:NO:ORG/{id}/sales-units \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR-ACCESS-TOKEN" \
-H 'Ocp-Apim-Subscription-Key: YOUR-SUBSCRIPTION-KEY' \

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' \

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?