Skip to main content

Quick start

Vipps Only available for Vipps.

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.

Sign up your first merchant

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 - Merchant key is required for getting the access token.
  • client_secret - Merchant key is required for getting the access token.
  • Ocp-Apim-Subscription-Key-PSP - PSP subscription key is required for all requests.
  • merchantSerialNumber - Required only for Get Merchant by MSN.

See How to find the API keys.

You will also need:

  • PSP-ID - PSP ID provided by Vipps, needed for Initiate a PSP Payment, Update Status, and Get Details.
  • mobileNumber - Test mobile number, needed only for Initiate a PSP Payment.
  • makePaymentUrl - PSP URL used by Vipps to send the card data, needed only for Initiate a PSP Payment.
  • pspRedirectUrl - Redirect URL which the user is redirected to after approving/rejecting the payment.

Note that the requests in this PSP API require your PSP subscription key.

Step 2 - Authentication

For all the following, you will need an access_token from: POST:/accesstoken/get. This provides you with access to the API.

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: YOUR-SYSTEM-NAME' \
-H 'Vipps-System-Version: YOUR-SYSTEM-VERSION' \
-H 'Vipps-System-Plugin-Name: YOUR-PLUGIN-NAME' \
-H 'Vipps-System-Plugin-Version: YOUR-PLUGIN-VERSION' \
--data ''

For an explanation of the headers, see HTTP headers.

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

Step 3 - Get all merchants

Send GET:/merchant-management/psp/v1/merchants for a JSON response showing all the merchants and their information.

curl -X GET https://apitest.vipps.no/merchant-management/psp/v1/merchants \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR-ACCESS-TOKEN" \
-H "Ocp-Apim-Subscription-Key: YOUR-SUBSCRIPTION-KEY" \
-H 'PSP-ID: <Provided by Vipps>' \
-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" \

Step 4 - Get Merchant by MSN

Use GET:/merchant-management/psp/v1/merchants/{merchantSerialNumber} for information about a specific merchant. Supply the MSN.

curl -X GET https://apitest.vipps.no/merchant-management/psp/v1/merchants/{merchantSerialNumber} \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR-ACCESS-TOKEN" \
-H "Ocp-Apim-Subscription-Key: YOUR-SUBSCRIPTION-KEY" \
-H 'PSP-ID: <Provided by Vipps>' \
-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" \

Step 5 - Create new Merchant

Send POST:. Notice the merchantSerialNumber is returned.

curl -X POST https://apitest.vipps.no/merchant-management/psp/v1/merchants \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR-ACCESS-TOKEN" \
-H "Ocp-Apim-Subscription-Key: YOUR-SUBSCRIPTION-KEY" \
-H 'Idempotency-Key: YOUR-IDEMPOTENCY-KEY' \
-H 'PSP-ID: <Provided by Vipps>' \
-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 '{
"name": "Fry Merch Shop",
"address": {
"addressLine1": "Robert Levins gate 5",
"city": "Oslo",
"country": "NO",
"postCode": "0154",
"addressLine2": ""
},
"logo": "",
"organizationNumber": "123456789",
"companyName": "Fry Teknologi AS",
"companyEmail": "developer@example.com",
"mccCode": "5411",
"email": "developer@example.com",
"website": "https://example.com"
}'

Step 6 - (Optional) Update Merchant

To update the merchant, send the PATCH:/v1/merchants/:merchantSerialNumber request. Provide the Merchant Serial Number and the properties to be updated.

curl -X PATCH https://apitest.vipps.no/merchant-management/psp/v1/merchants/{merchantSerialNumber} \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR-ACCESS-TOKEN" \
-H "Ocp-Apim-Subscription-Key: YOUR-SUBSCRIPTION-KEY" \
-H 'Idempotency-Key: YOUR-IDEMPOTENCY-KEY' \
-H 'PSP-ID: <Provided by Vipps>' \
-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 '{
"email": "developer.new@example.new.com",
"website": "https://example.new.com"
}'

Next steps

See the PSP Signup API guide to read about the concepts and details.

Help us improve our documentation

Did you find what you were looking for?