Skip to content

CartOptions

The cart’s settings. Giving cart at all turns the cart on: without it there is no cart, no storage access, no header button, and the buy button draws nothing.

optional cartHref?: string

The cart experience’s address, for a host that does not use the storefront holder. The holder’s cart link wins when both are given.


optional confirmationHref?: string

The order confirmation experience’s address, likewise. With none there is nowhere to send the shopper back to, so the pay form says so.


optional poll?: object

How the confirmation waits for the provider to confirm the payment. The defaults are a capped back-off of a few minutes; this exists for tests and unusual hosts.

optional capMs?: number

optional delays?: readonly number[]

optional steadyMs?: number


optional storage?: StorageAdapter

Where the cart token and the pending order are kept. localStorageAdapter() by default; cookieAdapter() for a host that renders on a server. Read once, when the provider mounts.


optional storeKey?: string

The store’s key. Without it (or without currency) the provider asks Commerce for the store once per page, the only request made before a shopper adds anything.