Subscribe to what the widget does: the cart changes, the panel opens, a customer signs in, a purchase completes.
Every handler takes two arguments: an error slot first, then the payload. The
widget passes null as the error today, so read the second argument. Payloads
are deep-cloned before they are emitted, so a handler cannot change the widget
state through them. CART_READY is the exception: it carries the live cart
object.
subblyCart.events.on(type, handler)
Subscribes to a widget event. once adds a handler for one emission;
addListener is an alias of on.
Method parameters
typeRequiredstring
Name of the event. Use subblyCart.events.type.CART_UPDATED and the other
names below.
The widget finished initializing and the cart is loaded. It fires once, inside
initialize(), before that promise resolves with the instance. So no page code
can subscribe in time: neither a listener added after the
subbly-cart-initialized window event, nor one added after
SubblyCart.initialize() resolves with init: false. To act on the loaded
cart, wait for subbly-cart-initialized and read subblyCart.cart.
This is the one payload the widget does not clone: it is the live cart object.
A new cart replaced the old one, after resetCart() or after an attempt to add
to a cart that was already purchased. CART_UPDATED comes first: the widget
stores the new cart before it emits this event.
The customer's email was captured. It fires when a guest's email is checked at
the checkout, and when the checkout form opens for a customer who is already
signed in.
A purchase succeeded. Which members of purchase are filled depends on the
cart: a future-dated subscription returns the subscription alone, and a cart of
one-time products returns an invoice and orders with no subscription.
Handler arguments
errError | null
Always null.
dataobject
The cart that was bought, and what the purchase created.
subblyCart.signOut() ran. It carries no payload, and the cart stays as it
is. No control in the widget emits this event, and neither does
subblyCart.reload(), which also clears the sign-in state.
Where the order ships, or the pickup point the customer chose.
shippingAddressIdnumber | null
ID of the shipping address or of the pickup record.
billingAddressCustomerAddress | null
Billing address. Same fields as a delivery address.
billingAddressIdnumber | null
ID of the billing address.
shippingMethodShippingMethod | null
The chosen shipping method.
shippingMethodIdnumber | null
ID of the shipping method.
shippingCarrierShippingCarrier | null
The carrier that delivers the order. Holds id, name and serviceCodes.
shippingCarrierIdnumber | null
ID of the carrier.
shippingCarrierServicestring | null
Service code of the carrier, such as an express service.
paymentMethodPaymentMethod | null
The saved payment method on the cart. Only present for a signed-in customer.
paymentMethodIdnumber | null
ID of the payment method.
metadataMetafield[] | null
Metafields stored on the cart.
createdAtstring
Creation date, as an ISO 8601 string.
updatedAtstring
Last change date, as an ISO 8601 string.
cartSubblyCart
The cart at the moment of the purchase.
purchaseCheckoutPurchaseResponse
What the purchase created.
invoicePurchaseInvoice | null
The invoice for today's payment. null when the cart takes no payment
today, such as a future-dated subscription.
subscriptionSubscription | null
The subscription the purchase started. null for a cart of one-time
products.
ordersPurchaseOrder[] | null
The orders the purchase created. null, never an empty array, when there
are none.
customerSubblyCustomer
The customer who signed in.
idnumber
ID of the customer.
userIdnumber
ID of the user account behind the customer.
emailstring
Email address.
firstNamestring
First name.
lastNamestring
Last name.
marketingConsentboolean
true when the customer opted into marketing.
tosConsentAtstring
Date the customer accepted the terms, as an ISO 8601 string.
externalIdstring | null
Your own ID for the customer.
activeSubscriptionsCountnumber
How many subscriptions the customer runs.
createdAtstring
Creation date, as an ISO 8601 string.
customerSubblyCustomer
The customer who signed up.
idnumber
ID of the customer.
userIdnumber
ID of the user account behind the customer.
emailstring
Email address.
firstNamestring
First name.
lastNamestring
Last name.
marketingConsentboolean
true when the customer opted into marketing.
tosConsentAtstring
Date the customer accepted the terms, as an ISO 8601 string.
externalIdstring | null
Your own ID for the customer.
activeSubscriptionsCountnumber
How many subscriptions the customer runs.
createdAtstring
Creation date, as an ISO 8601 string.
idstring
ID of the line, as a UUID. Pass it to updateItem and removeItem.
typestring
one_time or subscription.
productIdnumber
ID of the variant on a one-time item, or of the plan on a subscription.
statusstring
active, unavailable or out_of_stock.
productProductVariant | ProductPlan | null
The variant or plan the line points at. The widget always expands it.
productNamestring
Name of the product, as it is shown in the cart.
descriptionstring
Line description, such as the plan name.
quantitynumber
How many units the line holds.
addonboolean
true when the line is an add-on to a subscription in the same cart.
addonDurationnumber | null
How long the add-on runs. null is forever, 1 is once.
amountOffnumber | null
Fixed discount on the line, in the minor unit.
percentOffnumber | null
Percentage discount on the line.
giftCardobject
Gift card recipient. Always an object; the members are null when the
line is not a gift card.
bundleobject
Contents of the bundle. items is empty when the line is not a bundle.
optionsSubscriptionSurvey | null
Survey answers for the line. Always null on a one-time item.
metadataMetafield[] | null
Metafields stored on the line.
originstring | null
How the line got into the cart: pre_purchase, mid_purchase,
post_purchase, coupon, or null when the customer added it.
createdAtstring
Creation date, as an ISO 8601 string.
updatedAtstring
Last change date, as an ISO 8601 string.
itemIdstring | null
ID of the cart item this amount belongs to. null on the shipping line.
typestring
one_time, subscription, trial_first, gift_card, setup_fee,
survey, shipping or addon.
productIdnumber | null
ID of the variant or plan. null on the shipping line.
quantitynumber
How many units are priced.
pricenumber | null
Unit price in the minor unit. null for a dynamic-price bundle with no
items yet.
totalnumber
Line total after discount and tax.
subTotalnumber
Line total before discount and tax.
taxAmountnumber
Tax on the line, in the minor unit.
taxRatenumber
Tax rate applied to the line.
taxInclusiveboolean
true when the price already holds the tax.
discountnumber | null
Discount on the line, in the minor unit.
discountsobject[]
Every discount on the line. Each has type, description, total and,
sometimes, chargeNow.
chargeNowboolean
true when the line is part of today's payment.
bundleobject | null
Priced bundle contents. null on setup_fee, survey and shipping
lines. Holds items, where each entry has itemId, productId,
variantId, quantity, quantityTotal, price, subTotal, total,
taxAmount, taxRate, taxInclusive, discount and discounts.
subscriptionobject | null
Schedule of a subscription line. Non-null only on subscription and
trial_first lines. Holds firstPaymentAt, nextPaymentAt,
numberOfShipments and firstShipmentAt.
typestring
coupon, coupon_gift_offer, offer, referral, balance,
gift_card or bundle.
descriptionstring
Text shown next to the discount.
totalnumber
Amount taken off, in the minor unit.
chargeNowboolean
true when the discount applies to today's payment.
idnumber
ID of the coupon.
couponIdstring
The code the customer types.
namestring
Name of the coupon.
amountOffnumber | null
Fixed discount, in the minor unit.
percentOffnumber | null
Percentage discount.
durationstring
once, forever or multiple.
durationInMonthsnumber | null
Months the discount runs, when duration is multiple.
behaviorobject
Holds skipPaymentMethodAllowed, true when the coupon lets the customer check out without a payment method.
giftobject | null
Gift offer attached to the coupon. Holds addonDuration (once or forever), amountOff and percentOff.
idnumber
ID of the gift card.
codestring
The code the customer types.
amountnumber
Face value, in the minor unit.
balancenumber
Value left, in the minor unit.
messagestring
Message written on the card.
statusstring
issued, redeemed, partially_used, used, cancelled or expired.
startsAtstring | null
Date the gift starts, as YYYY-MM-DD.
numberOfOrdersnumber | null
How many orders the gift covers.
messagestring | null
Message for the recipient.
recipientEmailstring | null
Email of the recipient.
idnull
Always null on a guest.
userIdnull
Always null on a guest.
createdAtnull
Always null on a guest.
activeSubscriptionsCountnumber
Always 0 on a guest.
firstNamestring | null
First name.
lastNamestring | null
Last name.
emailstring | null
Email address.
marketingConsentboolean | null
true when the guest opted into marketing.
tosConsentAtstring | null
Date the guest accepted the terms, as an ISO 8601 string.
externalIdstring | null
Your own ID for the customer.
idnumber
ID of the address.
firstNamestring
First name.
lastNamestring
Last name.
companyNamestring | null
Company name.
addressOnestring
Street and number.
addressTwostring | null
Second address line.
citystring
City.
zipstring
Postal code.
regionstring
Region name.
regionIdnumber | null
ID of the region.
countrystring
Country name.
countryIdnumber
ID of the country.
countryCodestring
Two-letter country code.
phonestring
Phone number.
idnumber
ID of the pickup record.
firstNamestring
First name.
lastNamestring
Last name.
phonestring
Phone number.
pickupPointobject | null
The point itself: id, externalId, address1, address2, city,
zip, countryId, countryCode, type (mondial_relay),
createdAt and updatedAt.
idnumber
ID of the method.
typestring
shipping_option, local_delivery or local_pickup.
shippingFeenumber
Fee charged today, in the minor unit.
futureShippingFeenumber
Fee on later shipments, in the minor unit.
prohibitedProductsnumber[]
IDs of products the method cannot carry.
methodobject
Details of the method. A shipping_option has duration, name and
type (flat_price, product, price, weight or dynamic); a
local_delivery has comment, duration and name; a local_pickup
holds the pickup point.
carrierShippingCarrier | null
shipping_option only. The carrier: id, name and serviceCodes.
carrierIdnumber | null
shipping_option only. ID of the carrier.
servicestring | null
shipping_option only. Carrier service code.
customsFeenumber
shipping_option only. Customs fee charged today.
futureCustomsFeenumber
shipping_option only. Customs fee on later shipments.
Card details: brand, lastFour, expiryMonth, expiryYear and type.
usBankAccountobject | null
Bank details: accountHolderType, accountType, bankName, email, last4, name and routingNumber.
acssDebitobject | null
Canadian debit details: email, name, bankName, lastFour, institutionNumber and transitNumber.
bancontactobject | null
Holds email and name.
cashappobject | null
Holds email, name, buyerId and cashTag.
idealobject | null
Holds bank, bic, email and name.
linkobject | null
Holds email and name.
sepaDebitobject | null
Holds bank_code, branch_code, country, email, ibanLast4 and name. These are the only snake_case keys in the API.
sofortobject | null
Holds country, email and name.
idnumber
ID of the stored value set.
metadataIdnumber
ID of the metafield definition.
namestring
Name of the metafield.
slugstring
Slug of the metafield.
descriptionstring | null
Description shown to the customer.
unitstring | null
Unit of the value.
accessLevelstring
private or storefront.
dataTypestring
single_line_string, multi_line_text, rich_text, integer,
decimal, datetime, date, time, volume, weight, boolean,
color, rating, url, money or json.
saveBehaviorstring
customer or subscription.
editableboolean
true when the customer can change the value.
multipleboolean
true when the metafield takes several values.
presetboolean
true when the values come from a fixed list.
variantboolean
true when the metafield varies per variant.
valuesobject[]
The stored values. Each has id, value (always a string, whatever
dataType says), valueId and metadata, an object with imageUrl
and color.
idstring
ID of the line, as a UUID. Pass it to updateItem and removeItem.
typestring
one_time or subscription.
productIdnumber
ID of the variant on a one-time item, or of the plan on a subscription.
statusstring
active, unavailable or out_of_stock.
productProductVariant | ProductPlan | null
The variant or plan the line points at. The widget always expands it.
productNamestring
Name of the product, as it is shown in the cart.
descriptionstring
Line description, such as the plan name.
quantitynumber
How many units the line holds.
addonboolean
true when the line is an add-on to a subscription in the same cart.
addonDurationnumber | null
How long the add-on runs. null is forever, 1 is once.
amountOffnumber | null
Fixed discount on the line, in the minor unit.
percentOffnumber | null
Percentage discount on the line.
giftCardobject
Gift card recipient. Always an object; the members are null when the
line is not a gift card.
bundleobject
Contents of the bundle. items is empty when the line is not a bundle.
optionsSubscriptionSurvey | null
Survey answers for the line. Always null on a one-time item.
metadataMetafield[] | null
Metafields stored on the line.
originstring | null
How the line got into the cart: pre_purchase, mid_purchase,
post_purchase, coupon, or null when the customer added it.
createdAtstring
Creation date, as an ISO 8601 string.
updatedAtstring
Last change date, as an ISO 8601 string.
itemIdstring | null
ID of the cart item this amount belongs to. null on the shipping line.
typestring
one_time, subscription, trial_first, gift_card, setup_fee,
survey, shipping or addon.
productIdnumber | null
ID of the variant or plan. null on the shipping line.
quantitynumber
How many units are priced.
pricenumber | null
Unit price in the minor unit. null for a dynamic-price bundle with no
items yet.
totalnumber
Line total after discount and tax.
subTotalnumber
Line total before discount and tax.
taxAmountnumber
Tax on the line, in the minor unit.
taxRatenumber
Tax rate applied to the line.
taxInclusiveboolean
true when the price already holds the tax.
discountnumber | null
Discount on the line, in the minor unit.
discountsobject[]
Every discount on the line. Each has type, description, total and,
sometimes, chargeNow.
chargeNowboolean
true when the line is part of today's payment.
bundleobject | null
Priced bundle contents. null on setup_fee, survey and shipping
lines. Holds items, where each entry has itemId, productId,
variantId, quantity, quantityTotal, price, subTotal, total,
taxAmount, taxRate, taxInclusive, discount and discounts.
subscriptionobject | null
Schedule of a subscription line. Non-null only on subscription and
trial_first lines. Holds firstPaymentAt, nextPaymentAt,
numberOfShipments and firstShipmentAt.
typestring
coupon, coupon_gift_offer, offer, referral, balance,
gift_card or bundle.
descriptionstring
Text shown next to the discount.
totalnumber
Amount taken off, in the minor unit.
chargeNowboolean
true when the discount applies to today's payment.
idnumber
ID of the coupon.
couponIdstring
The code the customer types.
namestring
Name of the coupon.
amountOffnumber | null
Fixed discount, in the minor unit.
percentOffnumber | null
Percentage discount.
durationstring
once, forever or multiple.
durationInMonthsnumber | null
Months the discount runs, when duration is multiple.
behaviorobject
Holds skipPaymentMethodAllowed, true when the coupon lets the customer check out without a payment method.
giftobject | null
Gift offer attached to the coupon. Holds addonDuration (once or forever), amountOff and percentOff.
idnumber
ID of the gift card.
codestring
The code the customer types.
amountnumber
Face value, in the minor unit.
balancenumber
Value left, in the minor unit.
messagestring
Message written on the card.
statusstring
issued, redeemed, partially_used, used, cancelled or expired.
startsAtstring | null
Date the gift starts, as YYYY-MM-DD.
numberOfOrdersnumber | null
How many orders the gift covers.
messagestring | null
Message for the recipient.
recipientEmailstring | null
Email of the recipient.
idnull
Always null on a guest.
userIdnull
Always null on a guest.
createdAtnull
Always null on a guest.
activeSubscriptionsCountnumber
Always 0 on a guest.
firstNamestring | null
First name.
lastNamestring | null
Last name.
emailstring | null
Email address.
marketingConsentboolean | null
true when the guest opted into marketing.
tosConsentAtstring | null
Date the guest accepted the terms, as an ISO 8601 string.
externalIdstring | null
Your own ID for the customer.
idnumber
ID of the address.
firstNamestring
First name.
lastNamestring
Last name.
companyNamestring | null
Company name.
addressOnestring
Street and number.
addressTwostring | null
Second address line.
citystring
City.
zipstring
Postal code.
regionstring
Region name.
regionIdnumber | null
ID of the region.
countrystring
Country name.
countryIdnumber
ID of the country.
countryCodestring
Two-letter country code.
phonestring
Phone number.
idnumber
ID of the pickup record.
firstNamestring
First name.
lastNamestring
Last name.
phonestring
Phone number.
pickupPointobject | null
The point itself: id, externalId, address1, address2, city,
zip, countryId, countryCode, type (mondial_relay),
createdAt and updatedAt.
idnumber
ID of the method.
typestring
shipping_option, local_delivery or local_pickup.
shippingFeenumber
Fee charged today, in the minor unit.
futureShippingFeenumber
Fee on later shipments, in the minor unit.
prohibitedProductsnumber[]
IDs of products the method cannot carry.
methodobject
Details of the method. A shipping_option has duration, name and
type (flat_price, product, price, weight or dynamic); a
local_delivery has comment, duration and name; a local_pickup
holds the pickup point.
carrierShippingCarrier | null
shipping_option only. The carrier: id, name and serviceCodes.
carrierIdnumber | null
shipping_option only. ID of the carrier.
servicestring | null
shipping_option only. Carrier service code.
customsFeenumber
shipping_option only. Customs fee charged today.
futureCustomsFeenumber
shipping_option only. Customs fee on later shipments.
Card details: brand, lastFour, expiryMonth, expiryYear and type.
usBankAccountobject | null
Bank details: accountHolderType, accountType, bankName, email, last4, name and routingNumber.
acssDebitobject | null
Canadian debit details: email, name, bankName, lastFour, institutionNumber and transitNumber.
bancontactobject | null
Holds email and name.
cashappobject | null
Holds email, name, buyerId and cashTag.
idealobject | null
Holds bank, bic, email and name.
linkobject | null
Holds email and name.
sepaDebitobject | null
Holds bank_code, branch_code, country, email, ibanLast4 and name. These are the only snake_case keys in the API.
sofortobject | null
Holds country, email and name.
idnumber
ID of the stored value set.
metadataIdnumber
ID of the metafield definition.
namestring
Name of the metafield.
slugstring
Slug of the metafield.
descriptionstring | null
Description shown to the customer.
unitstring | null
Unit of the value.
accessLevelstring
private or storefront.
dataTypestring
single_line_string, multi_line_text, rich_text, integer,
decimal, datetime, date, time, volume, weight, boolean,
color, rating, url, money or json.
saveBehaviorstring
customer or subscription.
editableboolean
true when the customer can change the value.
multipleboolean
true when the metafield takes several values.
presetboolean
true when the values come from a fixed list.
variantboolean
true when the metafield varies per variant.
valuesobject[]
The stored values. Each has id, value (always a string, whatever
dataType says), valueId and metadata, an object with imageUrl
and color.
idstring
ID of the line, as a UUID. Pass it to updateItem and removeItem.
typestring
one_time or subscription.
productIdnumber
ID of the variant on a one-time item, or of the plan on a subscription.
statusstring
active, unavailable or out_of_stock.
productProductVariant | ProductPlan | null
The variant or plan the line points at. The widget always expands it.
productNamestring
Name of the product, as it is shown in the cart.
descriptionstring
Line description, such as the plan name.
quantitynumber
How many units the line holds.
addonboolean
true when the line is an add-on to a subscription in the same cart.
addonDurationnumber | null
How long the add-on runs. null is forever, 1 is once.
amountOffnumber | null
Fixed discount on the line, in the minor unit.
percentOffnumber | null
Percentage discount on the line.
giftCardobject
Gift card recipient. Always an object; the members are null when the
line is not a gift card.
bundleobject
Contents of the bundle. items is empty when the line is not a bundle.
optionsSubscriptionSurvey | null
Survey answers for the line. Always null on a one-time item.
metadataMetafield[] | null
Metafields stored on the line.
originstring | null
How the line got into the cart: pre_purchase, mid_purchase,
post_purchase, coupon, or null when the customer added it.
createdAtstring
Creation date, as an ISO 8601 string.
updatedAtstring
Last change date, as an ISO 8601 string.
itemIdstring | null
ID of the cart item this amount belongs to. null on the shipping line.
typestring
one_time, subscription, trial_first, gift_card, setup_fee,
survey, shipping or addon.
productIdnumber | null
ID of the variant or plan. null on the shipping line.
quantitynumber
How many units are priced.
pricenumber | null
Unit price in the minor unit. null for a dynamic-price bundle with no
items yet.
totalnumber
Line total after discount and tax.
subTotalnumber
Line total before discount and tax.
taxAmountnumber
Tax on the line, in the minor unit.
taxRatenumber
Tax rate applied to the line.
taxInclusiveboolean
true when the price already holds the tax.
discountnumber | null
Discount on the line, in the minor unit.
discountsobject[]
Every discount on the line. Each has type, description, total and,
sometimes, chargeNow.
chargeNowboolean
true when the line is part of today's payment.
bundleobject | null
Priced bundle contents. null on setup_fee, survey and shipping
lines. Holds items, where each entry has itemId, productId,
variantId, quantity, quantityTotal, price, subTotal, total,
taxAmount, taxRate, taxInclusive, discount and discounts.
subscriptionobject | null
Schedule of a subscription line. Non-null only on subscription and
trial_first lines. Holds firstPaymentAt, nextPaymentAt,
numberOfShipments and firstShipmentAt.
typestring
coupon, coupon_gift_offer, offer, referral, balance,
gift_card or bundle.
descriptionstring
Text shown next to the discount.
totalnumber
Amount taken off, in the minor unit.
chargeNowboolean
true when the discount applies to today's payment.
idnumber
ID of the coupon.
couponIdstring
The code the customer types.
namestring
Name of the coupon.
amountOffnumber | null
Fixed discount, in the minor unit.
percentOffnumber | null
Percentage discount.
durationstring
once, forever or multiple.
durationInMonthsnumber | null
Months the discount runs, when duration is multiple.
behaviorobject
Holds skipPaymentMethodAllowed, true when the coupon lets the customer check out without a payment method.
giftobject | null
Gift offer attached to the coupon. Holds addonDuration (once or forever), amountOff and percentOff.
idnumber
ID of the gift card.
codestring
The code the customer types.
amountnumber
Face value, in the minor unit.
balancenumber
Value left, in the minor unit.
messagestring
Message written on the card.
statusstring
issued, redeemed, partially_used, used, cancelled or expired.
startsAtstring | null
Date the gift starts, as YYYY-MM-DD.
numberOfOrdersnumber | null
How many orders the gift covers.
messagestring | null
Message for the recipient.
recipientEmailstring | null
Email of the recipient.
idnull
Always null on a guest.
userIdnull
Always null on a guest.
createdAtnull
Always null on a guest.
activeSubscriptionsCountnumber
Always 0 on a guest.
firstNamestring | null
First name.
lastNamestring | null
Last name.
emailstring | null
Email address.
marketingConsentboolean | null
true when the guest opted into marketing.
tosConsentAtstring | null
Date the guest accepted the terms, as an ISO 8601 string.
externalIdstring | null
Your own ID for the customer.
idnumber
ID of the address.
firstNamestring
First name.
lastNamestring
Last name.
companyNamestring | null
Company name.
addressOnestring
Street and number.
addressTwostring | null
Second address line.
citystring
City.
zipstring
Postal code.
regionstring
Region name.
regionIdnumber | null
ID of the region.
countrystring
Country name.
countryIdnumber
ID of the country.
countryCodestring
Two-letter country code.
phonestring
Phone number.
idnumber
ID of the pickup record.
firstNamestring
First name.
lastNamestring
Last name.
phonestring
Phone number.
pickupPointobject | null
The point itself: id, externalId, address1, address2, city,
zip, countryId, countryCode, type (mondial_relay),
createdAt and updatedAt.
idnumber
ID of the method.
typestring
shipping_option, local_delivery or local_pickup.
shippingFeenumber
Fee charged today, in the minor unit.
futureShippingFeenumber
Fee on later shipments, in the minor unit.
prohibitedProductsnumber[]
IDs of products the method cannot carry.
methodobject
Details of the method. A shipping_option has duration, name and
type (flat_price, product, price, weight or dynamic); a
local_delivery has comment, duration and name; a local_pickup
holds the pickup point.
carrierShippingCarrier | null
shipping_option only. The carrier: id, name and serviceCodes.
carrierIdnumber | null
shipping_option only. ID of the carrier.
servicestring | null
shipping_option only. Carrier service code.
customsFeenumber
shipping_option only. Customs fee charged today.
futureCustomsFeenumber
shipping_option only. Customs fee on later shipments.
Where the order ships, or the pickup point the customer chose.
shippingAddressIdnumber | null
ID of the shipping address or of the pickup record.
billingAddressCustomerAddress | null
Billing address. Same fields as a delivery address.
billingAddressIdnumber | null
ID of the billing address.
shippingMethodShippingMethod | null
The chosen shipping method.
shippingMethodIdnumber | null
ID of the shipping method.
shippingCarrierShippingCarrier | null
The carrier that delivers the order. Holds id, name and serviceCodes.
shippingCarrierIdnumber | null
ID of the carrier.
shippingCarrierServicestring | null
Service code of the carrier, such as an express service.
paymentMethodPaymentMethod | null
The saved payment method on the cart. Only present for a signed-in customer.
paymentMethodIdnumber | null
ID of the payment method.
metadataMetafield[] | null
Metafields stored on the cart.
createdAtstring
Creation date, as an ISO 8601 string.
updatedAtstring
Last change date, as an ISO 8601 string.
idnumber
ID of the invoice.
statusstring
Status of the invoice, such as paid.
currencyCodestring
Currency, as an ISO 4217 code.
descriptionstring
Description of the invoice.
customerIdnumber
ID of the customer.
subscriptionIdnumber | null
ID of the subscription the invoice belongs to.
billingAddressIdnumber | null
ID of the billing address.
shippingAddressIdnumber | null
ID of the shipping address.
shippingMethodIdnumber | null
ID of the shipping method.
shippingDetailsobject
Holds periodStart, shipImmediately and numberOfShipments.
itemsInvoiceItem[]
The invoiced lines. Each has id, type, description, productId,
product, quantity, amount, discountAmount, taxAmount,
taxRate, taxInclusive, digital, addonId, subscriptionId,
subscriptionItemId, giftCard, bundle, survey, preferences,
metadata, createdAt and updatedAt.
discountsunknown[]
Discounts on the invoice. Untyped in the API.
discountsAmountnumber
Total discount, in the minor unit.
subTotalnumber
Total before discount and tax, in the minor unit.
taxAmountnumber
Tax, in the minor unit.
adjustmentnumber
Top-up that lifts the payment to the gateway minimum.
totalnumber
Amount charged, in the minor unit.
paidAtstring | null
Payment date, as an ISO 8601 string.
periodStartstring | null
Start of the billing period.
periodEndstring | null
End of the billing period.
firstShipmentAtstring | null
Date of the first shipment.
metadataMetafield[] | null
Metafields on the invoice.
createdAtstring
Creation date, as an ISO 8601 string.
updatedAtstring
Last change date, as an ISO 8601 string.
idnumber
ID of the subscription.
statusstring
active, trial, pre_order, gift_waiting_to_start, cancelled, switched or expired.
activeboolean
true while the subscription runs.
pausedboolean
true while it is paused.
pastDueboolean
true when a payment failed.
unpaidboolean
true when the payments stopped.
cancelAtPeriodEndboolean
true when it ends at the end of the period.
cancelAtEndOfCommitmentboolean
true when it ends at the end of the commitment.
cancellationRequestedboolean
true when the customer asked to cancel.
cancellationsobject[]
Cancellation records. Each has id, subscriptionId, reason, extraFeedback, reasonSubmittedOn, start, end, createdAt and updatedAt.
cancelledAtstring | null
Cancellation date.
pausedAtstring | null
Date the pause started.
switchedAtstring | null
Date the customer switched plan.
skippingUntilstring | null
Date the skipped shipments resume.
waitingUntilstring | null
Date a waiting gift starts.
startsAtstring
Start date.
nextPaymentDatestring
Date of the next payment.
nextShipmentAtstring | null
Date of the next shipment.
lastPaymentAtstring | null
Date of the last payment.
chargesLimitnumber | null
Payments before the subscription ends.
successfulChargesCountnumber
Payments taken so far.
commitmentTermTotalPaymentsnumber | null
Payments in the commitment term.
currencyCodestring
Currency, as an ISO 4217 code.
customerIdnumber
ID of the customer.
productIdnumber
ID of the plan.
productProductPlan | null
The plan itself.
quantitynumber
How many units the subscription holds.
itemsSubscriptionItem[]
Lines of the subscription. Each has id, subscriptionId, addon,
productId, product, quantity, duration, bundle, preferences,
discounts, metadata, createdAt and updatedAt. addons is a
deprecated alias of this field.
bundleobject
Bundle contents: items and preferences.
surveySubscriptionSurvey | null
Survey answers. preferences is an alias of this field.
discountsobject[]
Discounts. Each has id, customerId, couponId, amountOff, percentOff, start, end, createdAt and updatedAt.
giftobject | null
Gift details: message, orderLimit and startsAt.
paymentMethodIdnumber
ID of the payment method.
billingAddressIdnumber | null
ID of the billing address.
shippingAddressIdnumber | null
ID of the shipping address.
shippingMethodIdnumber | null
ID of the shipping method.
previousSubscriptionIdnumber | null
ID of the subscription this one replaced.
referredBynumber | null
ID of the referring customer.
metadataMetafield[] | null
Metafields on the subscription.
createdAtstring
Creation date, as an ISO 8601 string.
updatedAtstring
Last change date, as an ISO 8601 string.
idnumber
ID of the order.
statusstring
Status of the order, such as Awaiting Delivery.
currencyCodestring
Currency, as an ISO 4217 code.
customerIdnumber
ID of the customer.
invoiceIdnumber
ID of the invoice.
subscriptionIdnumber | null
ID of the subscription.
shippingAddressIdnumber | null
ID of the shipping address.
shippingMethodIdnumber | null
ID of the shipping method.
itemsOrderItem[]
The lines to ship. Each has id, type, description, productId,
product, quantity, amount, discountAmount, taxAmount,
taxRate, subscriptionId, subscriptionItemId, bundle, survey,
preferences, metadata, createdAt and updatedAt.
shippingItemsunknown[]
Shipping lines. Untyped in the API.
discountsunknown[]
Discounts on the order. Untyped in the API.
giftunknown
Gift details. Untyped in the API.
dueDatestring | null
Date the order is due.
subTotalnumber
Total before discount and tax, in the minor unit.
taxAmountnumber
Tax, in the minor unit.
adjustmentnumber
Top-up that lifts the payment to the gateway minimum.
totalnumber
Total of the order, in the minor unit.
metadataMetafield[] | null
Metafields on the order.
createdAtstring
Creation date, as an ISO 8601 string.
updatedAtstring
Last change date, as an ISO 8601 string.
idnumber
ID of the variant.
namestring
Name of the variant.
descriptionstring | null
Description of the variant.
pricenumber
Price in the minor unit of the currency, such as cents.
stockCountnumber | null
Units left, or null when stock is not tracked.
bundlePlanIdnumber | null
ID of the bundle plan, when the variant is sold inside a bundle.
priceSchemeobject | null
Quantity-based pricing: id, type and ranges, where each range is id, amount and range.
optionsobject[]
Variant options. Each has id, name and value.
attributesMetafield[]
Variant attributes, shaped like metadata.
metadataMetafield[] | null
Metafields of the variant.
parentProductOneTime
The product the variant belongs to.
createdAtstring
Creation date, as an ISO 8601 string.
idnumber
ID of the plan.
namestring
Name of the plan.
descriptionstring | null
Description of the plan.
pricingNamestring | null
Name of the pricing the plan belongs to.
planHashstring | null
Hash that identifies the plan in checkout links.
pricenumber
Price per billing period, in the minor unit.
setupFeenumber | null
One-off fee charged with the first payment.
trialLengthnumber | null
Trial length in billing periods.
trialLengthDaysnumber | null
Trial length in days.
trialPricenumber | null
Price of the trial.
frequencyCountnumber
How many frequency units sit between two payments.
frequencyUnitstring
day, week or month.
commitmentBillingCountnumber
Payments the customer commits to.
chargesLimitnumber | null
Total payments before the subscription ends.
chargeImmediatelyboolean
true when the first payment is taken at checkout.
shipImmediatelyboolean
true when the first shipment goes out at once.
shippingsobject[]
Shipment schedule. Each entry has id, shippingAt, addCount, addUnit, createdAt and updatedAt.
cutOffAtstring | null
Date the current shipment window closes.
preOrderEndAtstring | null
Date the pre-order window closes.
rebillingStartAtstring | null
Date recurring billing starts.
stockCountnumber | null
Units left, or null when stock is not tracked.
bundlePlanIdnumber | null
ID of the bundle plan, when the plan is sold inside a bundle.
priceSchemeobject | null
Quantity-based pricing, shaped as on a variant.
surveySurvey | null
Survey the customer fills in for this plan.
metadataMetafield[] | null
Metafields of the plan.
parentProductSubscription
The product the plan belongs to.
createdAtstring
Creation date, as an ISO 8601 string.
idnumber
ID of the product.
typestring
one_time or subscription.
namestring
Name of the product.
slugstring
Slug of the product.
descriptionstring | null
Description of the product.
deliveryInfostring | null
Delivery text shown in the widget.
digitalboolean
true when the product needs no shipping.
giftingEnabledboolean
true when the product can be bought as a gift.
collectShippingAddressboolean
true when checkout asks for a shipping address.
imagesobject[]
Product images. Each has id, url, order, createdAt and updatedAt.
bundleBundle | null
The bundle the product builds, when it is a bundle product.
bundleIdnumber | null
ID of that bundle.
bundleRulesetIdnumber | null
ID of the ruleset the bundle follows.
metadataMetafield[] | null
Metafields of the product.
createdAtstring
Creation date, as an ISO 8601 string.
giftCardboolean
One-time products only. true when the product is a gift card.
giftCardExpirationnumber | null
One-time products only. Days until the gift card expires.
optionsobject[]
One-time products only. Each option has id, name and values.
variantsProductVariant[]
One-time products only. Every variant of the product.
setupFeenumber
Subscription products only. Default setup fee.
preOrderEndAtstring | null
Subscription products only. Date the pre-order window closes.
plansProductPlan[]
Subscription products only. Every plan of the product. pricings is a deprecated alias.
customerEmailstring | null
Email of the recipient.
customerNamestring | null
Name of the recipient.
messagestring | null
Message for the recipient.
itemsBundleItem[]
Products inside the bundle. Each has id, productId, product
(a ProductVariant), quantity, extraPrice, position,
stockCount, settings, createdAt and updatedAt.
preferencesobject[]
Bundle preferences. Each has attributeId and values, an array of
attribute value IDs.
surveyIdnumber
ID of the survey.
itemsCountnumber
How many products the answers select.
dataobject[]
The answers. Each entry has questionId and answers, an array of
{ content }, { id } or { id, quantity } objects.
itemsobject[]
Products the answers resolve to. Each has id, productId and surveyId.
idnumber
ID of the variant.
namestring
Name of the variant.
descriptionstring | null
Description of the variant.
pricenumber
Price in the minor unit of the currency, such as cents.
stockCountnumber | null
Units left, or null when stock is not tracked.
bundlePlanIdnumber | null
ID of the bundle plan, when the variant is sold inside a bundle.
priceSchemeobject | null
Quantity-based pricing: id, type and ranges, where each range is id, amount and range.
optionsobject[]
Variant options. Each has id, name and value.
attributesMetafield[]
Variant attributes, shaped like metadata.
metadataMetafield[] | null
Metafields of the variant.
parentProductOneTime
The product the variant belongs to.
createdAtstring
Creation date, as an ISO 8601 string.
idnumber
ID of the plan.
namestring
Name of the plan.
descriptionstring | null
Description of the plan.
pricingNamestring | null
Name of the pricing the plan belongs to.
planHashstring | null
Hash that identifies the plan in checkout links.
pricenumber
Price per billing period, in the minor unit.
setupFeenumber | null
One-off fee charged with the first payment.
trialLengthnumber | null
Trial length in billing periods.
trialLengthDaysnumber | null
Trial length in days.
trialPricenumber | null
Price of the trial.
frequencyCountnumber
How many frequency units sit between two payments.
frequencyUnitstring
day, week or month.
commitmentBillingCountnumber
Payments the customer commits to.
chargesLimitnumber | null
Total payments before the subscription ends.
chargeImmediatelyboolean
true when the first payment is taken at checkout.
shipImmediatelyboolean
true when the first shipment goes out at once.
shippingsobject[]
Shipment schedule. Each entry has id, shippingAt, addCount, addUnit, createdAt and updatedAt.
cutOffAtstring | null
Date the current shipment window closes.
preOrderEndAtstring | null
Date the pre-order window closes.
rebillingStartAtstring | null
Date recurring billing starts.
stockCountnumber | null
Units left, or null when stock is not tracked.
bundlePlanIdnumber | null
ID of the bundle plan, when the plan is sold inside a bundle.
priceSchemeobject | null
Quantity-based pricing, shaped as on a variant.
surveySurvey | null
Survey the customer fills in for this plan.
metadataMetafield[] | null
Metafields of the plan.
parentProductSubscription
The product the plan belongs to.
createdAtstring
Creation date, as an ISO 8601 string.
idnumber
ID of the product.
typestring
one_time or subscription.
namestring
Name of the product.
slugstring
Slug of the product.
descriptionstring | null
Description of the product.
deliveryInfostring | null
Delivery text shown in the widget.
digitalboolean
true when the product needs no shipping.
giftingEnabledboolean
true when the product can be bought as a gift.
collectShippingAddressboolean
true when checkout asks for a shipping address.
imagesobject[]
Product images. Each has id, url, order, createdAt and updatedAt.
bundleBundle | null
The bundle the product builds, when it is a bundle product.
bundleIdnumber | null
ID of that bundle.
bundleRulesetIdnumber | null
ID of the ruleset the bundle follows.
metadataMetafield[] | null
Metafields of the product.
createdAtstring
Creation date, as an ISO 8601 string.
giftCardboolean
One-time products only. true when the product is a gift card.
giftCardExpirationnumber | null
One-time products only. Days until the gift card expires.
optionsobject[]
One-time products only. Each option has id, name and values.
variantsProductVariant[]
One-time products only. Every variant of the product.
setupFeenumber
Subscription products only. Default setup fee.
preOrderEndAtstring | null
Subscription products only. Date the pre-order window closes.
plansProductPlan[]
Subscription products only. Every plan of the product. pricings is a deprecated alias.
customerEmailstring | null
Email of the recipient.
customerNamestring | null
Name of the recipient.
messagestring | null
Message for the recipient.
itemsBundleItem[]
Products inside the bundle. Each has id, productId, product
(a ProductVariant), quantity, extraPrice, position,
stockCount, settings, createdAt and updatedAt.
preferencesobject[]
Bundle preferences. Each has attributeId and values, an array of
attribute value IDs.
surveyIdnumber
ID of the survey.
itemsCountnumber
How many products the answers select.
dataobject[]
The answers. Each entry has questionId and answers, an array of
{ content }, { id } or { id, quantity } objects.
itemsobject[]
Products the answers resolve to. Each has id, productId and surveyId.
idnumber
ID of the variant.
namestring
Name of the variant.
descriptionstring | null
Description of the variant.
pricenumber
Price in the minor unit of the currency, such as cents.
stockCountnumber | null
Units left, or null when stock is not tracked.
bundlePlanIdnumber | null
ID of the bundle plan, when the variant is sold inside a bundle.
priceSchemeobject | null
Quantity-based pricing: id, type and ranges, where each range is id, amount and range.
optionsobject[]
Variant options. Each has id, name and value.
attributesMetafield[]
Variant attributes, shaped like metadata.
metadataMetafield[] | null
Metafields of the variant.
parentProductOneTime
The product the variant belongs to.
createdAtstring
Creation date, as an ISO 8601 string.
idnumber
ID of the plan.
namestring
Name of the plan.
descriptionstring | null
Description of the plan.
pricingNamestring | null
Name of the pricing the plan belongs to.
planHashstring | null
Hash that identifies the plan in checkout links.
pricenumber
Price per billing period, in the minor unit.
setupFeenumber | null
One-off fee charged with the first payment.
trialLengthnumber | null
Trial length in billing periods.
trialLengthDaysnumber | null
Trial length in days.
trialPricenumber | null
Price of the trial.
frequencyCountnumber
How many frequency units sit between two payments.
frequencyUnitstring
day, week or month.
commitmentBillingCountnumber
Payments the customer commits to.
chargesLimitnumber | null
Total payments before the subscription ends.
chargeImmediatelyboolean
true when the first payment is taken at checkout.
shipImmediatelyboolean
true when the first shipment goes out at once.
shippingsobject[]
Shipment schedule. Each entry has id, shippingAt, addCount, addUnit, createdAt and updatedAt.
cutOffAtstring | null
Date the current shipment window closes.
preOrderEndAtstring | null
Date the pre-order window closes.
rebillingStartAtstring | null
Date recurring billing starts.
stockCountnumber | null
Units left, or null when stock is not tracked.
bundlePlanIdnumber | null
ID of the bundle plan, when the plan is sold inside a bundle.
priceSchemeobject | null
Quantity-based pricing, shaped as on a variant.
surveySurvey | null
Survey the customer fills in for this plan.
metadataMetafield[] | null
Metafields of the plan.
parentProductSubscription
The product the plan belongs to.
createdAtstring
Creation date, as an ISO 8601 string.
idnumber
ID of the product.
typestring
one_time or subscription.
namestring
Name of the product.
slugstring
Slug of the product.
descriptionstring | null
Description of the product.
deliveryInfostring | null
Delivery text shown in the widget.
digitalboolean
true when the product needs no shipping.
giftingEnabledboolean
true when the product can be bought as a gift.
collectShippingAddressboolean
true when checkout asks for a shipping address.
imagesobject[]
Product images. Each has id, url, order, createdAt and updatedAt.
bundleBundle | null
The bundle the product builds, when it is a bundle product.
bundleIdnumber | null
ID of that bundle.
bundleRulesetIdnumber | null
ID of the ruleset the bundle follows.
metadataMetafield[] | null
Metafields of the product.
createdAtstring
Creation date, as an ISO 8601 string.
giftCardboolean
One-time products only. true when the product is a gift card.
giftCardExpirationnumber | null
One-time products only. Days until the gift card expires.
optionsobject[]
One-time products only. Each option has id, name and values.
variantsProductVariant[]
One-time products only. Every variant of the product.
setupFeenumber
Subscription products only. Default setup fee.
preOrderEndAtstring | null
Subscription products only. Date the pre-order window closes.
plansProductPlan[]
Subscription products only. Every plan of the product. pricings is a deprecated alias.
customerEmailstring | null
Email of the recipient.
customerNamestring | null
Name of the recipient.
messagestring | null
Message for the recipient.
itemsBundleItem[]
Products inside the bundle. Each has id, productId, product
(a ProductVariant), quantity, extraPrice, position,
stockCount, settings, createdAt and updatedAt.
preferencesobject[]
Bundle preferences. Each has attributeId and values, an array of
attribute value IDs.
surveyIdnumber
ID of the survey.
itemsCountnumber
How many products the answers select.
dataobject[]
The answers. Each entry has questionId and answers, an array of
{ content }, { id } or { id, quantity } objects.
itemsobject[]
Products the answers resolve to. Each has id, productId and surveyId.
idstring
ID of the line, as a UUID. Pass it to updateItem and removeItem.
typestring
one_time or subscription.
productIdnumber
ID of the variant on a one-time item, or of the plan on a subscription.
statusstring
active, unavailable or out_of_stock.
productProductVariant | ProductPlan | null
The variant or plan the line points at. The widget always expands it.
productNamestring
Name of the product, as it is shown in the cart.
descriptionstring
Line description, such as the plan name.
quantitynumber
How many units the line holds.
addonboolean
true when the line is an add-on to a subscription in the same cart.
addonDurationnumber | null
How long the add-on runs. null is forever, 1 is once.
amountOffnumber | null
Fixed discount on the line, in the minor unit.
percentOffnumber | null
Percentage discount on the line.
giftCardobject
Gift card recipient. Always an object; the members are null when the
line is not a gift card.
bundleobject
Contents of the bundle. items is empty when the line is not a bundle.
optionsSubscriptionSurvey | null
Survey answers for the line. Always null on a one-time item.
metadataMetafield[] | null
Metafields stored on the line.
originstring | null
How the line got into the cart: pre_purchase, mid_purchase,
post_purchase, coupon, or null when the customer added it.
createdAtstring
Creation date, as an ISO 8601 string.
updatedAtstring
Last change date, as an ISO 8601 string.
itemIdstring | null
ID of the cart item this amount belongs to. null on the shipping line.
typestring
one_time, subscription, trial_first, gift_card, setup_fee,
survey, shipping or addon.
productIdnumber | null
ID of the variant or plan. null on the shipping line.
quantitynumber
How many units are priced.
pricenumber | null
Unit price in the minor unit. null for a dynamic-price bundle with no
items yet.
totalnumber
Line total after discount and tax.
subTotalnumber
Line total before discount and tax.
taxAmountnumber
Tax on the line, in the minor unit.
taxRatenumber
Tax rate applied to the line.
taxInclusiveboolean
true when the price already holds the tax.
discountnumber | null
Discount on the line, in the minor unit.
discountsobject[]
Every discount on the line. Each has type, description, total and,
sometimes, chargeNow.
chargeNowboolean
true when the line is part of today's payment.
bundleobject | null
Priced bundle contents. null on setup_fee, survey and shipping
lines. Holds items, where each entry has itemId, productId,
variantId, quantity, quantityTotal, price, subTotal, total,
taxAmount, taxRate, taxInclusive, discount and discounts.
subscriptionobject | null
Schedule of a subscription line. Non-null only on subscription and
trial_first lines. Holds firstPaymentAt, nextPaymentAt,
numberOfShipments and firstShipmentAt.
typestring
coupon, coupon_gift_offer, offer, referral, balance,
gift_card or bundle.
descriptionstring
Text shown next to the discount.
totalnumber
Amount taken off, in the minor unit.
chargeNowboolean
true when the discount applies to today's payment.
idnumber
ID of the coupon.
couponIdstring
The code the customer types.
namestring
Name of the coupon.
amountOffnumber | null
Fixed discount, in the minor unit.
percentOffnumber | null
Percentage discount.
durationstring
once, forever or multiple.
durationInMonthsnumber | null
Months the discount runs, when duration is multiple.
behaviorobject
Holds skipPaymentMethodAllowed, true when the coupon lets the customer check out without a payment method.
giftobject | null
Gift offer attached to the coupon. Holds addonDuration (once or forever), amountOff and percentOff.
idnumber
ID of the gift card.
codestring
The code the customer types.
amountnumber
Face value, in the minor unit.
balancenumber
Value left, in the minor unit.
messagestring
Message written on the card.
statusstring
issued, redeemed, partially_used, used, cancelled or expired.
startsAtstring | null
Date the gift starts, as YYYY-MM-DD.
numberOfOrdersnumber | null
How many orders the gift covers.
messagestring | null
Message for the recipient.
recipientEmailstring | null
Email of the recipient.
idnull
Always null on a guest.
userIdnull
Always null on a guest.
createdAtnull
Always null on a guest.
activeSubscriptionsCountnumber
Always 0 on a guest.
firstNamestring | null
First name.
lastNamestring | null
Last name.
emailstring | null
Email address.
marketingConsentboolean | null
true when the guest opted into marketing.
tosConsentAtstring | null
Date the guest accepted the terms, as an ISO 8601 string.
externalIdstring | null
Your own ID for the customer.
idnumber
ID of the address.
firstNamestring
First name.
lastNamestring
Last name.
companyNamestring | null
Company name.
addressOnestring
Street and number.
addressTwostring | null
Second address line.
citystring
City.
zipstring
Postal code.
regionstring
Region name.
regionIdnumber | null
ID of the region.
countrystring
Country name.
countryIdnumber
ID of the country.
countryCodestring
Two-letter country code.
phonestring
Phone number.
idnumber
ID of the pickup record.
firstNamestring
First name.
lastNamestring
Last name.
phonestring
Phone number.
pickupPointobject | null
The point itself: id, externalId, address1, address2, city,
zip, countryId, countryCode, type (mondial_relay),
createdAt and updatedAt.
idnumber
ID of the method.
typestring
shipping_option, local_delivery or local_pickup.
shippingFeenumber
Fee charged today, in the minor unit.
futureShippingFeenumber
Fee on later shipments, in the minor unit.
prohibitedProductsnumber[]
IDs of products the method cannot carry.
methodobject
Details of the method. A shipping_option has duration, name and
type (flat_price, product, price, weight or dynamic); a
local_delivery has comment, duration and name; a local_pickup
holds the pickup point.
carrierShippingCarrier | null
shipping_option only. The carrier: id, name and serviceCodes.
carrierIdnumber | null
shipping_option only. ID of the carrier.
servicestring | null
shipping_option only. Carrier service code.
customsFeenumber
shipping_option only. Customs fee charged today.
futureCustomsFeenumber
shipping_option only. Customs fee on later shipments.
Card details: brand, lastFour, expiryMonth, expiryYear and type.
usBankAccountobject | null
Bank details: accountHolderType, accountType, bankName, email, last4, name and routingNumber.
acssDebitobject | null
Canadian debit details: email, name, bankName, lastFour, institutionNumber and transitNumber.
bancontactobject | null
Holds email and name.
cashappobject | null
Holds email, name, buyerId and cashTag.
idealobject | null
Holds bank, bic, email and name.
linkobject | null
Holds email and name.
sepaDebitobject | null
Holds bank_code, branch_code, country, email, ibanLast4 and name. These are the only snake_case keys in the API.
sofortobject | null
Holds country, email and name.
idnumber
ID of the stored value set.
metadataIdnumber
ID of the metafield definition.
namestring
Name of the metafield.
slugstring
Slug of the metafield.
descriptionstring | null
Description shown to the customer.
unitstring | null
Unit of the value.
accessLevelstring
private or storefront.
dataTypestring
single_line_string, multi_line_text, rich_text, integer,
decimal, datetime, date, time, volume, weight, boolean,
color, rating, url, money or json.
saveBehaviorstring
customer or subscription.
editableboolean
true when the customer can change the value.
multipleboolean
true when the metafield takes several values.
presetboolean
true when the values come from a fixed list.
variantboolean
true when the metafield varies per variant.
valuesobject[]
The stored values. Each has id, value (always a string, whatever
dataType says), valueId and metadata, an object with imageUrl
and color.
idnumber
ID of the variant.
namestring
Name of the variant.
descriptionstring | null
Description of the variant.
pricenumber
Price in the minor unit of the currency, such as cents.
stockCountnumber | null
Units left, or null when stock is not tracked.
bundlePlanIdnumber | null
ID of the bundle plan, when the variant is sold inside a bundle.
priceSchemeobject | null
Quantity-based pricing: id, type and ranges, where each range is id, amount and range.
optionsobject[]
Variant options. Each has id, name and value.
attributesMetafield[]
Variant attributes, shaped like metadata.
metadataMetafield[] | null
Metafields of the variant.
parentProductOneTime
The product the variant belongs to.
createdAtstring
Creation date, as an ISO 8601 string.
idnumber
ID of the plan.
namestring
Name of the plan.
descriptionstring | null
Description of the plan.
pricingNamestring | null
Name of the pricing the plan belongs to.
planHashstring | null
Hash that identifies the plan in checkout links.
pricenumber
Price per billing period, in the minor unit.
setupFeenumber | null
One-off fee charged with the first payment.
trialLengthnumber | null
Trial length in billing periods.
trialLengthDaysnumber | null
Trial length in days.
trialPricenumber | null
Price of the trial.
frequencyCountnumber
How many frequency units sit between two payments.
frequencyUnitstring
day, week or month.
commitmentBillingCountnumber
Payments the customer commits to.
chargesLimitnumber | null
Total payments before the subscription ends.
chargeImmediatelyboolean
true when the first payment is taken at checkout.
shipImmediatelyboolean
true when the first shipment goes out at once.
shippingsobject[]
Shipment schedule. Each entry has id, shippingAt, addCount, addUnit, createdAt and updatedAt.
cutOffAtstring | null
Date the current shipment window closes.
preOrderEndAtstring | null
Date the pre-order window closes.
rebillingStartAtstring | null
Date recurring billing starts.
stockCountnumber | null
Units left, or null when stock is not tracked.
bundlePlanIdnumber | null
ID of the bundle plan, when the plan is sold inside a bundle.
priceSchemeobject | null
Quantity-based pricing, shaped as on a variant.
surveySurvey | null
Survey the customer fills in for this plan.
metadataMetafield[] | null
Metafields of the plan.
parentProductSubscription
The product the plan belongs to.
createdAtstring
Creation date, as an ISO 8601 string.
idnumber
ID of the product.
typestring
one_time or subscription.
namestring
Name of the product.
slugstring
Slug of the product.
descriptionstring | null
Description of the product.
deliveryInfostring | null
Delivery text shown in the widget.
digitalboolean
true when the product needs no shipping.
giftingEnabledboolean
true when the product can be bought as a gift.
collectShippingAddressboolean
true when checkout asks for a shipping address.
imagesobject[]
Product images. Each has id, url, order, createdAt and updatedAt.
bundleBundle | null
The bundle the product builds, when it is a bundle product.
bundleIdnumber | null
ID of that bundle.
bundleRulesetIdnumber | null
ID of the ruleset the bundle follows.
metadataMetafield[] | null
Metafields of the product.
createdAtstring
Creation date, as an ISO 8601 string.
giftCardboolean
One-time products only. true when the product is a gift card.
giftCardExpirationnumber | null
One-time products only. Days until the gift card expires.
optionsobject[]
One-time products only. Each option has id, name and values.
variantsProductVariant[]
One-time products only. Every variant of the product.
setupFeenumber
Subscription products only. Default setup fee.
preOrderEndAtstring | null
Subscription products only. Date the pre-order window closes.
plansProductPlan[]
Subscription products only. Every plan of the product. pricings is a deprecated alias.
customerEmailstring | null
Email of the recipient.
customerNamestring | null
Name of the recipient.
messagestring | null
Message for the recipient.
itemsBundleItem[]
Products inside the bundle. Each has id, productId, product
(a ProductVariant), quantity, extraPrice, position,
stockCount, settings, createdAt and updatedAt.
preferencesobject[]
Bundle preferences. Each has attributeId and values, an array of
attribute value IDs.
surveyIdnumber
ID of the survey.
itemsCountnumber
How many products the answers select.
dataobject[]
The answers. Each entry has questionId and answers, an array of
{ content }, { id } or { id, quantity } objects.
itemsobject[]
Products the answers resolve to. Each has id, productId and surveyId.