checkout.started
Once per checkout, when its form is bound and the cart has lines, or when the cart first gets lines after that; the steps of a multi-step checkout, a reload and a return from a payment gateway keep the same checkout.
next.on('checkout.started', (data, event) => {});Data
Present: always; optional when it may be missing; campaign once the campaign is loaded; priced once the server priced the cart.
| Field | Type | Present | |
|---|---|---|---|
id | string | always | One 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. |
step | number | optional | The step of a multi-step checkout (data-next-checkout-step), from 1; none on a one-page checkout. |
cart | Cart | always | The same cart cart.* events carry. |
user | User | optional | The shopper, from user.created on. |
shipping_address | Address | optional | From address.entered for the shipping address on. |
billing_same_as_shipping | boolean | optional | On a checkout page: false once the shopper asks for a separate billing address. |
billing_address | Address | optional | When billing_same_as_shipping is false, from address.entered for it on. |
payment_method | string | optional | The API's code for the chosen payment method, on a checkout page: card_token, paypal, apple_pay, … |
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.
| Field | Type | Present | |
|---|---|---|---|
lines | CartItem[] | always | Every line in the cart, the same package's lines merged. |
coupons | string[] | always | The codes the shopper applied, uppercase. A bundle card's own codes are not listed. |
currency | string | campaign | ISO 4217, such as USD. |
shipping_method | ShippingMethod | optional | The selected shipping method, and what shipping costs. |
subtotal | number | priced | The products before discounts, without shipping. |
total_discount | number | priced | The discounts on the products, without shipping's: the sum of discounts. |
total | number | priced | What the shopper pays. |
discounts | Discount[] | priced | The discounts on the products, one per offer. |
discount_percentage | number | priced | total_discount ÷ subtotal × 100, to two decimals; 0 without a discount. |
quantity | number | always | Units in the cart: each line's quantity. |
User
The shopper, as the store's user on the Open Cart and the order.
| Field | Type | Present | |
|---|---|---|---|
email | string | optional | As typed, trimmed; none when data-trigger-on created the user without one. |
first_name | string | always | |
last_name | string | always | |
phone | string | optional | In E.164 once the address service read it, else the digits typed. |
accepts_marketing | boolean | always | The marketing checkbox, as sent with the Open Cart and the order. |
language | string | always | The language the store keeps for the shopper, such as en. |
ip | string | optional | The 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_agent | string | always | As 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.
| Field | Type | Present | |
|---|---|---|---|
first_name | string | always | |
last_name | string | always | |
line1 | string | always | |
line2 | string | optional | |
city | string | optional | None in a country whose addresses have no city, such as Singapore. |
state | string | optional | The state or province code, in a country that has them. |
postcode | string | optional | |
country | string | always | ISO 3166-1 alpha-2. |
phone | string | optional | In E.164 once the address service read it, else the digits typed. |
CartItem
A line of the cart. Its prices are there once the server priced the cart.
| Field | Type | Present | |
|---|---|---|---|
package_id | number | always | The package's ref_id in the campaign. |
quantity | number | always | Package quantity. |
is_upsell | boolean | optional | true for a line added after the order. |
properties | Record<string, string> | optional | Line properties, such as a variant picked in a bundle slot. |
product_id | number | campaign | The product in the store. |
product_title | string | campaign | The product's name as customers see it, as on an order line; the package's name for a package without one. |
variant_id | number | campaign | The product variant, for a product with variants. |
variant_title | string | campaign | The variant's name, such as Black / M, for a product with variants. |
sku | string | campaign | The product's Stock Keeping Unit. |
image | string | campaign | The package's image URL. |
price | number | priced | What one package costs after discounts. |
original_price | number | priced | What one package costs before discounts; equal to price when nothing is taken off. |
total_discount | number | priced | The discount on the line. |
total | number | priced | price × quantity. |
subtotal | number | priced | The line before discounts: total = subtotal − total_discount. |
discount_percentage | number | priced | total_discount ÷ subtotal × 100, to two decimals; 0 without a discount. |
discounts | Discount[] | priced | The discounts on the line. |
subscription | Subscription | campaign | For a package billed again every interval. |
ShippingMethod
The selected shipping method, and what shipping costs.
| Field | Type | Present | |
|---|---|---|---|
id | number | always | The method's ref_id. |
code | string | campaign | Such as standard. |
name | string | priced | The method's name. |
price | number | priced | What shipping costs after discounts; 0 is free shipping. |
original_price | number | priced | What shipping costs before discounts. |
discounts | Discount[] | priced | The 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.
| Field | Type | Present | |
|---|---|---|---|
name | string | always | The offer's name. |
amount | number | always | The amount taken off. |
source | "offer" | "coupon" | always | coupon for a code the shopper entered (it is in coupons); offer for an automatic offer or a bundle card's own code. |
code | string | optional | The code, for a coupon. |
offer_id | number | always | The offer that gave it. |
percentage | number | optional | The 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. |
Subscription
A package billed again every interval.
| Field | Type | Present | |
|---|---|---|---|
interval | "day" | "month" | always | The unit of the renewal interval. |
interval_count | number | always | How many intervals between renewals. |
price | number | priced | What each renewal charges, after discounts. |
original_price | number | priced | What each renewal charges before discounts. |
Example
The second argument, with data inside. See Events for the envelope's fields.
{
"event_id": "3f2b8c1d9e7a4b6c8d5e2f1a0b9c8d7e",
"event_type": "checkout.started",
"object": "checkout",
"data": {
"id": "4f1d2c8e9a7b6c5d4e3f2a1b0c9d8e7f",
"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"
},
"billing_same_as_shipping": true,
"payment_method": "card_token"
},
"created_at": "2026-11-04T08:30:00.000Z",
"session_id": "0b8f3c2d1e4a4f6b9c7d5e3f2a1b0c9d",
"sdk_version": "0.5.0"
}