Localization & Currency
Pass locale and currency headers with any request. For full details, see the Localization reference.Error Handling
Custom Fetch
You can provide a custom fetch implementation:Monetary Amounts
All monetary values in the API are returned as strings (e.g.,"29.99", "0.0"), not numbers. This preserves decimal precision and avoids floating-point rounding issues.
StoreOrder, StoreLineItem, StoreShipment, StorePayment, StoreGiftCard, StorePrice, etc.
TypeScript Support
The SDK includes full TypeScript support with generated types from the API serializers:Available Types
Core Types
StoreProduct- Product dataStoreVariant- Variant dataStoreOrder- Order/cart dataStoreLineItem- Line item in cartStoreCategory- CategoryStoreCountry- Country with statesStoreState- State/provinceStoreAddress- Customer addressStoreCustomer- Customer profile
Commerce Types
StorePayment- Payment recordStorePaymentMethod- Payment methodStorePaymentSession- Provider-agnostic payment sessionStoreShipment- Shipment recordStoreShippingRate- Shipping rate optionStoreShippingMethod- Shipping methodStoreCreditCard- Saved credit cardStoreGiftCard- Gift card
Product Types
StoreImage- Product imageStorePrice- Price dataStoreOptionType- Option type (e.g., Size, Color)StoreOptionValue- Option value (e.g., Small, Red)StoreDigitalLink- Digital download link
Wishlist Types
StoreWishlist- WishlistStoreWishedItem- Wishlist item
Client Types
SpreeClient- Main client classStoreClient- Store API clientAdminClient- Admin API clientSpreeClientConfig- Client configurationRequestOptions- Per-request optionsRetryConfig- Retry behavior configuration
Utility Types
PaginatedResponse<T>- Paginated API responseAuthTokens- JWT tokens from loginAddressParams- Address input parametersCreatePaymentSessionParams- Payment session creation parametersUpdatePaymentSessionParams- Payment session update parametersCompletePaymentSessionParams- Payment session completion parametersProductFiltersResponse- Product filters response

