sdk.ready

Once a page, when the campaign is in: at once from a copy saved in the last 10 minutes, else when the API answers. ready is the same event. Carries what the page shows then.

CODE
next.on('sdk.ready', (data, event) => {});

Data

Present: always; optional when it may be missing; campaign once the campaign is loaded; priced once the server priced the cart.

FieldTypePresent
campaignEventCampaignoptionalOnce the campaign has loaded.
cartCartalways
checkoutCheckoutoptionalOn a checkout page, once the form is bound.
orderOrderoptionalOn a page that loaded an order.
selectorsSelector[]alwaysEvery bundle and offer selector on the page; toggles are in the cart.

EventCampaign

The campaign the page runs, on every event once it has loaded.

FieldType
idnumberThe campaign's id in the Campaigns API and the dashboard.
namestring
currencystringThe currency the page shows: the campaign's, or the one ?currency= asked for.
languagestringThe campaign's language code, like en.

Cart

The cart every cart.* event carries. Prices are numbers in currency, there once the server priced these lines: total = subtotal − total_discount + shipping_method.price.

FieldTypePresent
linesCartItem[]alwaysEvery line in the cart, the same package's lines merged.
couponsstring[]alwaysThe codes the shopper applied, uppercase. A bundle card's own codes are not listed.
currencystringcampaignISO 4217, such as USD.
shipping_methodShippingMethodoptionalThe selected shipping method, and what shipping costs.
subtotalnumberpricedThe products before discounts, without shipping.
total_discountnumberpricedThe discounts on the products, without shipping's: the sum of discounts.
totalnumberpricedWhat the shopper pays.
discountsDiscount[]pricedThe discounts on the products, one per offer.
discount_percentagenumberpricedtotal_discount ÷ subtotal × 100, to two decimals; 0 without a discount.
quantitynumberalwaysUnits in the cart: each line's quantity.

Checkout

The cart and what the shopper has entered so far, the same on every checkout event.

FieldTypePresent
idstringalwaysOne checkout in this tab, the same across its steps, reloads and a return from a payment gateway; a new one after an order is paid. Empty until checkout.started.
stepnumberoptionalThe step of a multi-step checkout (data-next-checkout-step), from 1; none on a one-page checkout.
cartCartalwaysThe same cart cart.* events carry.
userUseroptionalThe shopper, from user.created on.
shipping_addressAddressoptionalFrom address.entered for the shipping address on.
billing_same_as_shippingbooleanoptionalOn a checkout page: false once the shopper asks for a separate billing address.
billing_addressAddressoptionalWhen billing_same_as_shipping is false, from address.entered for it on.
payment_methodstringoptionalThe API's code for the chosen payment method, on a checkout page: card_token, paypal, apple_pay, …

Order

An order the store created, the same on every order.* event. Prices are numbers in currency.

FieldTypePresent
ref_idstringalwaysThe order's reference: ref_id in post-purchase page URLs.
numberstringoptionalThe order number customers see.
currencystringoptionalISO 4217, such as USD.
testbooleanalwaystrue for a test order.
paidbooleanalwaystrue once the order is paid; false while the shopper pays at a gateway.
linesOrderItem[]always
couponsstring[]alwaysThe codes the shopper applied at checkout in this tab, uppercase.
total_discountnumberalwaysThe discounts on the order.
shipping_methodPick<ShippingMethod, "name" | "price"> & { tax?: number }optionalThe shipping method's name, its price, and the tax in that price.
taxnumberalwaysThe tax in the order: its lines' and shipping's.
totalnumberalwaysWhat the shopper paid.
userPick<User, "first_name" | "last_name" | "email" | "phone">optional
shipping_addressAddressoptional
billing_addressAddressoptional
payment_methodstringoptionalThe API's code for the payment method, such as card_token or paypal.
supports_upsellsbooleanalwaystrue when upsells can be added to the order.
status_urlstringoptionalThe order's status page on the store.

Selector

A selector and the option picked in it, the same on every selector.* event.

FieldTypePresent
pricenumberpricedtotal ÷ quantity: one package, after discounts.
original_pricenumberpricedsubtotal ÷ quantity: one package, before discounts.
subtotalnumberpricedWhat it costs before discounts.
total_discountnumberpricedsubtotal − total.
discount_percentagenumberpricedtotal_discount ÷ subtotal × 100, to two decimals.
selector_idstringalwaysdata-next-selector-id, or toggle:<package_id> for a toggle.
type"bundle" | "offer" | "toggle"always
option_idstringoptionalThe picked option's data-next-bundle-id; none for a toggle.
linesCartItem[]alwaysThe lines the picked option puts in the cart, at its quantity; the toggle's line for a toggle. Priced once the option has a price.
currencystringcampaignISO 4217, such as USD.
totalnumberpricedWhat the picked option costs after discounts.
quantitynumberalwaysPackages the picked option adds.
in_cartbooleanalwaystrue while the picked option's lines are in the cart.
optionsSelectorOption[]optionalEvery option of a bundle or offer selector; none for a toggle.

CartItem

A line of the cart. Its prices are there once the server priced the cart.

