Shopify Commerce
Shopify L402 integration requires an Agentic Commerce subscription — either Individual ($99/month) or Business ($299/month). View pricing
Lightning Enable's Shopify integration lets AI agents purchase products from your Shopify store using Lightning Network payments. Your existing Shopify catalog, inventory management, and fulfillment workflows stay exactly as they are — Lightning Enable adds a new sales channel powered by the L402 protocol.
How It Works
AI Agent Lightning Enable Your Shopify Store
│ │ │
├─ GET /catalog ──────────────────►│──── Admin API products ────────────►│
│◄──── product list ──────────────┤◄──── products + prices ─────────────┤
│ │ │
├─ POST /checkout ────────────────►│ │
│ (items + buyer location) │── create Lightning invoice ──► │
│◄──── 402 + invoice ─────────────┤ (via Strike/OpenNode) │
│ │ │
├─ pay invoice ───────────────────►│ │
│◄──── preimage (proof) ──────────┤ │
│ │ │
├─ POST /checkout (retry) ────────►│ │
│ (L402 payment proof) │ │
│◄──── claim URL + token ─────────┤ │
│ │ │
├─ POST /claim ───────────────────►│ │
│ (claim token + shipping) │── POST /admin/api/orders.json ────►│
│◄──── order confirmation ────────┤◄──── Shopify order created ────────┤
│ │ (paid, inventory decremented) │
- Browse — Agent fetches your product catalog. Lightning Enable pulls it from the Shopify Admin API using your app credentials (the public
products.jsonendpoint is only a fallback when no token is configured) and caches it. - Checkout — Agent submits a cart with the buyer's location (required for tax), receives a Lightning invoice
- Pay — Agent pays the invoice, receives cryptographic proof of payment (preimage)
- Retry — Agent re-POSTs the same checkout endpoint with the L402 proof, receives the claim URL carrying the claim token (withheld from the pre-payment response so nobody can race the buyer to claim)
- Claim — Agent or human provides shipping details with the claim token, Shopify order is created
Key Features
- Zero changes to your Shopify store — products, inventory, and fulfillment stay in Shopify
- Auto-registered for agent discovery — your store appears in the L402 API registry so AI agents can find it via
discover_api - Server-side pricing — prices are always fetched from your Shopify catalog, never client-controlled
- Cryptographic payment proof — L402 verification (SHA256(preimage) == payment_hash) confirms payment without webhook dependencies
- Automatic Shopify orders — orders appear in your Shopify admin as "paid" with inventory decremented
- Automatic tax calculation — tax computed via Shopify's Draft Order API using buyer location, included in the Lightning invoice total
- Flat-rate shipping — configurable domestic and international rates with optional free shipping threshold
- Catalog caching — products cached for configurable duration (default 15 minutes) to minimize API calls
- Claim tokens — configurable claim window (default 30 days) for providing shipping details after payment
What You Need
- Active Shopify store — products you want to sell via L402 need Active status (publishing to the Online Store sales channel is not required; the Admin API catalog fetch doesn't filter by sales channel)
- Shopify app credentials with
write_orders,write_draft_orders, andread_productsscopes — the catalog is fetched via the Shopify Admin API using these credentials (the publicproducts.jsonendpoint is used only as a fallback when no token is configured) - Lightning Enable subscription — Agentic Commerce Individual ($99/mo) or Business ($299/mo)
- Payment provider account — Strike (recommended) or OpenNode
Agent Flow vs Human Flow
The Shopify L402 integration supports a two-phase flow:
| Phase | Who | What Happens |
|---|---|---|
| Purchase | AI Agent | Browses catalog, creates checkout, pays Lightning invoice |
| Claim | AI Agent or Human | Provides shipping address and email, triggers Shopify order creation |
The claim token bridges the two phases. It is issued only after payment is proven — via the checkout retry with the L402 preimage, or delivered to the buyer's email when one was provided at checkout. The agent (or a human) then provides shipping details using the token within the configured claim window (default 30 days). After a successful claim, the same token keeps working as a read credential for order-status tracking.
Order Lifecycle
| Status | Meaning |
|---|---|
PendingPayment | Checkout created, waiting for Lightning payment |
PaidAwaitingDetails | Payment confirmed, waiting for shipping details |
PaidWithDetails | Shipping details provided, Shopify order created |
Fulfilled | Shopify fulfillment started |
Shipped | Tracking info available |
Next Steps
- Setup Guide — Step-by-step integration setup
- API Reference — Full endpoint documentation
- Agent Discovery & Registry — Control how agents find your store