acp-checkout-rest
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.
Best use case
acp-checkout-rest is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
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.
Teams using acp-checkout-rest 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
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/acp-checkout-rest/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How acp-checkout-rest Compares
| Feature / Agent | acp-checkout-rest | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
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.
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
# ACP Checkout — REST Binding
## Before writing code
**Fetch live docs**:
1. Fetch `https://developers.openai.com/commerce/specs/checkout/` for the canonical checkout specification
2. Web-search `site:github.com agentic-commerce-protocol spec openapi checkout` for the latest OpenAPI YAML
3. Fetch `https://developers.openai.com/commerce/guides/key-concepts/` for data model details
4. Web-search `site:docs.stripe.com agentic-commerce protocol specification` for Stripe's merchant-side reference
## Conceptual Architecture
### Five Checkout Operations
| Operation | Method | Path | Success |
|-----------|--------|------|---------|
| Create | POST | `/checkout_sessions` | 201 |
| Update | POST | `/checkout_sessions/{id}` | 200 |
| Retrieve | GET | `/checkout_sessions/{id}` | 200 |
| Complete | POST | `/checkout_sessions/{id}/complete` | 200 |
| Cancel | POST | `/checkout_sessions/{id}/cancel` | 200 |
### Session State Machine
```
not_ready_for_payment → ready_for_payment → completed
| | |
+──────────────────────+→ canceled ←────+
|
in_progress
|
authentication_required
```
The five core status enum values are: `not_ready_for_payment`, `ready_for_payment`, `completed`, `canceled`, `in_progress`. Note that `authentication_required` is a transitional/conditional state (returned during 3DS flows), not one of the five core status values.
The merchant controls status transitions. The agent reads the status and reacts.
### Required Headers (Every Request)
- `Authorization: Bearer <token>` — REQUIRED
- `API-Version: YYYY-MM-DD` — REQUIRED
- `Idempotency-Key: <UUID>` — REQUIRED on all POST
- `Content-Type: application/json`
### Core Data Objects
- **CheckoutSession** — The central primitive: ID, status, currency, line items, fulfillment options, totals, messages, links, payment provider
- **Item** — `id` + `quantity` (sent by agent in create/update)
- **LineItem** — Merchant's expanded view: base amount, discount, subtotal, tax, total, name, description, images
- **Total** — Typed breakdown: `items_base_amount`, `items_discount`, `subtotal`, `discount`, `fulfillment`, `tax`, `fee`, `total`
- **FulfillmentOption** — Shipping/digital/pickup/local delivery with pricing and windows
- **Address** — Buyer's fulfillment address
- **Buyer** — First name, last name, email, optional phone
### Monetary Values
All amounts are **integers in minor currency units** (cents). `$19.99` = `1999`. Floating-point is prohibited.
### Messages
The `messages[]` array allows merchant-to-agent communication:
- Inform the agent about restrictions, policies, or required actions
- Messages have types (info, warning, error) that influence agent behavior
### Links
The `links[]` array provides actionable URLs with spec-defined link types:
- `terms_of_use` — Merchant terms of use page
- `privacy_policy` — Merchant privacy policy page
- `seller_shop_policies` — Merchant shop policies page
### Create Flow
1. Agent sends items + optional buyer info + optional address
2. Merchant validates items against inventory
3. Merchant computes line items, fulfillment options, totals
4. Returns session with `not_ready_for_payment` or `ready_for_payment`
### Update Flow
1. Agent sends modified items, address, fulfillment choice, or buyer info
2. Merchant revalidates and recomputes everything
3. Returns updated session with new status
### Complete Flow
1. Agent sends payment data (SPT from delegated payment)
2. Merchant processes payment via PSP
3. On success: returns session with `completed` status + order details
4. On 3DS required: returns `authentication_required` + authentication challenge
5. Agent must handle 3DS and retry complete with authentication result
### Error Handling
- All errors return flat objects: `type`, `code`, `message`, `param`
- Use `param` (JSONPath) to indicate which field caused the error
- Handle idempotency conflicts (422) and in-flight duplicates (409)
Fetch the OpenAPI spec for exact request/response schemas, field types, and all possible error codes before implementing.Related Skills
woo-checkout
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
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
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
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
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
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
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.
shopify-api-rest
"MIGRATION SKILL: Shopify REST Admin API — endpoint patterns, authentication, rate limits, and REST-to-GraphQL migration guide. The REST Admin API is deprecated (October 2024). Use this skill only for maintaining legacy integrations or planning migration to GraphQL."
saleor-checkout
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
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
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.
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.