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

# Overview

> Let AI agents buy from your store via ACP and pay with stablecoins, powered by Prism and x402.

Agentic Commerce Protocol (ACP) is an open standard by OpenAI that gives AI agents a shared way to discover merchants, browse catalogs, manage carts, and complete purchases. Prism handles the payment side: it returns the handler declaration, generates x402 payment requirements for each order, and settles the signed payment on-chain.

```mermaid theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
sequenceDiagram
    participant A as Agent
    participant M as Merchant
    participant Pr as Prism

    A->>M: GET /.well-known/acp.json
    M-->>A: Discovery (services, versions)

    A->>M: POST /checkout_sessions
    M->>Pr: GET /api/v2/merchant/acp/handlers (cached)
    M->>Pr: POST /api/v2/merchant/payment-requirements
    Pr-->>M: x402 payment requirements
    M-->>A: Session with composed payment handler

    Note over A: Agent Wallet signs x402 authorization

    A->>M: POST /checkout_sessions/{id}/complete
    M->>Pr: POST /api/v2/payment/settle
    Pr-->>M: { success: true, transaction: "0x..." }
    M-->>A: Order confirmed with txHash
```

## What Prism Does

1. **Handler**. Prism returns the `xyz.fd.prism_payment` handler declaration. Merchants add the x402 payment requirements as its `config` and include the result in their checkout session responses. Chains, tokens, and settlement addresses are configured in the Prism Console.
2. **Payment requirements**. At checkout, Prism returns x402 payment requirements with the correct token amounts and contract addresses already resolved.
3. **Settlement**. The merchant forwards the agent's signed credential to Prism. Prism verifies it, executes the on-chain transfer, and returns the transaction hash.

<CardGroup cols={3}>
  <Card title="For Merchants" icon="store" href="/prism/integrations/acp/merchants">
    Add the Prism handler, prepare checkout sessions, and settle agent payments
  </Card>

  <Card title="For Agents" icon="robot" href="/prism/integrations/acp/agents">
    Discover ACP merchants, sign x402 payments, and complete checkout
  </Card>

  <Card title="End-to-End Flow" icon="route" href="/prism/integrations/acp/flows">
    Follow one complete purchase from discovery to on-chain settlement
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.