Skip to content

Quickstart

  1. Install the SDK

    Terminal window
    npm install @shoppable/checkout
  2. Initialize with your publishable token

    import { ShoppableCheckout } from "@shoppable/checkout";
    const checkout = new ShoppableCheckout({ token: "pk_live_…" });
  3. Run the checkout flow

    const config = await checkout.getCartConfiguration();
    const products = await checkout.lookupProducts(["012345678905"]);
    const order = await checkout.prepareCheckout(cartContent);
    const { clientSecret } = await checkout.createIntent(order._id);
    // Confirm `clientSecret` with Stripe.js, then:
    await checkout.completeCheckout(order._id);

The SDK handles the session token for you — see Authentication for how the two-token model works.