> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Agentic Commerce Protocol

> Enable AI agents to complete checkout and delegated payments inside conversational interfaces.

# Agentic Commerce Protocol (ACP)

**The payment rails for AI agents** — HTTP for money.

ACP is a standard for AI-to-AI transactions: secure, delegated, interoperable payments that let
an agent move money without a human holding a credit card.

ACP enables AI agents to complete checkout and delegated payments inside conversational interfaces while keeping your commerce stack in control. It provides a structured protocol for agents to collect order intent, authorize payments, and create orders through deterministic, auditable workflows.

## How ACP Works

```
User (chat/voice) → AI Agent → ACP Handler → Order Created
                        │                         │
                        ├── Collects intent        ├── Validates order
                        ├── Confirms items         ├── Authorizes payment
                        └── Gets authorization     └── Syncs to commerce platform
```

1. **Agent collects intent** — The AI agent gathers order details and payment authorization through natural conversation.
2. **ACP handler validates** — The handler validates the order against your catalog, pricing rules, and inventory.
3. **Payment authorized** — Scoped payment authorization ensures the agent can only charge approved amounts.
4. **Order created** — The order is created in your commerce platform via the Sync Server.

## Key Concepts

| Concept           | Description                                                           |
| ----------------- | --------------------------------------------------------------------- |
| **Intent**        | A structured representation of what the customer wants to buy         |
| **Authorization** | Scoped permission for the agent to charge a specific amount           |
| **Handler**       | Server-side component that validates and executes commerce operations |
| **Binding**       | Connection between the ACP handler and your commerce platform         |

## Why This Design

* **Deterministic checkout** — Orders are validated server-side, never by the LLM.
* **Scoped payments** — Agents can only charge amounts the customer explicitly authorizes.
* **Auditable** — Every step is logged with full traceability.
* **Platform-agnostic** — Works with any commerce backend through bindings.

## When to Use ACP

* **Conversational checkout** — Let customers buy through chat or voice interfaces.
* **Delegated payments** — Authorize agents to make purchases on behalf of users with spending limits.
* **Unified agent workflows** — Single protocol for multiple AI assistants (ChatGPT, custom agents, voice bots).
* **B2B ordering** — Streamline wholesale and recurring orders through conversational interfaces.

## Quickstart

```typescript theme={null}
import { ACPHandler } from '@stateset/acp';

const handler = new ACPHandler({
  apiKey: process.env.STATESET_API_KEY,
  catalogBinding: 'shopify',
  paymentBinding: 'stripe',
});

// Process an agent's checkout request
const order = await handler.processCheckout({
  items: [
    { sku: 'WIDGET-001', quantity: 2 },
    { sku: 'GADGET-005', quantity: 1 },
  ],
  payment: {
    method: 'authorized_token',
    token: 'pay_auth_abc123',
  },
  shipping: {
    address: '123 Main St, New York, NY 10001',
    method: 'standard',
  },
});
```

## Further Reading

* [ACP Overview](/stateset-acp/stateset-acp-overview)
* [ACP Quickstart](/stateset-acp/stateset-acp-quickstart)
* [ACP Endpoints](/stateset-acp/stateset-acp-endpoints)
* [ACP Async Processing](/stateset-acp/stateset-acp-async-processing)
* [ACP Routing](/stateset-acp/stateset-acp-routing)
* [ACP Schemas](/stateset-acp/stateset-acp-schemas)
* [Agentic Commerce Checkout Guide](/agentic-commerce/agentic-commerce-checkout-guide)
