checkout-backend-merchant-v3.API (v3)
Download OpenAPI specification:Download
For details, see the Checkout API Guide.
Create a Checkout session
header Parameters
Vipps-System-Name | string Default: {{vipps_system_name}} Example: Acme Commerce |
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:
required | object |
required | 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. | |
object or null |
Responses
Callbacks
Request samples
- Payload
{- "merchantInfo": {
- "callbackUrl": "{{callbackUrl}}",
- "returnUrl": "{{fallBack}}",
- "callbackAuthorizationToken": "{{$guid}}",
- "termsAndConditionsUrl": "{{termsAndConditionsUrl}}"
}, - "transaction": {
- "amount": {
- "value": 1000,
- "currency": "{{currency}}"
}, - "reference": "{{orderId}}",
- "paymentDescription": "{{transactionTextInitiate}}"
}, - "logistics": {
- "dynamicOptionsCallback": "{{dynamicOptionsCallbackUrl}}",
- "fixedOptions": [
- {
- "brand": "POSTEN",
- "amount": {
- "value": 300,
- "currency": "{{currency}}"
}, - "id": "postenservicepakke1",
- "priority": 1,
- "isDefault": true,
- "description": "Your package is delivered to your home."
}, - {
- "brand": "POSTEN",
- "type": "PICKUP_POINT",
- "amount": {
- "value": 300,
- "currency": "{{currency}}"
}, - "id": "postenservicepakke2",
- "priority": 2,
- "isDefault": false,
- "description": "Pick up your package at the local store."
}
], - "integrations": {
- "porterbuddy": {
- "publicToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1Ni ",
- "apiKey": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1Ni ",
- "origin": {
- "name": "{{firstName}} {{lastName}}",
- "email": "{{email}}",
- "phoneNumber": "{{internationalMobileNumber}}",
- "address": {
- "streetAddress": "{{streetAddress}}",
- "postalCode": "{{postalCode}}",
- "city": "{{city}}",
- "country": "{{country}}"
}
}
}
}
}, - "prefillCustomer": {
- "firstName": "{{firstName}}",
- "lastName": "{{lastName}}",
- "email": "{{email}}",
- "phoneNumber": "{{internationalMobileNumber}}",
- "streetAddress": "{{streetAddress}}",
- "city": "{{city}}",
- "postalCode": "{{postalCode}}",
- "country": "{{country}}"
}, - "configuration": {
- "customerInteraction": "CUSTOMER_NOT_PRESENT",
- "elements": "Full",
- "countries": {
- "supported": [
- "NO",
- "SE",
- "DK"
]
}
}
}
Response samples
- 200
- 400
- 401
- 403
- 409
- 500
- 502
{- "token": "string",
- "checkoutFrontendUrl": "string",
- "pollingUrl": "string"
}
Callback payload samples
{- "streetAddress": "string",
- "postalCode": "string",
- "region": "string",
- "country": "string"
}
Get session info
Transaction information, user information and shipping information are included in the response if the SessionState is PaymentInitiated
path Parameters
reference required | string Default: "{{orderId}}" The reference of the session. Example: "123123". |
header Parameters
Vipps-System-Name | string Default: {{vipps_system_name}} Example: Acme Commerce |
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
- 200
- 400
- 401
- 403
- 404
- 500
- 502
{- "sessionId": "string",
- "merchantSerialNumber": "string",
- "reference": "string",
- "sessionState": "SessionCreated",
- "paymentMethod": "Wallet",
- "paymentDetails": {
- "amount": {
- "value": 0,
- "currency": "string"
}, - "state": "CREATED",
- "aggregate": {
- "cancelledAmount": {
- "value": 0,
- "currency": "string"
}, - "capturedAmount": {
- "value": 0,
- "currency": "string"
}, - "refundedAmount": {
- "value": 0,
- "currency": "string"
}, - "authorizedAmount": {
- "value": 0,
- "currency": "string"
}
}
}, - "userInfo": {
- "sub": "string",
- "email": "string"
}, - "shippingDetails": {
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phoneNumber": "string",
- "streetAddress": "string",
- "postalCode": "string",
- "city": "string",
- "country": "string",
- "shippingMethodId": "string",
- "amount": {
- "value": 0,
- "currency": "string"
}, - "pickupPoint": {
- "id": "string",
- "name": "string",
- "address": "string",
- "postalCode": "string",
- "city": "string",
- "country": "string",
- "openingHours": [
- "string"
], - "instabox": {
- "availabilityToken": "string",
- "serviceType": "string",
- "sortCode": "string"
}
}
}, - "billingDetails": {
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phoneNumber": "string",
- "streetAddress": "string",
- "postalCode": "string",
- "city": "string",
- "country": "string"
}, - "customConsentProvided": true
}