This page describes server-side callbacks available with Kustom Checkout (KCO).
These callbacks allow merchants to update order details during the checkout process, for example, when a customer changes their address or the order needs validation.
If you include the address_update URL in the merchant_urls object when creating the order, a POST request will be sent to this URL when the customer updates their shipping address.
"merchant_urls": {
"terms": "https://merchant.com/toc",
"checkout": "https://merchant.com/checkout?kustom_order_id={checkout.order.id}",
"confirmation": "https://merchant.com/confirmation?kustom_order_id={checkout.order.id}",
"push": "https://merchant.com/push?kustom_order_id={checkout.order.id}",
"address_update": "https://merchant.com/address_update?kustom_order_id={checkout.order.id}"
}This callback can be used to update tax and shipping costs, and shipping options.
"merchant_urls": {
"terms": "https://merchant.com/toc",
"checkout": "https://merchant.com/checkout?kustom_order_id={checkout.order.id}",
"confirmation": "https://merchant.com/confirmation?kustom_order_id={checkout.order.id}",
"push": "https://merchant.com/push?kustom_order_id={checkout.order.id}",
"country_change": "https://merchant.com/country_change?kustom_order_id={checkout.order.id}"
}The shipping_option_update callback is used to adjust the order total based on the selected shipping option, updating both the total_amount and order_lines.
"merchant_urls": {
"terms": "https://merchant.com/toc",
"checkout": "https://merchant.com/checkout?kustom_order_id={checkout.order.id}",
"confirmation": "https://merchant.com/confirmation?kustom_order_id={checkout.order.id}",
"push": "https://merchant.com/push?kustom_order_id={checkout.order.id}",
"shipping_option_update": "https://merchant.com/shipping_option_update?kustom_order_id={checkout.order.id}"
}This is only relevant if the shipping selector is within KCO. Otherwise, KCO automatically handles shipping cost updates.
The validation callback allows you to perform final order validation before purchase completion. See the validate order page for more details.