How the Checkout API works for shipping
The Checkout API supports most major shipping providers in the Nordic market, including:
- Bring/Posten
- Postnord
- Porterbuddy
- Helthjem
- Posti
- GLS
- DAO
A provider is chosen by setting the brand
property to one of the allowed string values. Consult the API spec for further details. This will set the logo and name of the provider.
If none of the providers fit your use case (e.g., indicating in-store-pickup), set the brand
to "OTHER" for generic shipping.
Delivery Information
It is possible and recommended to specify details regarding delivery for a shipping option should this be available. This is done by specifying the Delivery
property. Here one may specify pickup points, timeslots for home delivery, or estimated delivery (lead time). Only one of the top-level properties Timeslots
, Pickup Points
or Lead Time
within Delivery
should be specified at a time, depending on what data is available and what granularity is desired.
Lead Time
Lead Time
gives an estimation on when the order will be delivered. It is given as a range of dates, e.g. 2025-06-01, 2025-06-03
. The first date is the earliest possible delivery date, and the second date is the latest possible delivery date. The format is ISO 8601 (yyyy-MM-dd)
.
Pickup Points
A list of PickupPoint
. These define where the order can be picked up (such as a store). This is ideal for shipping options which are delivered to a parcel pickup point, and where the user may select what particular location they prefer. The user will select one of these and we will relay the selected option as part of the content in the "session completed callback"
and GET
session endpoint.
Each PickupPoint
may also have a LeadTime
property in the same format as explained above. This indicates the estimated delivery time to the pickup point.
For more details on how to set up pickup points, refer to the API spec.
Timeslots
Timeslots is a list of dates and a time range within said date for when the order can be delivered. The user will select one of these and we will relay the selected option as part of the content in the "session completed callback"
and GET
session endpoint.
This is ideal for home delivery where the user may select when they are home and wish for the order to be delivered.
Refer to the API spec to see more details about this property.
Enriching features
Should the delivery details not be available to you, we do offer enriching features for some of our providers, including:
- Pickup point
These features change the user interface to allow for more specific selection of delivery time or place.
An enriching feature can be chosen by setting the type
property on the logistics option. ** Note, this only have an effect if the Delivery
property is not set.
Refer to the API spec to see which features are available for each shipping provider.
- Vipps
- MobilePay
Pickup point enrichment
The pickup point enriching feature is enabled by setting type: "PICKUP_POINT"
(Note, this will only be resolved if Delivery
is not set. The title will become {providerName} pick-up point
(e.g. "Posten pick-up point").
The consumer will choose an available pickup point, based on the address. We will relay the selected option as part of the content in the "session completed callback" and GET session endpoint.
Pricing
A friendly reminder: The complete checkout amount, including shipping, cannot be free (i.e. 0). If the shipping is free, the transaction amount must be a minimum of 1 NOK/1 DKK/0.1 EUR. If the transaction amount is free, shipping options must be 1 NOK or more.
If you're using Porterbuddy, the amount
property is optional. If not provided, the amount will be calculated by Porterbuddy through dynamic pricing. You can adjust this in the Porterbuddy dashboard at porterbuddy.com.
When to provide shipping options
Shipping options can be provided by the merchant either at session initiation or at a later stage.
If you want to charge a flat rate for shipping you pass shipping options to the logistics.fixedOptions
property at session initiation.
If you want to dynamically determine the price of a shipping option based on the address of the customer you need to have an endpoint for receiving callbacks. Pass the URL to the logistics.dynamicOptionsCallback
property. Checkout will call the endpoint with the address of the customer whenever they submit or update their address during a checkout session. The endpoint must return shipping options on the same format as for fixedOptions
.
Please note: 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.