Skip to content

JavaScript / TypeScript

@shoppable/checkout is isomorphic (browser + Node), ships ESM, CJS, and types, and has no required dependencies.

Install

Terminal window
npm install @shoppable/checkout

Methods

MethodDescription
getCartConfiguration()Fetch cart config; mints + caches the session token.
getCustomer()Customer context for the cart.
lookupProducts(upcs, opts?)Availability for a list of UPCs.
prepareCheckout(cart)Start a checkout.
createIntent(checkoutId, body?)Create the Stripe payment intent.
updateCheckout(checkoutId, patch)Patch an in-progress checkout.
completeCheckout(checkoutId)Finalize after payment.
validateCoupon(input)Validate a coupon code.
lander.getSession(sid)AI cart lander session context.
lander.getRecommendations(sid)AI cart lander recommendations.

Verifying downloads

Release zips are signed with Sigstore cosign (keyless):

Terminal window
cosign verify-blob \
--certificate checkout-0.1.0.zip.pem \
--signature checkout-0.1.0.zip.sig \
--certificate-identity-regexp 'https://github.com/72Lux/shoppable-developers/.*' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
checkout-0.1.0.zip