Charge for an HTTP resource
An x402 resource server advertises payment requirements and uses a facilitator to verify and settle supported payments. Your application still owns resource delivery, pricing, access control and recovery. If you want to pay for a resource instead, start with the client guide. For a first end-to-end example, use the quickstart.Choose your server
Use a complete framework guide for installation, environment variables and a runnable example. Use a manual flow when you need to control the payment lifecycle directly.
Batch settlement has separate SDK, funding, authentication and channel-recovery requirements. Do not apply an exact-payment example to it unchanged.
Understand the payment flow
Configure PayAI and prepare production
- Follow your framework guide’s PayAI facilitator configuration. Review the free allowance and production pricing; batch verification and settlement require authentication from the first request. Public discovery remains available without a key.
- Keep facilitator credentials on the server. See facilitator authentication for package-based and direct HTTP setup.
- Configure Bazaar discovery if you want to expose supported discovery metadata. Serving an HTTP endpoint alone does not list it automatically.
- For variable charges, follow the dynamic pricing guide and validate that the payment authorization covers the accepted terms.
- Plan for capacity limits, timeouts and uncertain outcomes using the capacity and recovery guidance. A request timeout does not establish that settlement failed.
Need help?
Join our Community
Have questions or want to connect with other developers? Join our Discord server.

