Addons
How to set-up and utilize addons in your checkout
Addons can be used to offer additional services or products to your customers during the checkout process, or when you want to collect extra information from the customer. Common examples include:
- Giving the customer an option to pay a small fee for express handling
- Requiring a customer to provide a door code for certain home deliveries
- Option to add a greeting card or gift wrapping to the order
Using addons
The use of addons depends on whether you are using the Checkout API or one of the Checkout Integrations. With the Checkout API, flexibility is much higher. For integrations such as Klarna/Kustom, Skrym can only use the addons that are predefined by the checkout provider. However, this list is quite extensive.
Addons with Checkout API
To set up addons, you need to configure them in Scope. This can be done from Settings > Checkout in Scope.
Once these are configured, you can add them to Checkout Tactics, with additional configuration for price and currency.
In the response to the checkout API, your shipping options will then include these addons for options where you have configured them:
{"session_id": "1234","transportMethods" : [{"nodeConfig":{"customParameters":{"freefreightlimit":699},"addons": [{"checkoutAddonId":"<UUID>","key":"express","price":69900,"currency":"SEK","dataType":"BOOLEAN",}]}}]}
When the customer then proceeds to the payment stage and you call the Reservation API, you need to specify any addons the customer has selected, with the corresponding user input. Any addons that were not selected should not be sent in.
These should be passed in the following format:
{"addons": [{"checkoutAddonId": "<UUID>","key": "express","price": 69900,"currency": "SEK","dataType": "BOOLEAN","userValue": null}]}
{"addons": [{"checkoutAddonId": "<UUID>","key": "other","price": 29900,"currency": "SEK","dataType": "STRING","userValue": "Hello world"}]}
{"addons": [{"checkoutAddonId": "<UUID>","key": "other","price": 29900,"currency": "SEK","dataType": "NUMBER","userValue": "1903" // Note: provide number as a string}]}
Note that the userValue
field only needs to be provided for addons that are of type STRING
or NUMBER
.
Any BOOLEAN
addons passed will always be assumed selected.
Addons with Klarna/Kustom
To use addons with Klarna/Kustom, you can set these up directly in your Checkout Tactics. This will then render the addons in the Klarna/Kustom checkout.