Skip to main content

checkout-backend-merchant.API (v2)

Download OpenAPI specification:Download

For details, see the Checkout API Guide.

Session

Create a Checkout session

Creates a checkout session and returns a JWT token which wraps the login URL, ecom landing page URL, free standing card page URL.

header Parameters
Vipps-System-Name
string
Default: {{vipps_system_name}}
Example: Acme Enterprises Ecommerce DeLuxe
Vipps-System-Version
string
Default: {{vipps_system_version}}
Example: 3.1.2
Vipps-System-Plugin-Name
string
Default: {{vipps_system_plugin_name}}
Example: acme-webshop
Vipps-System-Plugin-Version
string
Default: {{vipps_system_plugin_version}}
Example: 4.5.6
client_id
string
Default: {{client_id}}
Example: fb492b5e-7907-4d83-bc20-c7fb60ca35de
client_secret
string
Default: {{client_secret}}
Example: Y8Kteew6GE3ZmeycEt6egg==
Ocp-Apim-Subscription-Key
string
Default: {{Ocp-Apim-Subscription-Key}}
Example: 0f14ebcab0eb4b29ae0cb90d91b4a84a
Merchant-Serial-Number
string
Default: {{merchantSerialNumber}}
Example: 123456
Request Body schema:
object
object
object or null

If both dynamic and fixed options are specified, dynamic options is provided to the user. If no DynamicOptionsCallback is provided, only fixed logistics options will be used. When using dynamic shipping we recommend that you define logistics.fixedOptions as a backup. If the callback does not resolve successfully within 8 seconds, returns null or an empty list the system will fall back to static options. If no fallback options are provided, the user will be presented with an error and will not be able to continue with the checkout.

object or null

If customer information is known, it can be prefilled.

customerInteraction
string or null

If customer is physically present: "customer_present", otherwise: "customer_not_present".

contactFields
boolean

If false; disables contact information for the customer in the checkout. If false, AddressFields must also be false.

addressFields
boolean

If false; disables address information for the customer in the checkout. If true, ContactFields must also be true.

userFlow
string or null

One of the following: "WEB_REDIRECT", "NATIVE_REDIRECT". To ensure having a return URL based on an app URL, use "NATIVE_REDIRECT".

Responses

Callbacks

Request samples

Content type
Example
{
  • "merchantInfo": {
    },
  • "transaction": {
    },
  • "logistics": {
    },
  • "prefillCustomer": {
    },
  • "customerInteraction": "customer_not_present",
  • "contactFields": true,
  • "addressFields": true
}

Response samples

Content type
application/json
{
  • "token": "eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uSWQiOiJUdHF1Y3I5ZDdKRHZ6clhYWTU1WUZRIiwic2Vzc2lvblBvbGxpbmdVUkwiOiJodHRwOi8vbG9jYWxob3N0OjUwMDAvY2hlY2tvdXQvc2Vzc2lvbi9UdHF1Y3I5ZDdKRHZ6clhYWTU1WUZRIn0.ln7VzZkNvUGu0HhyA_a8IbXQN35WhDBmCYC9IvyYL-I",
  • "checkoutFrontendUrl": "https://vippscheckout.vipps.no/v1/",
}

Callback payload samples

Callback
Content type
application/json
"{\"StreetAddress\":\"Robert Levins gate 5\",\"PostalCode\":\"0150\",\"Region\":\"Oslo\",\"Country\":\"NO\"}"

Get session info

Transaction information, user information and shipping information are included in the response if the SessionState is PaymentInitiated

path Parameters
sessionId
required
string
Default: "{{sessionId}}"

The Id of the session. Example: "v52EtjZriRmGiKiAKHByK2".

header Parameters
Vipps-System-Name
string
Default: {{vipps_system_name}}
Example: Acme Enterprises Ecommerce DeLuxe
Vipps-System-Version
string
Default: {{vipps_system_version}}
Example: 3.1.2
Vipps-System-Plugin-Name
string
Default: {{vipps_system_plugin_name}}
Example: acme-webshop
Vipps-System-Plugin-Version
string
Default: {{vipps_system_plugin_version}}
Example: 4.5.6
client_id
string
Default: {{client_id}}
Example: fb492b5e-7907-4d83-bc20-c7fb60ca35de
client_secret
string
Default: {{client_secret}}
Example: Y8Kteew6GE3ZmeycEt6egg==
Ocp-Apim-Subscription-Key
string
Default: {{Ocp-Apim-Subscription-Key}}
Example: 0f14ebcab0eb4b29ae0cb90d91b4a84a
Merchant-Serial-Number
string
Default: {{merchantSerialNumber}}
Example: 123456

Responses

Response samples

Content type
application/json
{
  • "sessionId": "v52EtjZriRmGiKiAKHByK2",
  • "reference": "acme-shop-123-order123abc",
  • "sessionState": "SessionStarted",
  • "paymentMethod": "Wallet",
  • "paymentDetails": {
    },
  • "shippingDetails": {
    },
  • "billingDetails": {
    }
}