CheckoutSession
is the core interface representing a checkout session in the Ollie Shop ecosystem. It contains all the necessary data to render and process a typical checkout flow, including cart items, customer information, shipping details, payment methods, and totals.
id
string
cartItems
CartItem[]
id
: Unique identifier for the cart item (e.g., SKU code)sellerId
: (Optional) Identifier for the marketplace seller providing the itemname
: Display name of the itemprice
: Current (sale) price in minor units (e.g., cents)originalPrice
: Original (non-sale) price in minor unitsquantity
: Number of this item in the cartavailable
: Whether the item is in stockindex
: Position index in the cartimage
: URL for the item’s imageurl
: (Optional) URL to the product detailsvariantDetails
: (Optional) Object containing variant information (e.g., color, size)customer
CustomerData
(optional)id
: Platform’s unique identifier for the customeremail
: Customer’s email addressfirstName
: Customer’s first namelastName
: Customer’s last namedocument
: Customer’s document or tax ID (e.g., CPF in Brazil)phone
: Customer’s phone numberaddresses
: List of customer’s addressesAddress
id
: Optional unique identifier for saved addressestype
: Optional address type (“home”, “billing”, “work”, “pick_up”, “other”)street
: Optional street namenumber
: Optional street numbercomplement
: Optional address complement/apartment numberreference
: Optional delivery referenceneighborhood
: Optional neighborhood or districtcity
: Optional city namecountry
: Required country code (e.g., “USA”, “BRA”)stateOrProvince
: Optional state or provincepostalCode
: Required postal codeCustomerAddress
CustomerAddress extends Address
selected
: Whether this address is currently selectedreceiverName
: Optional name of person receiving deliveriesshipping
ShippingInfo
(optional)addresses
: List of shipping addresses available for selectionpackages
: List of shipping packages the user has selectedavailableQuotes
: List of shipping options available for user selectionavailableCountries
: List of country codes available for shippingShippingAddress
ShippingAddress extends Address
receiverName
: Optional name of person receiving the packageShippingPackage
id
: Unique identifier for the shipping packageitems
: List of cart item indexes included in this packagecarrier
: Name of the shipping carrier (e.g., “FedEx”, “UPS”)method
: Carrier’s shipping method (e.g., “Standard”, “Express”)estimatedDeliveryTime
: Object containing:
value
: Numerical value of the estimated delivery timeunit
: Unit of time (e.g., “day”, “hour”, “week”) as Intl.RelativeTimeFormatUnitprice
: Cost of shipping this package in minor unitsaddressId
: ID of the shipping address for this packagetype
: Type of shipping: “delivery” or “pick_up”storeName
: Optional name of store for pickup packagestimeSlot
: Optional time slot selection with:
id
: Unique identifier for the time slotoriginalPrice
: Original price for this time slotprice
: Current price for this time slotstartDate
: Start date and time in ISO 8601 formatendDate
: End date and time in ISO 8601 formatShippingQuote
(as either DeliveryQuote
or PickUpQuote
) contains:
id
: Unique identifier for the shipping quotecarrier
: Name of the shipping carriername
: Display name of the shipping methodestimatedDeliveryTime
: Object containing:
value
: Numerical value of the estimated delivery timeunit
: Unit of time (e.g., “day”, “hour”, “week”) as Intl.RelativeTimeFormatUnitavailableItems
: List of cart item indexes this quote applies toprice
: Cost of this shipping option in minor unitstimeSlots
: Array of available delivery/pickup time slots, each containing:
id
: Unique identifier for the time slotoriginalPrice
: Original price for this time slotprice
: Current price for this time slotstartDate
: Start date and time in ISO 8601 formatendDate
: End date and time in ISO 8601 formattype
: Either “delivery” or “pick_up”pickUpInfo
containing:
name
: Name of the pickup location/storeaddress
: Full address object containing all standard address fieldspayment
PaymentInfo
(optional)availableMethods
: All payment methods available (credit card, PayPal, etc.)selectedPayments
: Payment method(s) selected by the usertotal
: Total amount to be paidPaymentMethod
contains:
id
: Unique identifier for the payment methodtype
: Payment method type (e.g., “credit_card”, “debit_card”, “paypal”)name
: Display name of the payment method (e.g., “Visa”, “PayPal”)installments
: Optional array of available payment installment options, each containing:
number
: Number of installments (e.g., 1, 3, 6)amount
: Amount of each installment in minor unitstotal
: Total amount across all installments in minor unitsinterestRate
: Optional interest rate percentage for this installment planSelectedPayment
contains:
methodId
: ID of the chosen payment method (matching PaymentMethod.id)referenceValue
: Base amount for this payment, typically the sub-totaltotal
: Total amount being paid with this payment method in minor unitsinstallments
: Optional number of installments chosen for this paymentcampaign
Campaign
(optional)coupons
: Array of coupon codes applied by the userpromotions
: Array of promotions, each containing:
id
: Unique identifier for the promotionname
: Optional display name or descriptiondiscountValue
: Optional total discount amount in minor unitslocale
LocaleInfo
currency
: ISO 4217 currency code (e.g., “USD”, “BRL”)language
: Language code (e.g., “en”, “pt-BR”)country
: Country code in ISO 3166-1 alpha-3 format (e.g., “USA”, “BRA”)taxes
TaxLine[]
(optional)name
: Name or code of the tax (e.g., “VAT”, “State Tax”)value
: Amount of this tax in minor unitstotals
Totals
items
: Total cost of items in the cartshipping
: (Optional) Total shipping costtax
: (Optional) Total tax amountdiscounts
: (Optional) Total discount amountinterest
: (Optional) Total interest amount (e.g., from installments)total
: Grand total for the checkoutuser
User
id
: Identifier for the user (customer ID or operator ID)role
: Role of the user:
"user"
: The end customer themselves"operator"
: A third party acting on behalf of the customerisGuest
: Whether the user is not logged inreadOnly
boolean
extensions
Extensions
(generic parameter, optional)CheckoutSession
interface works with several other types:
CartItem
- Information about items in the cartCustomerData
- Customer detailsShippingInfo
- Shipping details and optionsPaymentInfo
- Payment methods and selectionsCampaign
- Promotions and couponsLocaleInfo
- Regional settingsTotals
- Cost breakdownUser
- Information about session operator