Vipps PSP Signup API quick start
Applicable to 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 a Payment Service Provider with Vipps MobilePay. You will receive an email with your test credentials from our partner team.
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.
You will also need:
PSP-ID
- PSP ID provided by Vipps, needed forInitiate a PSP Payment
,Update Status
, andGet Details
.mobileNumber
- Test mobile number, needed only forInitiate a PSP Payment
.makePaymentUrl
- PSP provided URL used by Vipps to send the card data, needed only forInitiate a PSP Payment
.pspRedirectUrl
- Redirect URL which the user is redirected to after approving/rejecting the payment.
Step 2 - Get an access tokenβ
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' \
--data ''
For production, include all the Vipps-System
headers so that we can help with debugging any problems.
For details, see HTTP headers.
The property access_token
should be used as the Bearer token in the Authorization
header of all the following API requests.
Step 3 - Get a listing of all merchants associated with you as PSPβ
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 details 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 a new merchantβ
Send
POST:/merchant-management/psp/v1/merchants
.
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 a 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.