paybondpaybond
Sign in

Recipe · Payments protect

Safely let AI agents complete Shopify purchases

Give agents spending limits, audit trails, and approval controls for Shopify UCP checkout — without rewriting your storefront.

  1. 1Wire
  2. 2Authorize
  3. 3Smoke

You'll build

Shopify checkout tools guarded before capture with signed completion digests

Before you start

  • paybond login
  • commerce.checkout
  • ~3 min

In short: give the agent a spend limit before it can check out on Shopify, and get a receipt after. Your agent should not create a checkout or complete an order without a bounded spend boundary and an audit trail. Paybond sits at the tool execution boundary — Harbor verifies the operation and amount before your handler runs.

  • Spending limits

    Harbor verifies operation and amount before checkout runs.

  • Audit evidence

    Signed completion digests bind the tool result to the intent.

  • Merchant verification

    Binding metadata ties agent checkouts to your Shopify shop.

  • Works with MCP agents

    Guard UCP Checkout MCP tools without rewriting your agent stack.

Why not just Shopify?

Shopify APIs create checkouts. They do not enforce per-agent spend limits, per-operation permission checks (capability tokens), or a signed receipt of what ran. Paybond adds that guardrail layer without replacing UCP or Admin.

Shopify API alone versus Paybond-guarded Shopify checkout
  • Creates checkout

    Shopify API alone
    Yes — UCP / Admin / Storefront APIs
    With Paybond
    Yes — same Shopify surfaces, after Harbor authorize
  • Spending limits

    Shopify API alone
    Merchant rules only; no per-agent Harbor budget
    With Paybond
    Per-call and intent budgets enforced before the tool runs
  • Audit evidence

    Shopify API alone
    Order history in Shopify Admin
    With Paybond
    Signed evidence digests + settlement receipts
  • Agent authorization

    Shopify API alone
    API credentials / MCP access
    With Paybond
    Capability token + policy decision at verify time
  • Settlement receipts

    Shopify API alone
    Shopify payment / order records
    With Paybond
    Evidence evaluation + optional Agent Receipt Standard

How it works

Agent checkout guarded by Paybond: verify spend, create Shopify checkout, fund via webhook, submit evidence, then settle.

How it works

  1. Agent

    Calls commerce.checkout (UCP / MCP / custom tool)

  2. Paybond Guard

    Harbor authorize before your handler runs

    • Verify spend and operation
    • Generate / bind intent
    • Issue capability token
  3. Shopify Checkout

    Create checkout with binding metadata

  4. Webhook

    orders/create or orders/paid funds the intent

  5. Evidence

    Submit cost_and_completion after tool success

  6. Settlement

    Capture / release per settlement rails

Agent checkout guarded by Paybond: verify spend, create Shopify checkout, fund via webhook, submit evidence, then settle.

Illustrated journey from agent tool call through Shopify checkout and Admin to a Paybond receipt.

1 · Agent

tool call

agent · commerce.checkout

{
  "operation": "commerce.checkout",
  "requested_spend_cents": 4500
}

2 · Checkout

Shopify session

checkout.shopify.com

Order draft · $45.00

2 line items · shipping TBD

note: paybond_intent_id=…

3 · Admin

order note

Shopify Admin · Orders

#1042 · Paid

paybond_intent_id
int_…
tenant_id
ten_…

4 · Receipt

Paybond evidence

paybond · settlement receipt

Evidence verified

cost_cents: 4481 · status: completed

Signed digest

3-minute quickstart

Smoke the sandbox contract with a sandbox intent — no Shopify credentials required:

Terminal
Terminal commandSwipe to inspect long lines
paybond login
paybond agent sandbox smoke \
  --operation commerce.checkout \
  --requested-spend-cents 4500 \
  --evidence-preset cost_and_completion \
  --format table

Optional policy scaffold: paybond policy init --preset shopping.

When the smoke succeeds you should see:

  • ✓ Spend approved
  • ✓ Checkout completed
  • ✓ Receipt generated

What success looks like

Example payment status after a Paybond-guarded Shopify checkout: approved spend, captured amount, and verified evidence.

What success looks like

Sandbox checkout · illustrative

Settled path
Operation
commerce.checkout
Status
Approved
Requested
$45.00
Captured
$44.81
Evidence
Verified

Wire middleware

Prefer Kit’s instrumentShopifyCheckout helper so binding metadata is injected on every call. Tenant and intent IDs come from the Paybond session binding — never from unauthenticated tool args.

paybond-session.ts

TS
Code exampleSwipe to inspect long lines
import { Paybond, instrumentShopifyCheckout } from "@paybond/kit";

const paybond = await Paybond.open({ apiKey: process.env.PAYBOND_API_KEY! });

const instrumented = await instrumentShopifyCheckout(paybond, {
  policy: "./paybond.policy.yaml",
  executeCheckout: async (input) => {
    // Call UCP Checkout MCP / storefront with input.checkoutPayload
    // (note_attributes already include paybond_intent_id and tenant_id).
    return {
      status: "completed",
      cost_cents: 4500,
      order_id: "gid://shopify/Order/123",
      shop: "paybond-agent-commerce-dev.myshopify.com",
    };
  },
});

// After sandbox bind / attach — populate Shopify bindingRef, then bind Harbor:
instrumented.bindingRef.tenantId = tenantId;
instrumented.bindingRef.intentId = intentId;
await instrumented.bind({ intentId, capabilityToken });

Binding metadata

Every agent-initiated checkout must write binding metadata into Shopify so the async webhook path can resolve tenant scope.

Binding metadata bridges checkout creation and async webhook funding: inject paybond_intent_id and tenant_id, then resolve them on orders/create or orders/paid.

Binding metadata

Checkout starts

Inject attributes

  • paybond_intent_id
  • tenant_id

Webhook resolves

Write these into UCP note_attributes (or cart attributes that propagate to orders) so the async funding path can resolve tenant scope without trusting the agent.

Production checklist

Production checklist for Paybond-guarded Shopify agent checkout.

Production checklist

Works with

Works with

  • Shopify
  • OpenAI
  • Anthropic
  • Cloudflare
  • MCP

Ready to test?