Quick start
Use the PSP API to initiate a PSP payment and get details or update the status of this payment. Use the PSP Merchant Signup API to get information about merchants, create a new sales unit, or update the sales unit details.
Postman
Prerequisites
Review Vipps quick start guides for information about getting your test environment set up.
Step 1: Get the Postman collection and environment
Save the following files to your computer:
Step 2: Import the Postman files
- In Postman, click Import in the upper-left corner.
- In the dialog that opens, with File selected, click Upload Files.
- Select the two files you have just downloaded and click Import.
Step 3: Set up Postman environment
- Click the down arrow, next to the "eye" icon in the top-right corner, and select the environment you have imported.
- Click the "eye" icon and, in the dropdown window, click
Edit
in the top-right corner. - Fill in the
Current Value
for the following fields to get started.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
.
Note that the calls in this PSP API require your PSP subscription key.
Make API calls
For all the following, you will start by sending request Get Access Token
.
This provides you with access to the API.
The access token is valid for 1 hour in the test environment and 24 hours in the production environment. See the API reference for details about the calls.
PSP Payments and details
- Send request
Initiate a PSP Payment
. Ctrl+click on the link that appears, and it will take you to the website where you can enter your test phone number and complete the payment authorization in the Vipps app in your mobile test environment. ThepspTransactionId
in the environment is updated automatically. SeePOST:/v3/psppayments/init/
. - Send request
Get Details
for details about the transaction. SeeGET:/v3/psppayments/{pspTransactionId}/details
. - Send request
Update Status
. This is an example of what the PSP sends Vipps to update on the status of the payment. SeePOST:/v3/psppayments/updatestatus
.
PSP Merchant Sign up
- Send
Get all Merchants
for a JSON response showing all the merchants and their information. SeeGET:/v1/merchants
. - Send
Get Merchant by MSN
for information about a specific merchant. Supply the MSN for a merchant in the list of all merchants. SeeGET:/v1/merchants/:merchantSerialNumber
. - Send
Create new Merchant Sales Unit
. Notice themerchantSerialNumber
is provided back. SeePOST:/v1/merchants
. - Open
Update Merchant Sales Unit
. Use MSN for the new merchant and update the body before sending the request. Then, you can update theGet Merchant by MSN
request with the new MSN and see if the changes were implemented. SeePATCH:/v1/merchants/:merchantSerialNumber
.