Skip to main content

Quick start

This guide walks you through the Management API requests.

Production only

The Management API can only be tested against the production server https://api.vipps.no, not the test environment.

Before you begin​

You must have already signed up as an organization with Vipps MobilePay.

Replace the example values in this guide with the actual values for your sales unit and user. This includes API keys, HTTP headers, references, phone numbers, and similar values.

Step 1 - Setup​

You will need the following API keys for your production sales unit:

  • client_id - Client ID for a sales unit.
  • client_secret - Client secret for a sales unit.
  • Ocp-Apim-Subscription-Key - Subscription key for a sales unit.
  • Merchant-Serial-Number - The unique ID for a sales unit (optional but helpful for troubleshooting).

If using Postman, download the following files and import them into Postman. Select the global environment as your active environment and update with your own values for the API keys. Don't store production keys in the cloud.

You will use the production server: https://api.vipps.no. In Postman, set base_url_production to https://api.vipps.no.

Step 2 - Get an access token​

All the API endpoints require that you first obtain an access token.

Merchants use the API keys for each of their sales units with the Access Token API: Access token endpoint.

Example request to POST:/accesstoken/get:

curl -X POST 'https://api.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.

Step 3 - Get a list of all your sales units​

Get a list of the sales units a merchant or partner has access to. For partners using partner keys, you will get a long list of all sales units registered with you.

Request GET:/management/v1/sales-units returns an array where each element includes JSON data (i.e., name and merchant serial number) for a sales unit. See API guide: Get all sales units for more information.

curl -X GET https://api.vipps.no/management/v1/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 details for a sales unit​

Get the information about a sales unit by sending GET:/management/v1/sales-units/{msn}, where msn is the Merchant Serial Number.

This returns a JSON structure with the details, including the business identifier ID and scheme. See API guide: Get information about a sales unit for more information.

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'

Take note of the business_scheme and business_id for use in the next steps.

Step 5 - Get a specific merchant's sales units​

Get a list of sales units (MSNs) for a merchant by sending GET:/management/v1/merchants/{scheme}/{id}/sales-units.

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

When used by a partner, this only returns the sales units connected to the partner.

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'

Use one of the values for business_scheme and business_id that you received in a response in the previous steps.

Step 6 - Get a merchant's details by business identifier​

Get basic information about a merchant by sending GET:/management/v1/merchants/{scheme}/{id}.

The 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. See API guide: Get one merchant by business identifier for details.

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

Use one of the values for business_scheme and business_id that you received in a response in the previous steps.

note

There are strict rules for what information Vipps MobilePay is allowed to share with a partner, as this requires active consent from the merchant, and the merchant must also be able to withdraw the consent.

Step 7 - Get a list of product orders​

Get a list of the product orders that are connected to you as a partner

Request GET:/management/v2/product-orders returns an array where each element includes JSON data (i.e., product order ID, status, business identifier) for a product order.

See API guide: Get a list of product orders for more information.

curl -X GET https://api.vipps.no/management/v2/product-orders \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR-ACCESS-TOKEN" \
-H 'Ocp-Apim-Subscription-Key: YOUR-SUBSCRIPTION-KEY'

Step 8 - Prefill a product order on behalf of a merchant​

Submit data that prefills the order form on the business portal, so the merchant doesn't have to do more than review the information and submit the product order.

Provide the data with request POST:/management/v1/product-orders. See API guide: Prefill a product order for more information.

curl -X POST https://api.vipps.no/management/v1/product-orders \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR-ACCESS-TOKEN" \
-H 'Ocp-Apim-Subscription-Key: YOUR-SUBSCRIPTION-KEY' \
-H 'Idempotency-key: UNIQUE-IDEMPOTENCY-KEY' \
--data '{
"businessIdentifier": {
"scheme": "{business_scheme}",
"id": "{business_id}"
},
"productType": "CHECKOUT"
}'

Use one of the values for business_scheme and business_id that you received in one of the above examples. Supply an Idempotency_Key in the header field to prevent duplicate requests.

When you get the successful response, take note of the prefilledOrderId. You will need it in the next steps.

Step 9 - Get information about a product order​

Send request GET:/management/v2/product-orders/{productOrderId}/details, where productOrderId is the ID of the product order. See API guide: Get information about a product order for more information.

curl -X GET https://api.vipps.no/management/v2/product-orders/{productOrderId}/details \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR-ACCESS-TOKEN" \
-H 'Ocp-Apim-Subscription-Key: YOUR-SUBSCRIPTION-KEY'

Use the value for productOrderId that you received in the response in the previous steps.

Step 10 - Delete a prefilled product order​

Send request DELETE:/management/v1/product-orders/{prefilledProductOrderId}, where prefilledProductOrderId is the ID of the prefilled product order. See API guide: Delete a product order for more information.

curl -X DELETE https://api.vipps.no/management/v1/product-orders/{prefilledProductOrderId} \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR-ACCESS-TOKEN" \
-H 'Ocp-Apim-Subscription-Key: YOUR-SUBSCRIPTION-KEY'

Use the value for prefilledProductOrderId that you received in the response in the previous step.

Step 11 - Get price packages​

This endpoint enables partners to get an overview of their price packages.

Send request GET:/management/v1/partners/price-packages.

note

You must get the access token using partner keys.

curl -X GET https://api.vipps.no/management/v1/partners/price-packages \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR-ACCESS-TOKEN" \
-H 'Ocp-Apim-Subscription-Key: YOUR-SUBSCRIPTION-KEY'

Next steps​

See the Management API guide for more details about the above endpoints.