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 forInitiate a PSP Payment
.merchantSerialNumber
- Required only forGet Merchant by MSN
.makePaymentUrl
- PSP 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.PSP-ID
- PSP ID provided by Vipps, needed forInitiate a PSP Payment
,Update Status
, andGet Details
.idempotency_key
- Unique request ID, needed only forCreate new Merchant Sales Unit
.
- curl
- Postman
In Postman, import the following files:
๐ฅ To reduce risk of exposure, never store production keys in Postman or any similar tools. ๐ฅ
Update the Current Value field in your Postman environment with your Merchant Test keys. Use Current Value field for added security, as these values are not synced to the cloud.
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
- Postman
Send request Get Access Token
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
- Postman
Send request Get all Merchants
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
- Postman
Send request Get Merchant by 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
- Postman
Send request Create new Merchant Sales Unit
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
- Postman
Use MSN for the new merchant and update the body in Update Merchant Sales Unit
before sending the request.
Send request Update Merchant Sales Unit
Then, you can update the Get Merchant by MSN
request with the new MSN and see if the changes were implemented.
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.