Skip to main content

Quick start

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.noand not in the test environment.

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

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

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.

No additional setup needed for curl. For Postman, click the Postman tab 👆.

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. For more information, see Access token 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-CLIENT-ID' \
-H 'client_secret: YOUR-CLIENT-SECRET' \
-H 'Ocp-Apim-Subscription-Key: YOUR-SUBSCRIPTION-KEY' \
--data ''

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

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 prefilled product orders

Get a list of the prefilled product orders you have created.

Request GET:/management/v1/product-orders returns an array where each element includes JSON data (i.e., product order ID, status, business identifier) for a prefilled product order. See API guide: Get information about your product orders for more information.

curl -X GET 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'

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

Submit data that prefills the order form on portal.vippsmobilepay.com, 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 prefilled product order

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

curl -X GET https://api.vipps.no/management/v1/product-orders/{prefilledProductOrderId}/details \
-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 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 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, where prefilledProductOrderId is the ID of the prefilled product order.

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.

Help us improve our documentation

Did you find what you were looking for?