Quick start
Use the Checkout API to create a checkout session, retrieve session information, and cancel the current checkout session.
Postman
Prerequisites
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
Edit
in the top-right corner. - Fill in the
Current Value
for 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
https
.
Make API calls
Create a checkout session
Send request
Create a Checkout Session
. This starts a simple session by usingPOST:/v3/session
.The
reference
variable 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
Send request
Get session info
. This retrieves the session information by usingGET:/v3/session/{reference}
. Thereference
variable was previously set in the environment.You will see the details appear in the lower pane.