Skip to main content
Your merchant server needs three things to accept UCP payments through Prism: a discovery endpoint, a checkout call, and a settle call. Everything else (token math, chain selection, x402 formatting) is handled by Prism.

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 calls GET /.well-known/ucp, fetch the handler declaration for your UCP version from Prism and include it in your response. The route is public and needs no API key. Cache the declaration; it rarely changes.
Merge the result into your UCP profile’s payment_handlers before responding to the agent. Add the entry as Prism returns it; do not change its fields:

Step 2: Get Payment Requirements from Prism

When a platform creates a checkout session (POST /checkout-sessions), call Prism to get the x402 payment requirements for that order. This call does not depend on the UCP version:
Prism returns the raw x402 PaymentRequired object, with no wrapper:
Build the checkout entry yourself. Take id and version from the cached handlers declaration. Set config to the object above. Put the entry in payment_handlers of your checkout session response:
Request and response amounts use different units. You send 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:
UCP requires payments to be bound to the specific product or service being purchased. Set resource.url to the unique checkout session URL. The agent wallet includes this URL in the signed authorization, tying the credential to that session.

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:
Prism settles on-chain and returns:
Before you settle, check that the instrument has handler_id xyz.fd.prism_payment, type x402, and credential.type x402. Reject any other value with a UCP error and do not create an order. The extra type field in the credential is safe to forward; Prism ignores it. Return the confirmed order to the platform with payment.status: "settled" and payment.transaction set to the returned txHash.
Do not call the settle endpoint more than once per checkout session. If a complete request arrives for an already-settled session, return the previous order without re-submitting to Prism.

Prism Console

Configure your chains, tokens, and settlement address

End-to-End Flow

See a complete request/response trace for the full purchase cycle
Last modified on October 6, 2026