bc-checkout

Customize BigCommerce checkout — Checkout SDK, embedded checkout, server-side checkout API, custom checkout UI, and checkout extensions. Use when modifying the checkout experience or building headless checkout flows.

17 stars

Best use case

bc-checkout is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Customize BigCommerce checkout — Checkout SDK, embedded checkout, server-side checkout API, custom checkout UI, and checkout extensions. Use when modifying the checkout experience or building headless checkout flows.

Teams using bc-checkout should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/bc-checkout/SKILL.md --create-dirs "https://raw.githubusercontent.com/OrcaQubits/agentic-commerce-skills-plugins/main/bigcommerce-commerce/skills/bc-checkout/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/bc-checkout/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How bc-checkout Compares

Feature / Agentbc-checkoutStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Customize BigCommerce checkout — Checkout SDK, embedded checkout, server-side checkout API, custom checkout UI, and checkout extensions. Use when modifying the checkout experience or building headless checkout flows.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# BigCommerce Checkout Customization

## Before writing code

**Fetch live docs**:
1. Fetch `https://developer.bigcommerce.com/docs/storefront/cart-checkout/checkout-sdk` for Checkout SDK
2. Web-search `site:developer.bigcommerce.com checkout api` for Checkout API reference
3. Web-search `bigcommerce embedded checkout headless` for embedded checkout patterns

## Checkout Architecture

### Three Approaches

| Approach | Where | Use Case |
|----------|-------|----------|
| **Native Checkout** | BigCommerce storefront | Default — customize via SDK or theme |
| **Embedded Checkout** | External site (iframe) | Headless with BigCommerce-hosted checkout |
| **Custom Checkout** | Your own frontend | Fully custom using Checkout/Payments API |

## Checkout SDK

### What It Is

A JavaScript SDK for customizing the native BigCommerce checkout:
- Renders checkout UI in a target DOM element
- Provides methods to interact with checkout state
- Fires events for checkout lifecycle
- Available as `@bigcommerce/checkout-sdk` npm package

### Installation

```bash
npm install @bigcommerce/checkout-sdk
```

### Core Methods

```javascript
import { createCheckoutService } from '@bigcommerce/checkout-sdk';

const service = createCheckoutService();

// Load checkout
await service.loadCheckout(checkoutId);

// Get current state
const state = service.getState();
const checkout = state.data.getCheckout();

// Update shipping address
await service.updateShippingAddress(address);

// Select shipping option
await service.selectShippingOption(optionId);

// Apply coupon
await service.applyCoupon(code);

// Submit order
await service.submitOrder(orderPayload);
```

### State Selectors

The state object provides selectors:
- `getCheckout()` — full checkout data
- `getCart()` — cart items and totals
- `getCustomer()` — customer info
- `getShippingAddress()` — shipping address
- `getBillingAddress()` — billing address
- `getShippingOptions()` — available shipping methods
- `getPaymentMethods()` — available payment methods
- `getOrder()` — completed order

### Checkout Events

Subscribe to state changes:
```javascript
service.subscribe(state => {
  const checkout = state.data.getCheckout();
  // React to checkout state changes
});
```

## Embedded Checkout

### How It Works

