Use the Checkout API to create a checkout session, retrieve session information, and cancel the current checkout session.
Review Quick start guides for information about getting your test environment set up.
Step 1: Get the 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
Editin the top-right corner.
- Fill in the
Current Valuefor the following fields to get started. For the first keys, go to Vipps Portal > Utvikler -> Test Keys.
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- Merchant subscription key.
merchantSerialNumber- Merchant id.
internationalMobileNumber- The mobile number for the test app profile you have received or registered, including country code. Do not include the
You can update any of the other environment variables. Be aware of this:
- Any currency amount must be an Integer value minimum 100 in øre.
- Most URLs must be
Make API calls
Create a checkout session
Create a Checkout Session. This starts a simple session by using
referencevariable is automatically set in the environment of this Postman example and can be used for subsequent calls relating to this session.
To display the session, you will need to load the Vipps Checkout SDK in your website, as described in API Guide: Displaying the session.
Retrieve the session information
Get session info. This retrieves the session information by using
referencevariable was previously set in the environment.
You will see the details appear in the lower pane.