Skip to main content
An AI agent buys one “Coldplay World Tour - Floor Standing GA” ticket ($120.00), paying in FDUSD on BSC. Each step shows what the agent sends, what the merchant does behind the scenes, and what Prism returns.

1. Discovery

The agent checks the merchant’s UCP profile. The merchant fetches the handler declaration for its UCP version from Prism and returns it. The merchant caches this declaration. Agent → Merchant
Merchant → Prism (background)
Agent receives:
Discovery needs no credentials. The agent confirms xyz.fd.prism_payment is present and proceeds to checkout. From here on, every request carries UCP-Agent, and a credential when the store requires one: an X-API-Key the merchant issued for the agent’s profile, or an RFC 9421 signature. See Authentication.

2. Checkout Session

The agent sends their cart. The merchant calls Prism to get the raw x402 payment requirements. It builds the handler entry from the cached declaration id and version, with the x402 object as config, and returns it in the session. Agent → Merchant
Merchant → Prism (background)
Agent receives:
The agent extracts config and passes it to the wallet.

3. Payment Authorization

The agent’s wallet receives the config as paymentRequirements. No HTTP request goes out at this step — everything happens locally inside the TEE.
The private key never leaves the enclave. Only the signed authorization exits.

4. Complete Checkout

The agent submits the signed wallet output as the credential, plus one field: type: "x402". The instrument also has type: "x402" and handler_id: "xyz.fd.prism_payment". Agent → Merchant
Merchant → Prism (background)
Prism executes the ERC-3009 transferWithAuthorization on BSC, verifies the transfer, and returns:
Agent receives:
The ticket is reserved. 120 FDUSD has settled on-chain to the merchant’s wallet. The order id is opaque. Orders are fetched by this id, and only the platform that created the order can read it. There is no endpoint that lists orders.

5. Payment Held for Review

A merchant can hold a settled payment for manual review. The request still succeeds with HTTP 200. The checkout is not completed, so the agent sends the buyer to continue_url. Agent receives:
The payment has been received and the merchant keeps the order on hold until the review ends. A GET of the same checkout session returns the same status, continue_url, and message. Sending the complete request again answers 409 session_requires_escalation.

Testing

Use the production Prism gateway (https://prism-gw.fd.xyz) 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 platform
Last modified on October 9, 2026