Skip to main content
The CheckoutSession is the core type of the SDK: the platform-agnostic view of the shopper’s cart, customer, shipping, payment and totals that useCheckoutSession returns and that every action of useCheckoutAction updates. This page lists every field of the session and of the types it contains. All of them are importable from @ollie-shop/sdk, for example import type { CheckoutSession, CartItem } from '@ollie-shop/sdk'.
Let your agent build it. The Ollie Shop skill ships with projects created by npx create-ollie-shop and knows this interface, including which fields can be absent and need a defensive read.
Prompt
Don’t have the skill yet? Install it.
Two conventions apply everywhere below:
  • Amounts are in minor units (cents). Divide by 100 before formatting, or use Intl.NumberFormat with session.locale as in the examples.
  • Optional means the platform may not send it. Guard with ?. before reading nested data.

Structure Overview

CartItem

CustomerData

Every field is optional. CustomerPreferences: saveData?: boolean (remember the customer’s data) and locale?: string (e.g., "en-US").

Addresses

Address

The base shape, used for billing addresses as BillingAddress.

ShippingAddress

Address plus receiverName?: string.

CustomerAddress

Address plus:

ShippingInfo

ShippingPackage

EstimatedDeliveryTime: { value: number; unit }, where unit is a singular or plural time unit ("day", "days", "hour", "week", …) or "businessDays". TimeSlot: { id: string; price: number; originalPrice: number; startDate: string; endDate: string }, dates in ISO 8601.

ShippingQuote

A union of three shapes, narrowed by type: Fields shared by all three: pickUpInfo on a pickup quote:

PaymentInfo

PaymentMethod

PaymentInstallment: { number: number; amount: number; total: number; interestRate?: number }, amounts in minor units.

SelectedPayment

GiftCard

SavedCard

Campaign

Promotion: id: string, name?: string, discountValue?: number (minor units), code?: string (the coupon that triggered it), trigger: "coupon" | "automatic", applied: boolean.

Totals

TaxLine: { name: string; value: number }.

LocaleInfo

User

Usage Examples

Formatting amounts

Every amount is in minor units, so one helper built from session.locale serves every example below.

Checking if a session is ready for checkout

Displaying cart totals

Handling multi-package shipping

Reading the selected pickup point