@checkoutkit/testing
v0.2.0
Published
Mock merchant, mock agent and conformance helpers for checkoutkit
Maintainers
Readme
@checkoutkit/testing
Mock merchant, scripted agent, and the ACP conformance suite.
pnpm add -D @checkoutkit/testingTest your agent without a live merchant
import { createMockMerchant, createMockAgent } from "@checkoutkit/testing";
const merchant = createMockMerchant();
const agent = createMockAgent({ merchant: merchant.handler });
const { order } = await agent.shop({ items: [{ id: "sku_tshirt", quantity: 2 }] });The mock emits fully schema-valid sessions with totals that survive strict validation, so it doubles as a reference for what a conforming backend produces.
Check your merchant against the protocol
import { runConformance, formatReport, badge } from "@checkoutkit/testing";
const report = await runConformance({ target: "https://store.example.com/acp", items: ["sku_123"] });
console.log(formatReport(report));Thirteen checks over version negotiation, idempotency, schema validity, totals
and illegal state transitions. badge(report) emits a shields.io payload. Also
available as npx checkoutkit conformance <url>.
The suite never calls /complete — that charges a real instrument and places
a real order — and it cancels every session it creates.
CheckoutKit is an independent community implementation of the Agentic Commerce Protocol. It is not affiliated with, sponsored by, or endorsed by OpenAI or Stripe.
Part of CheckoutKit · Apache-2.0
