Cart Data Reference

Cart events contain key transactional moments in an online purchasing process. The payload contains information including the customer, product, price, and subscription.

Payload

The payload below is a representation of a Cart trigger.

The payload is based on a cart.checkout status, but it is relevant for all Cart trigger statuses. See the Workflow Events/Triggers article for a full list of available events.

{
    "_id": "cart_id",
    "organization": "your_org",
    "lineItems": [
        {
            "id": "item_id",
            "listPrice": 999,
            "name": "Health Boost Plan 90-Day",
            "description": "A three-month starter plan for new users, offering a discounted rate for the initial commitment period. Standard monthly pricing applies after the third month.",
            "price": 599,
            "quantity": 1,
            "optionId": null,
            "optionLabel": null,
            "optionType": null,
            "productId": "product_id",
            "contradictingProducts": [],
            "url": null,
            "isSubscription": true,
            "subscriptionPhases": [
                {
                    "price": 599,
                    "cycles": "1",
                    "requirements": [
                        {
                            "type": "qnr",
                            "key": "intake_form"
                        },
                        {
                            "type": "qnr",
                            "key": "health_history"
                        },
                        {
                            "type": "qnr",
                            "key": "photo_id"
                        },
                        {
                            "type": "qnr",
                            "key": "selfie_photo"
                        },
                        {
                            "type": "qnr",
                            "key": "consent_telehealth"
                        }
                    ],
                    "fillingCycleInterval": 4,
                    "fillingCycleUnit": "week",
                    "billableCycleInterval": 1
                },
                {
                    "price": 0,
                    "cycles": "2",
                    "requirements": [
                        {
                            "type": "qnr",
                            "key": "monthly_checkin"
                        },
                        {
                            "type": "qnr",
                            "key": "progress_photo"
                        }
                    ],
                    "fillingCycleInterval": 4,
                    "fillingCycleUnit": "week",
                    "billableCycleInterval": 1
                },
                {
                    "price": 299,
                    "cycles": 0,
                    "requirements": [
                        {
                            "type": "qnr",
                            "key": "monthly_checkin"
                        },
                        {
                            "type": "qnr",
                            "key": "progress_photo"
                        }
                    ],
                    "fillingCycleInterval": 4,
                    "fillingCycleUnit": "week",
                    "billableCycleInterval": 1
                }
            ],
            "extras": {
                "Note": "Pharmacies were set to 'PENDING' to prevent automatic order fulfillment.",
                "pharmacies": {
                    "PharmacyA": "PENDING",
                    "PharmacyB": "PENDING"
                },
                "bigcommerceId": null,
                "stripePriceId": null,
                "includeInjectionKit": [
                    "StarterKit"
                ]
            },
            "type": "physical",
            "options": [],
            "relatedProducts": [],
            "subLabel": "$599/3mo, renews $299/mo",
            "categories": [
                "78715b7ca01a82fa653bf47f",
                "78717f893738e5736a648c74"
            ]
        }
    ],
    "paymentIntentId": null,
    "createdAt": "2024-06-25T11:45:10.550Z",
    "updatedAt": "2024-06-25T11:45:10.550Z",
    "__v": 0,
    "baseAmount": 999,
    "subTotalAmount": 599,
    "totalAmount": 599,
    "discountAmount": 0,
    "postPurchaseCredit": 0,
    "customer": {
        "_id": "customer_id",
        "email": "janedoe@email.com",
        "phone": "+15551234567",
        "firstName": "Jane",
        "lastName": "Doe"
    }
}

Parameter Descriptions

The table below describes the parameters of the payload.

Parameter

Type

Description

_id

string

The unique identifier for the cart.

organization

string

The organization associated with the order.

lineItems

array

A list of products included in the order.

lineItems.id

string

The unique ID of the line item.

lineItems.listPrice

number

The original, unsubsidized price of the item.

lineItems.name

string

The name of the product.

lineItems.description

string

A detailed description of the product.

lineItems.price

number

The actual price of the item.

lineItems.quantity

number

The number of units of the item.

lineItems.optionId

string or null

The ID for a specific product option, if applicable.

lineItems.optionLabel

string or null

The label for a specific product option, if applicable.

lineItems.optionType

string or null

The type of product option, if applicable.

lineItems.productId

string

The unique ID of the product.

lineItems.contradictingProducts

array

A list of products that cannot be purchased with this item.

lineItems.url

string or null

A URL related to the product.

lineItems.isSubscription

boolean

Indicates if the product is a subscription.

lineItems.subscriptionPhases

array

An array of objects defining the pricing and requirements for different subscription phases.

lineItems.subscriptionPhases.price

number

The price for a specific subscription phase.

lineItems.subscriptionPhases.cycles

string

The number of billing cycles for this phase.

lineItems.subscriptionPhases.requirements

array

An array of requirements (e.g., questionnaires) needed for this phase.

lineItems.subscriptionPhases.requirements.type

string

The type of requirement (e.g., "qnr" for questionnaire).

lineItems.subscriptionPhases.requirements.key

string

The specific key for the requirement.

lineItems.subscriptionPhases.fillingCycleInterval

number

The interval for filling the order.

lineItems.subscriptionPhases.fillingCycleUnit

string

The unit for the filling cycle interval (e.g., "week").

lineItems.subscriptionPhases.billableCycleInterval

number

The billing interval.

lineItems.extras

object

An object for miscellaneous extra information.

lineItems.extras.Note

string

A note regarding the order.

lineItems.extras.pharmacies

object

An object containing pharmacy details.

lineItems.extras.bigcommerceId

string or null

BigCommerce product ID.

lineItems.extras.stripePriceId

string or null

Stripe price ID.

lineItems.extras.includeInjectionKit

array

Include injection kit per Pharmacy

lineItems.type

string

The type of product (e.g., "physical").

lineItems.options

array

A list of product options.

lineItems.relatedProducts

array

A list of related products.

lineItems.subLabel

string

A brief label describing the product.

lineItems.categories

array

A list of category IDs the product belongs to.

paymentIntentId

string or null

The payment intent ID from the payment processor.

createdAt

string

The timestamp when the order was created.

updatedAt

string

The timestamp when the order was last updated.

__v

number

The document version number.

baseAmount

number

The total cost of items before any discounts.

subTotalAmount

number

The subtotal of the order, typically after discounts but before tax or shipping.

totalAmount

number

The final total amount of the order.

discountAmount

number

The total discount applied to the order.

postPurchaseCredit

number

Any credit applied after the purchase.

customer

object

An object containing the customer's personal information.

customer._id

string

The unique ID of the customer.

customer.email

string

The customer's email address.

customer.phone

string

The customer's phone number.

customer.firstName

string

The customer's first name.

customer.lastName

string

The customer's last name.