Skip to content

Upsell callback reference

Implement the Kustom Checkout upsell callback with upsell_request, upsell_service_response and upsell_line fields, limits and widget eligibility rules.

Kustom calls merchant_urls.upsell before confirmation loads and after each added item. Return product recommendations within 10 seconds; calls aren’t retried. Aim for under three seconds to limit the customer’s wait.

Portal-curated products for the order take precedence over your endpoint. See Add confirmation page upsells for setup and order handling.

FieldTypeMeaning
upsell_possiblebooleanfalse when the payment method can’t support upsell. You’re still called
max_upsell_amountintegerAuthorization headroom in minor units: the original order total (at least 100 SEK, NOK or DKK, or 10 EUR or GBP), minus what has already been upsold. 0 when the payment method doesn’t support upsell. Pre-filter against it
order_linesarrayWhat the customer has already bought
selected_shipping_optionobjectTheir chosen delivery. Present whenever the order has one selected — from its own shipping_options or from the Shipping Assistant
billing_addressobjectFor tax and locale-aware filtering
shipping_addressobjectAs above
purchase_currencystringISO 4217
localestringBCP 47, such as en-SE
merchant_idstringYour merchant ID
session_idstringThe order identifier. Map it to your own order
FieldTypeRequiredMeaning
upsell_linesarrayYesProducts to display. Empty means no widget — return [] to signal “no recommendations”
last_upsell_timestringNoISO 8601 moment the widget stops accepting additions. Falls back to the account-level window. Doesn’t move the confirmation push, which always waits for the account-level window
notification_uristringNoWhere Kustom pushes when the order is updated with upsell items, used only when merchant_urls.upsell_notification isn’t set — useful as a re-read trigger if you create on redirect

Required:

FieldTypeMeaning
namestringProduct name, max 255 characters
quantityintegerThe quantity you’re offering, not the customer’s choice
unit_priceintegerMinor units, tax included
tax_rateintegerTwo implicit decimals — 2500 is 25%
total_amountintegerMinor units, tax and discount included. Must equal quantity × unit_price − total_discount_amount
total_tax_amountintegerMinor units
max_allowed_quantityintegerThe most the customer may add

Recommended fields. Without image_url, the product card has no picture:

FieldMeaning
referenceYour SKU
image_urlCard image, max 1024 characters
product_urlProduct page, max 1024 characters
descriptionMax 1024 characters
product_identifiersGTIN, ISBN and similar
shipping_attributesWeight, dimensions and tags, for shipping compatibility
feedback_urlCalled when a customer adds this item — an item-level signal

Set quantity to the default offer, usually 1, and use max_allowed_quantity to limit additions. Supply correct totals; Kustom recalculates them and checks the authorization whenever an item is added.

{
"shipping_attributes": {
"weight": 500,
"dimensions": { "width": 100, "height": 150, "length": 200 },
"tags": ["standard", "non-fragile"]
}
}

The widget requires upsell enabled on the order, a payment method that supports increased authorization and recommendations within the available amount. Kustom checks payment method eligibility.

For an unsupported payment method, upsell_possible is false, max_upsell_amount is 0, no widget appears and the push isn’t delayed. With no recommendations, no widget appears, but the push still waits for the full upsell window.

This page is also available as Markdown — append .md to its URL — and is indexed in llms.txt.