Prerequisites
- A District Pass account
- A Prism Project Identify Token from the Prism Console
- A UCP-compatible commerce server exposing
/.well-known/ucp,/checkout-sessions, and order endpoints
Step 1: Advertise the Handler
When a UCP agent callsGET /.well-known/ucp, fetch the handler definition from Prism and include it in your response:
payment_handlers before responding to the agent:
Step 2: Prepare Checkout via Prism
When a platform creates a checkout session (POST /checkout-sessions), call Prism to get the x402 payment requirements for that order:
payment_handlers field from Prism’s response directly inside your checkout session response. The config field contains x402 payment requirements resolved against your Prism account:
amount as a fiat major-unit decimal string ("120.00" for $120.00 — max decimals must match the currency’s exponent, so USD allows 2). Prism converts it and returns the accepts[].amount values in token base units. The tokens that appear in accepts depend on what you have enabled in your Prism Console:
Step 3: Settle via Prism
When the platform completes checkout (POST /checkout-sessions/{id}/complete), extract the credential from payment.instruments[0].credential and forward it to Prism’s settlement endpoint:
payment.status: "settled" and payment.transaction set to the returned txHash.
Prism Console
Configure your chains, tokens, and settlement address
End-to-End Flow
See a complete request/response trace for the full purchase cycle