This page is the curated reference. The complete, generated type reference lives at /kit/api/core and is regenerated from the published typings.
Error classes
Everything the kit throws extendsShopkitError, so one catch can narrow. All of them are exported from @quickbutik/kit, @quickbutik/kit/sdk and, on a script-tag page, window.Quickbutik.
number
The HTTP status.
unknown
The parsed response body.
unknown
The machine-readable half, normalised across the platform’s error envelopes (its
details, context and validation errors all land here). For example which lines are out of stock on a 409.boolean
True for 408, 429 and 5xx.
A well-formed currency the shop does not offer is not an error: the platform answers in the shop’s own currency, so
product.currency can differ from shopkit.currency. Only a malformed code throws, locally, before any request. See Currencies.Missing is not an error
These resolve tonull on 404 or 410 instead of throwing, because a remembered id that has expired is a normal thing for a storefront to meet:
products.get,products.getBySlugcategories.getcart.get,cart.currentcheckout.getSession,checkout.syncCart
CartStore, useCart, the cart elements) captures mutation errors into its snapshot’s error instead of throwing, so a failed “add to cart” surfaces in the UI rather than in an unhandled rejection.
Scopes
A publishable key carries scopes. The kit checks them locally before a request leaves the process, so a missing scope is a namedShopkitScopeError instead of an opaque 403. The platform enforces them again either way.
DEFAULT_SHOPKIT_SCOPES is the first five. start() and buyNow() also read the cart (cart:read), and write one (cart:write) when none is remembered.
Two mappings surprise people and both are deliberate: categories sit behind products:read, and shop.get() needs checkout:read, because it is served by the checkout’s shop endpoint.
Pass scopes: null when the app genuinely does not know the key’s scopes; only the friendly local error is lost.
Campaign storefront refusals
A checkout started for a campaign storefront can be refused with a machine-readable reason.storefrontRefusal(error) decodes it, matching on details.reason rather than the HTTP status, and returns null for anything else, so it is safe to call on whatever was thrown.
See Campaign storefronts.
Common platform errors
More in Troubleshooting.