Skip to main content
An AI agent buys one pair of “Classic Crew Socks - Black / M” ($12.99) from an ACP merchant, paying in USDC on Base Sepolia. Each step shows what the agent sends, what the merchant does behind the scenes, and what Prism returns.

1. Discovery

The agent checks if the merchant supports ACP. Agent → Merchant
Agent receives:
The agent confirms ACP is supported, extracts api_base_url, and proceeds.

2. Product Feed

The agent fetches the merchant’s product feed and finds the item. Agent → Merchant
Agent receives:
The agent selects var_socks_blk_m and proceeds to checkout.

3. Create Checkout Session

The agent sends the item. The merchant calls Prism to get x402 payment requirements and returns them in the session. Agent → Merchant
Merchant → Prism (background)
Agent receives:
The agent reads status: "collecting_information" and required_fields. Buyer info and a shipping address are needed.

4. Session Update

The agent provides buyer info and the shipping address. The merchant recalculates totals and re-fetches the Prism config with updated amounts. Agent → Merchant
Merchant → Prism (background, re-fetch with updated total)
Agent receives:
Status is now ready_for_payment. Total: $20.02. The config.accepts amount has been updated to "20020000" (20.02 USDC).

5. Payment Authorization

The agent extracts config from the handler and passes it to the wallet. No HTTP request goes out; everything happens locally in the wallet.
The wallet output contains:
  • paymentPayload.accepted: the option the wallet chose (USDC on Base Sepolia)
  • paymentPayload.payload.signature: EIP-712 signature over the authorization
  • paymentPayload.payload.authorization: EIP-3009 params (exact value, exact recipient, time-limited)
  • paymentRequirements: echo of the chosen accepts[] item
The private key never leaves the enclave. Only the signed authorization exits.

6. Complete Checkout

The agent submits the signed wallet output as the credential, adding type: "default" discriminators. Agent → Merchant
Merchant → Prism (background) The merchant extracts paymentPayload and paymentRequirements from the credential (stripping the ACP type fields) and forwards them to Prism:
Prism executes the ERC-3009 transferWithAuthorization on Base Sepolia, verifies the transfer, and returns:
Agent receives:
The socks are ordered. 20.02 USDC has settled on-chain to the merchant’s wallet on Base Sepolia.

Testing

Use the Prism gateway with your own account and small amounts to validate the full flow end-to-end against real on-chain settlement.

Merchant Guide

Step-by-step implementation for the merchant server

Agent Guide

Step-by-step implementation for the agent
Last modified on July 10, 2026