Accepting x402 comes down to one thing: answer unpaid requests with a correct 402, and let a facilitator handle the rest.
Send a PAYMENT-REQUIRED header with scheme, network, asset, amount, payTo and timeout, and name the facilitator at the root and in accepts[].extra.facilitator. Check it with our free endpoint report. Field details are in the 402 response.
On a paid retry, call the facilitator's /verify. If it passes, run the handler. Settle once you have a real response, so a crash never charges a buyer. Return the receipt in PAYMENT-RESPONSE.
Return 402 before validating the request body. An agent probing your price should not be told its input is wrong before it has been told what the call costs.
Agents find paid endpoints through discovery indexes and directories. List on AgentPayStore's directory, where every listing gets a public probe-pass grade, and see x402 discovery.
On our facilitator, $0.001 USDC per call. Gas on Base is low enough that one-cent prices are practical.
You need a payTo address that can receive USDC. The facilitator pays settlement gas.
Run it through our endpoint report or the probe-pass grader, and use /facilitator/simulate for a free dry run of a payment.