Embed BigCommerce's checkout in an external site via iframe:
1. Create a cart via the Server-to-Server Cart API
2. Generate a checkout URL (from the cart's `redirect_urls.checkout_url`)
3. Embed the URL in an iframe on your site
4. Listen for `postMessage` events from the iframe

### Setup

Include the Embedded Checkout script:
```javascript
import { embedCheckout } from '@bigcommerce/checkout-sdk';

embedCheckout({
  url: checkoutUrl,
  containerId: 'checkout-container',
  onComplete: () => { /* order placed */ },
  onError: (error) => { /* handle error */ },
  onFrameLoad: () => { /* checkout loaded */ },
});
```

### Requirements

- HTTPS on your domain
- Configure "Trusted Domains" in BigCommerce admin
- Set `X-Frame-Options` and CSP headers to allow embedding

## Server-Side Checkout API

### Cart to Checkout Flow

1. **Create Cart**: `POST /v3/carts` with line items
2. **Add Billing Address**: `POST /v3/checkouts/{id}/billing-address`
3. **Add Consignment (Shipping)**: `POST /v3/checkouts/{id}/consignments`
4. **Select Shipping Option**: `PUT /v3/checkouts/{id}/consignments/{consignmentId}`
5. **Create Order**: `POST /v3/checkouts/{id}/orders`
6. **Process Payment**: `POST /v3/payments` (via Payments API)

### Key Endpoints

| Endpoint | Method | Purpose |
|----------|--------|---------|
| `/v3/carts` | POST | Create cart |
| `/v3/carts/{id}/items` | POST, PUT, DELETE | Manage cart items |
| `/v3/carts/{id}/redirect_urls` | POST | Get checkout URL |
| `/v3/checkouts/{id}` | GET | Get checkout state |
| `/v3/checkouts/{id}/billing-address` | POST, PUT | Set billing address |
| `/v3/checkouts/{id}/consignments` | POST | Add shipping info |
| `/v3/checkouts/{id}/coupons` | POST, DELETE | Apply/remove coupons |
| `/v3/checkouts/{id}/orders` | POST | Create order from checkout |

## Checkout Customization in Stencil

### Theme Template

Checkout uses `templates/pages/checkout.html` with special handling:
- Uses the `empty` layout (minimal wrapper)
- Checkout UI is primarily JavaScript-rendered
- Limited template customization compared to other pages

### Checkout JS Customization

Override checkout JavaScript for UI modifications:
- Fork the open-source checkout: `github.com/bigcommerce/checkout-js`
- Build custom React checkout components
- Deploy as a custom checkout script

## Best Practices

- Use Embedded Checkout for headless — avoids PCI scope expansion
- Use the Checkout SDK for programmatic control
- Always use HTTPS for checkout flows
- Handle payment failures gracefully with clear error messages
- Test the full checkout flow with real payment sandbox credentials
- Support guest checkout and registered customer checkout
- Validate all addresses server-side
- Handle coupon edge cases (expired, minimum spend, etc.)

Fetch the Checkout SDK docs and BigCommerce Checkout API reference for exact method signatures, state structure, and configuration options before implementing.

Related Skills

woo-checkout

17
from OrcaQubits/agentic-commerce-skills-plugins

Customize WooCommerce checkout — classic and block-based checkout, custom fields, validation, order processing, and checkout extensibility. Use when modifying the checkout flow, adding custom checkout fields, or integrating checkout extensions.

ucp-embedded-checkout

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement UCP Embedded Checkout Protocol — iframe/webview-based checkout UI for human escalation using JSON-RPC 2.0 over postMessage. Use when the checkout status is requires_escalation and the buyer needs a merchant-hosted UI.

ucp-checkout-rest

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement UCP Checkout over the REST binding — create, get, update, complete, and cancel checkout sessions with proper headers, idempotency, status transitions, and error handling. Use when building REST-based UCP checkout endpoints or clients.

ucp-checkout-mcp

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement UCP Checkout over the MCP (Model Context Protocol) binding — expose checkout operations as MCP tools for AI agents. Use when building an MCP server that AI agents like Claude or Gemini can call for commerce, or when integrating with Shopify's MCP endpoint.

ucp-checkout-a2a

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement UCP Checkout over the A2A (Agent-to-Agent) binding — enable autonomous agent-to-agent commerce using Agent Cards and structured message parts. Use when building agent-to-agent commerce flows.

spree-checkout

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement Spree's checkout — the Order state machine (cart → address → delivery → payment → confirm → complete), the Payment and Shipment sub-state machines, the return flow (ReturnAuthorization → CustomerReturn → Reimbursement → Refund), guest checkout, payment-step skipping for credit-covered orders, and the V3 checkout API surface. Use when building or customizing checkout flows, debugging state transitions, or wiring custom checkout steps.

shopify-checkout-ui

17
from OrcaQubits/agentic-commerce-skills-plugins

Build Shopify checkout UI extensions — extension targets, UI primitives, Preact/Remote DOM rendering, checkout APIs, metafield access, post-purchase extensions, and thank-you page customization. Use when customizing Shopify checkout.

saleor-checkout

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement the Saleor checkout flow — checkout creation, line items, shipping/billing addresses, delivery methods, payment, and completion. Use when building checkout experiences.

medusa-cart-checkout

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement Medusa v2 cart and checkout — cart lifecycle, line items, shipping and payment selection, sales channels, and checkout completion flow. Use when building cart and checkout features.

magento-checkout

17
from OrcaQubits/agentic-commerce-skills-plugins

Customize Magento 2 checkout — payment methods, shipping carriers, totals collectors, and checkout UI. Use when building custom payment/shipping integrations or modifying the checkout flow.

acp-checkout-rest

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement the ACP REST checkout API — create, update, retrieve, complete, and cancel checkout sessions. Use when building merchant-side checkout endpoints, handling the checkout session state machine, or integrating with AI agent checkout flows.

acp-checkout-mcp

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement ACP checkout as an MCP server, exposing checkout operations as MCP tools. Use when building an MCP-based commerce server for AI agents that use tool-calling to complete purchases.