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 → Merchantxyz.fd.prism_payment is present and proceeds to checkout.
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 declarationid and version, with the x402 object as config, and returns it in the session.
Agent → Merchant
config and passes it to the wallet.
3. Payment Authorization
The agent’s wallet receives theconfig as paymentRequirements. No HTTP request goes out at this step — everything happens locally inside the TEE.
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
transferWithAuthorization on BSC, verifies the transfer, and returns:
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