Pay for an HTTP resource
An x402 client handles a resource server’s payment challenge and submits a payment authorization with its retry. It needs a supported signer, sufficient funds and permission to spend; an ordinary HTTP client does not make payments automatically. If you want to charge for a resource instead, start with the merchant guide. For a first end-to-end example, use the quickstart.Choose your client
Follow one complete guide for its installation, signer setup and supported payment schemes. Do not combine snippets from different SDK generations.Understand the payment flow
Before using real funds
- Protect signing keys: do not put private keys in public frontend code or commit them to source control.
- Set spending limits appropriate to the resource and check the advertised amount, network and recipient before authorizing payment.
- Check both payment and resource-delivery outcomes. A failed HTTP response does not prove that a payment did not settle; use the capacity and recovery guidance before retrying an uncertain payment.
- Treat Solana batch settlement as a separate public-preview integration with pinned SDK versions, funded channels and its own recovery procedure, not a drop-in replacement for an exact-payment client.
Need help?
Join our Community
Have questions or want to connect with other developers? Join our Discord server.

