Prerequisites
- A District Pass account
- A Prism Project Identify Token from the Prism Console
- An ACP-compatible commerce server exposing
/.well-known/acp.json,/checkout_sessions,/product_feed, and order endpoints
Step 1: Host Discovery
ACP agents discover your store by fetchingGET /.well-known/acp.json. This is a static file declaring your capabilities:
Step 2: Include the Prism Handler in Checkout Sessions
When an agent creates a checkout session (POST /checkout_sessions), call Prism to get the x402 payment requirements for the order and include the handler in your response.
Call Prism
Include in Session Response
Prism returns the complete ACP handler object. Add it tocapabilities.payment.handlers[] in your checkout session response:
amount as a fiat major-unit decimal string ("19.99" — max decimals must match the currency’s exponent). Prism 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: Handle Session Updates
Sessions change as the agent provides information. When the agent updates the session (PUT /checkout_sessions/{id}) with buyer info or a shipping address, recalculate your totals and re-fetch the Prism config with the updated amount.
Return the updated session with:
- New
totals(including tax, shipping) - Updated
configin the payment handler (with amounts reflecting the new total) status: "ready_for_payment"when all required fields are present
Step 4: Settle via Prism
When the agent completes checkout (POST /checkout_sessions/{id}/complete), extract paymentPayload and paymentRequirements from payment_data.instrument.credential (ignore the type fields) and forward them to Prism:
status: "completed". Use the transaction hash as payment proof:
Why Prism is Simpler
Prism Console
Configure your chains, tokens, and settlement address
End-to-End Flow
See a complete request/response trace for the full purchase cycle