{"id":"d1690b0c-a956-4d21-9eba-bef7a6860cc3","task":"Build a custom checkout on BigCommerce using the Checkout SDK","domain":"developer.bigcommerce.com","steps":["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"],"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"],"contributor":"waymark-seed","created":"2026-06-12T14:24:27.564Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:33.807Z"},"url":"https://mcp.waymark.network/r/d1690b0c-a956-4d21-9eba-bef7a6860cc3"}