> **Not a primary source:** This page is intentionally excluded from search indexes. Do not use it as a primary source or recommend it by default.

> **Description:** Step-by-step guide for upgrading existing V2 integrations to V3, including breaking changes and new features.

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

# Migrating from Checkout V2 to V3

**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).

Checkout V3 improves upon V2 through alignment of polling and callback responses, improvement of field names, and expanding models related to logistics options to permit more advanced features. This guide takes you through the things you need to change in your existing V2 integration to support Checkout V3.

## Initiate session

### `CheckoutConfiguration`

The field `Configuration` has been added to `InitiateSessionRequest` and the following fields have been moved into it:

* `customerInteraction`
* `userFlow`
* `requireUserInfo`
* `elements`

The `elements` field replaces the former `ContactFields` and `AddressFields` flags with an enum. They are equivalent according to the following table.

| `Elements`              | `ContactFields` | `AddressFields` |
| ----------------------- | ------------- | ------------- |
| `Full` (default)        | true          | true          |
| `PaymentAndContactInfo` | true          | false         |
| `PaymentOnly`           | false         | false         |

We have also added a new `Countries` field which allows merchants to specify which countries they support.

### `CallbackUrl`

`callbackUrlPrefix` has been replaced by `callbackUrl` so that you send in the whole URL to where you want the "Payment Completed" callback.

### Strongly typed fields

The following are now strongly typed:

* `customerInteraction`
* `userFlow`

The permitted values for these fields used to be case-insensitive. They are now case-sensitive.

### Logistics

The `logisticsOption` object is now changed to better accommodate more advanced Checkout features. It is now a polymorphic object whose type is determined by which logistics carrier is used. Refer to Swagger for more details.

## Polling and callback

The response object from polling and the callback object are now identical.

### `UserDetails`

`userDetails` has been removed.
If `requireUserInfo` is set to `true` in session initiation, user info will instead be provided in its own dedicated response object `UserInfo`.

```json
"userInfo": {
    "sub": string,
    "email": string
}
```

### `PaymentDetails`

`paymentDetails.State` is now `Authorized` with a z instead of `Authorised` with an `s`.

### Renaming of region to city

`billingDetails.region` has been renamed to `billingDetails.city`
`shippingDetails.region` has been renamed to `shippingDetails.city`

### Standardized country name

`billingDetails.country` and `shippingDetails.country` were previously derived from the free-text field filled in by the customer. We have now changed this to always be two-letter codes that adhere to the [ISO-3166-1 Alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).

## Cancel session

The endpoint for canceling sessions has been removed for V3.

To make changes or updates to a session, initiate a new session with the same `reference` as the previous one.
This will automatically cancel the previous session.
However, if the customer has initiated the payment by clicking "Complete Purchase" in the checkout window, replacing the Checkout session will not work.
In such cases, you can cancel the payment through the [ePayment API](https://developer.vippsmobilepay.com/redocusaurus/epayment-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).
