These hooks give your components access to live checkout data and the ability to modify the checkout experience. All hooks are TypeScript-ready with full type definitions.
Quick Reference
useCheckoutSession
Access cart data, customer info, and modify cart contents
useStoreInfo
Store configuration, theme, and branding data
useCheckoutSession
Ecommerce Provider Data, Ollie Data, session validation
useCheckoutSession
The primary hook for accessing and modifying checkout data.- 📊 Cart Data
- 👤 Customer Data
- 🛠️ Cart Actions
Access cart contents and totalsCart Properties:
CartItem Properties:
| Property | Type | Description |
|---|---|---|
items | CartItem[] | Array of products in cart |
total | number | Total amount in cents |
subtotal | number | Subtotal before shipping/tax |
shipping | number | Shipping cost in cents |
tax | number | Tax amount in cents |
discount | number | Total discount amount |
currency | string | Currency code (USD, EUR, etc.) |
| Property | Type | Description |
|---|---|---|
id | string | Unique product identifier |
name | string | Product name |
price | number | Price per unit in cents |
quantity | number | Quantity in cart |
image | string | Product image URL |
category | string | Product category |
sku | string | Stock keeping unit |
useStoreInfo
Access store configuration, theme, and branding information.- 🎨 Theme & Branding
- 🏪 Store Configuration
- ⚙️ Feature Flags
Use store theme in your componentsTheme Properties:
| Property | Type | Description |
|---|---|---|
colors.primary | string | Primary brand color |
colors.secondary | string | Secondary color |
colors.background | string | Background color |
colors.text | string | Text color |
colors.onPrimary | string | Text color on primary background |
fonts.heading | string | Heading font family |
fonts.body | string | Body text font family |
spacing.small | string | Small spacing value |
spacing.medium | string | Medium spacing value |
spacing.large | string | Large spacing value |
borderRadius | string | Default border radius |
Hook Usage Patterns
🔄 Combining Multiple Hooks
🔄 Combining Multiple Hooks
Use multiple hooks together for rich components:
⚡ Performance Optimization
⚡ Performance Optimization
Optimize hook usage for better performance:
🛡️ Error Handling
🛡️ Error Handling
Handle loading states and errors gracefully: