Install the Checkout SDK: npm install @bigcommerce/checkout-sdk, or reference the script-based distribution from the BigCommerce CDN for browser environments
Initialize the SDK with createCheckoutService() and call checkoutService.loadCheckout(checkoutId) where checkoutId comes from the storefront cart cookie or the Cart REST API response
Call checkoutService.loadShippingOptions() to fetch available shipping methods; call checkoutService.selectShippingOption({ shippingOptionId }) to select one
Collect billing/shipping addresses with checkoutService.updateBillingAddress(address) and checkoutService.updateShippingAddress(address); both accept an address object with firstName, lastName, address1, city, stateOrProvinceCode, postalCode, countryCode
Initialize a payment method with checkoutService.initializePayment({ methodId: 'METHOD_ID' }) and submit with checkoutService.submitOrder({ payment: { methodId, paymentData } })
Handle checkout state changes by subscribing to checkoutService.subscribe(state => ...) which fires on every state mutation
Known gotchas
The Checkout SDK is tied to BigCommerce's hosted checkout domain; for fully headless storefronts not using the BigCommerce Stencil theme, Embedded Checkout (iFrame via embedCheckout()) may be simpler and more compliant
Payment method initialization (initializePayment) is provider-specific — some methods like PayPal or Braintree require additional configuration objects; consult the SDK GitHub repository for per-method options
The Checkout SDK and the REST Storefront Checkouts API are distinct; do not mix SDK state management with direct REST calls to /api/storefront/checkouts — it will cause state desync
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp