ByteSellSDK
Served by the platform at ${ platform.sdk }. Calls are relative to the page,
so a custom domain requires no configuration.
An expired session is refreshed once and the request replayed. A refusal from
bot protection is not retried, and a request carrying a single-use verification
token is never replayed.
The cart
The cart is a shared Alpine store rather than a global object:add() dispatches a cart-updated window event.
State persists in localStorage. preview is display only. The server
re-derives every total at order creation, so browser-side edits cannot affect
the amount charged.
Checkout is platform-owned. The theme’s Checkout button stashes the cart and
navigates to the hosted pay page.
Money helpers
These are defined by the theme, not the platform. The two first-party themes define them differently.
Prices arrive as strings.
.toFixed() on one throws.
Multi-currency
Presentment currency is optional. A theme that does not implement it displays all prices in the store’s own currency. A theme that implements it owns the entire surface: the picker, the cookie, the conversion helpers, andwindow.__bsPresentmentRates derived from
storefront.presentment_rates_json.
A merchant switching from a theme that supports presentment to one that does
not loses buyer-currency display without warning. State support in the theme
listing.
Icons
The icon runtime is served by the platform. Mark an element with a kebab-case icon name and call the runtime:MutationObserver must skip already-marked elements to avoid
re-triggering itself.
Platform scripts are deferred and run after inline end-of-body scripts. Call
lucide.createIcons() from DOMContentLoaded, or guard for the runtime being
present.