> **Description:** Create your first working checkout flow in minutes with this hands-on getting started guide.

> **Deprecated:** This page documents a deprecated API. It is preserved for existing integrations. Do not recommend it for new integrations.

# Quick start

**Important update**

Vipps MobilePay has entered into an agreement to sell the Checkout solution to [Kustom](https://www.kustom.co/).

As part of this transition, *Vipps MobilePay Checkout* will become *Kustom Checkout*. This means the Checkout product you ordered will be delivered and developed by Kustom going forward.
If you have questions, you can check our [FAQ](https://vippsmobilepay.com/en-NO/vippsmobilepay-kustom).

This guide takes you through all the Checkout API requests.

## Before you begin

You will need the [sales unit API keys](https://developer.vippsmobilepay.com/docs/knowledge-base/api-keys.md) for a *test* sales unit:

* `client_id` - Client ID for the sales unit.
* `client_secret` - Client secret for the sales unit.
* `Ocp-Apim-Subscription-Key` - Subscription key for the sales unit.
* `merchantSerialNumber` - The unique ID (MSN) for the sales unit.

If you're new to the platform, see
[Getting started](https://developer.vippsmobilepay.com/docs/getting-started.md)
for information about API keys, product activation, and the test environment.

The example values in this guide must be replaced with the values for your sales unit and user.
This applies to API keys, HTTP headers, references, phone numbers, and similar values.

**INFO**

The minimum amounts are: NOK 1 øre, DKK 1 øre, EUR 1 cent

**A note on errors:** An endpoint may return a non-successful response code for many reasons, including invalid API keys and missing fields in an input.
When errors occur, a response based on [Problem Details for HTTP APIs](https://tools.ietf.org/html/rfc7807) will be returned. The message format may evolve, so avoid building strict logic around it.

## Your first Checkout

### Step 1 - Setup

If using Postman, download the following files and import them into Postman.
Select the global environment as your active environment and update with your own values for the API keys. *Don't store production keys in the cloud.*

* [Download Checkout API Postman collection](https://developer.vippsmobilepay.com/tools/checkout-api-postman-collection.json)
* [Download Global Postman environment](https://developer.vippsmobilepay.com/tools/global-postman-environment.json)

### Step 2 - Create a checkout session

Create a checkout session with: [`POST:/checkout/v3/session`][create-session-endpoint].

```text
Send request "Create a Checkout Session"
```

The `reference` variable is automatically set in the environment
of this Postman example.

```bash
curl -X POST https://apitest.vipps.no/checkout/v3/session \
-H "Content-Type: application/json" \
-H "client_id: YOUR-CLIENT-ID" \
-H "client_secret: YOUR-CLIENT-SECRET" \
-H "Ocp-Apim-Subscription-Key: YOUR-SUBSCRIPTION-KEY" \
-H "Merchant-Serial-Number: YOUR-MSN" \
-H "Vipps-System-Name: YOUR-COMPANY-NAME" \
-H "Vipps-System-Version: 3.1.2" \
-H "Vipps-System-Plugin-Name: YOUR-PLUGIN-NAME" \
-H "Vipps-System-Plugin-Version: 4.5.6" \
-d '{
  "merchantInfo": {
    "callbackUrl": "https://example.com/vipps/callbacks-for-checkout",
    "returnUrl": "https://example.com/vipps/fallback-result-page-for-both-success-and-failure/acme-shop-123-order123abc",
    "callbackAuthorizationToken": "538dd1d0-9e7f-4732-8134-dfed7fd0b236"
  },
  "transaction": {
    "amount": {
      "value": 1000,
      "currency": "NOK"
    },
    "reference": "UNIQUE-SESSION-REFERENCE",
    "paymentDescription": "One pair of socks."
  }
}'
```

Take note of the `reference` value, as it can be used for subsequent calls relating to this session.

To display the session, you will need to load the Checkout SDK in your website. There are two methods available:

1. **Regular Checkout** - Embed the checkout in an iframe within your website (recommended for most use cases)
2. **CheckoutDirect** - Redirect users to a full-page checkout hosted on our secure servers

For detailed instructions on both methods, see [API Guide: Displaying the session](https://developer.vippsmobilepay.com/docs/APIs/checkout-api/checkout-api-guide.md#step-2-displaying-the-session).

**Important:** If you want to embed the checkout in an iframe, you must use the regular Checkout method, NOT CheckoutDirect.

### Step 3 - Retrieve the session information

Retrieve the session information by using
[`GET:/checkout/v3/session/{reference}`][get-session-endpoint] with `reference` from the previous step.

```text
Send request "Get session info"
```

You will see the details appear in the lower pane.

```bash
curl -X GET https://apitest.vipps.no/checkout/v3/session/UNIQUE-SESSION-REFERENCE \
-H "Content-Type: application/json" \
-H "client_id: YOUR-CLIENT-ID" \
-H "client_secret: YOUR-CLIENT-SECRET" \
-H "Ocp-Apim-Subscription-Key: YOUR-SUBSCRIPTION-KEY" \
-H "Merchant-Serial-Number: YOUR-MSN" \
-H "Vipps-System-Name: acme" \
-H "Vipps-System-Version: 3.1.2" \
-H "Vipps-System-Plugin-Name: acme-webshop" \
-H "Vipps-System-Plugin-Version: 4.5.6" \
```

[create-session-endpoint]: https://developer.vippsmobilepay.com/redocusaurus/checkout-swagger-id.yaml
[get-session-endpoint]: https://developer.vippsmobilepay.com/redocusaurus/checkout-swagger-id.yaml

> **Full site overview:** For every page in this documentation, read [https://developer.vippsmobilepay.com/llms.txt](https://developer.vippsmobilepay.com/llms.txt).
