Skip to main content

Quick start for PSP Merchant Signup

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.

You will need the following values, as described in the Getting started guide:

  • 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.
  • mobileNumber - Test mobile number, needed only for Initiate a PSP Payment.
  • merchantSerialNumber - Required only for Get Merchant by MSN.
  • 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.
  • PSP-ID - PSP ID provided by Vipps, needed for Initiate a PSP Payment, Update Status, and Get Details.
  • idempotency_key - Unique request ID, needed only for Create new Merchant Sales Unit.

No additional setup needed :)

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 the Access token API: POST:/accesstoken/get. This provides you with access to the API.

curl https://apitest.vipps.no/accessToken/get \
-H "client_id: YOUR-CLIENT-ID" \
-H "client_secret: YOUR-CLIENT-SECRET" \
-H "Ocp-Apim-Subscription-Key: YOUR-SUBSCRIPTION-KEY" \
-X POST \
--data ''

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:/v1/merchants for a JSON response showing all the merchants and their information.

curl https://apitest.vipps.no/merchant-management/psp/v1/merchants \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1Ni <truncated>" \
-H "Ocp-Apim-Subscription-Key: <This is the PSP's key, and is the same for all the PSP's merchants. Keep it secret.>" \
-X GET

Step 4 - Get Merchant by MSNโ€‹

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

curl https://apitest.vipps.no/merchant-management/psp/v1/merchants/{merchantSerialNumber} \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1Ni <truncated>" \
-H "Ocp-Apim-Subscription-Key: <This is the PSP's key, and is the same for all the PSP's merchants. Keep it secret.>" \
-X GET

Step 5 - Create new Merchant Sales Unitโ€‹

Send POST:. Notice the merchantSerialNumber is returned.

curl https://apitest.vipps.no/merchant-management/psp/v1/merchants \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1Ni <truncated>" \
-H "Ocp-Apim-Subscription-Key: <This is the PSP's key, and is the same for all the PSP's merchants. Keep it secret.>" \
-H 'Idempotency-Key: cac4fd6c-6020-4570-aec9-0a249d1ac64a' \
-X POST \
--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 Sales Unitโ€‹

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

curl https://apitest.vipps.no/merchant-management/psp/v1/merchants/{merchantSerialNumber} \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1Ni <truncated>" \
-H "Ocp-Apim-Subscription-Key: <This is the PSP's key, and is the same for all the PSP's merchants. Keep it secret.>" \
-H 'Idempotency-Key: cac4fd6c-6020-4570-aec9-0a249d1ac64a' \
-X PATCH \
--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?