FieldTypePresent
package_idnumberalwaysThe package's ref_id in the campaign.
quantitynumberalwaysPackage quantity.
is_upsellbooleanoptionaltrue for a line added after the order.
propertiesRecord<string, string>optionalLine properties, such as a variant picked in a bundle slot.
product_idnumbercampaignThe product in the store.
product_titlestringcampaignThe product's name as customers see it, as on an order line; the package's name for a package without one.
variant_idnumbercampaignThe product variant, for a product with variants.
variant_titlestringcampaignThe variant's name, such as Black / M, for a product with variants.
skustringcampaignThe product's Stock Keeping Unit.
imagestringcampaignThe package's image URL.
pricenumberpricedWhat one package costs after discounts.
original_pricenumberpricedWhat one package costs before discounts; equal to price when nothing is taken off.
total_discountnumberpricedThe discount on the line.
totalnumberpricedprice × quantity.
subtotalnumberpricedThe line before discounts: total = subtotal − total_discount.
discount_percentagenumberpricedtotal_discount ÷ subtotal × 100, to two decimals; 0 without a discount.
discountsDiscount[]pricedThe discounts on the line.
subscriptionSubscriptioncampaignFor a package billed again every interval.

ShippingMethod

The selected shipping method, and what shipping costs.

FieldTypePresent
idnumberalwaysThe method's ref_id.
codestringcampaignSuch as standard.
namestringpricedThe method's name.
pricenumberpricedWhat shipping costs after discounts; 0 is free shipping.
original_pricenumberpricedWhat shipping costs before discounts.
discountsDiscount[]pricedThe discounts on shipping, such as a free-shipping offer.

Discount

A discount on the cart's products or on its shipping. Amounts are in the cart's currency.

FieldTypePresent
namestringalwaysThe offer's name.
amountnumberalwaysThe amount taken off.
source"offer" | "coupon"alwayscoupon for a code the shopper entered (it is in coupons); offer for an automatic offer or a bundle card's own code.
codestringoptionalThe code, for a coupon.
offer_idnumberalwaysThe offer that gave it.
percentagenumberoptionalThe percentage the offer is set to take off, as the API reports it, such as 20. Its configured value, for a label such as “20% off”; the amount actually taken off is amount.

User

The shopper, as the store's user on the Open Cart and the order.

FieldTypePresent
emailstringoptionalAs typed, trimmed; none when data-trigger-on created the user without one.
first_namestringalways
last_namestringalways
phonestringoptionalIn E.164 once the address service read it, else the digits typed.
accepts_marketingbooleanalwaysThe marketing checkbox, as sent with the Open Cart and the order.
languagestringalwaysThe language the store keeps for the shopper, such as en.
ipstringoptionalThe shopper's IP address, as the store recorded it with the Open Cart, else as the address service saw it; none when neither knows it.
user_agentstringalwaysAs the store recorded it with the Open Cart, else the browser's.

Address

A postal address as the shopper entered it, once every field its country requires is valid.

FieldTypePresent
first_namestringalways
last_namestringalways
line1stringalways
line2stringoptional
citystringoptionalNone in a country whose addresses have no city, such as Singapore.
statestringoptionalThe state or province code, in a country that has them.
postcodestringoptional
countrystringalwaysISO 3166-1 alpha-2.
phonestringoptionalIn E.164 once the address service read it, else the digits typed.

OrderItem

One line of an order. Prices are numbers in the order's currency, as the shopper paid them.

FieldTypePresent
idstringalwaysThe order line's id.
product_idnumberoptionalThe product in the store.
product_titlestringalwaysThe product's name as customers see it.
variant_idnumberoptionalThe product variant.
variant_titlestringoptionalThe variant's name, such as Black / M.
skustringoptionalThe product's Stock Keeping Unit.
imagestringoptional
quantitynumberalways
pricenumberalwaysWhat one unit cost after discounts.
original_pricenumberalwaysWhat one unit cost before discounts.
totalnumberalwaysWhat the line cost; price is total / quantity, rounded to the cent.
taxnumberalwaysThe tax in total; the line before tax is total − tax.
upsellbooleanalwaystrue for a line an upsell added.

SelectorOption

One option of a selector, at the quantity it would be added.

FieldTypePresent
pricenumberpricedtotal ÷ quantity: one package, after discounts.
original_pricenumberpricedsubtotal ÷ quantity: one package, before discounts.
subtotalnumberpricedWhat it costs before discounts.
total_discountnumberpricedsubtotal − total.
discount_percentagenumberpricedtotal_discount ÷ subtotal × 100, to two decimals.
option_idstringalwaysThe option's data-next-bundle-id, or data-next-option.
linesCartItem[]alwaysThe lines the option puts in the cart. Priced once the option has a price.
quantitynumberalwaysPackages the option adds: its lines' quantities.
selectedbooleanalwaystrue for the selector's picked option.
totalnumberpricedWhat the option costs after discounts.
original_totalnumberpricedWhat the option costs before discounts.

Subscription

A package billed again every interval.

FieldTypePresent
interval"day" | "month"alwaysThe unit of the renewal interval.
interval_countnumberalwaysHow many intervals between renewals.
pricenumberpricedWhat each renewal charges, after discounts.
original_pricenumberpricedWhat each renewal charges before discounts.

Example

The second argument, with data inside. See Events for the envelope's fields.

CODE
{
  "event_id": "3f2b8c1d9e7a4b6c8d5e2f1a0b9c8d7e",
  "event_type": "sdk.ready",
  "object": "sdk",
  "data": {
    "campaign": {
      "id": 1310,
      "name": "Olympus",
      "currency": "USD",
      "language": "en"
    },
    "cart": {
      "lines": [
        {
          "package_id": 1,
          "quantity": 1,
          "product_id": 400,
          "product_title": "Olympus Earbuds",
          "variant_id": 4001,
          "variant_title": "Black",
          "image": "https://cdn.test/1.png"
        }
      ],
      "coupons": [],
      "quantity": 1,
      "currency": "USD"
    },
    "selectors": []
  },
  "created_at": "2026-11-04T08:30:00.000Z",
  "session_id": "0b8f3c2d1e4a4f6b9c7d5e3f2a1b0c9d",
  "sdk_version": "0.5.0"
}