The quickest path to a working h402 integration is a thin gateway that sits in front of your HTTP service. This guide shows how to implement both client and server components using theDocumentation Index
Fetch the complete documentation index at: https://docs.bitgpt.xyz/llms.txt
Use this file to discover all available pages before exploring further.
@bit-gpt/h402 package.
Client and Server quickstart
Server implementation (to h402 gate your resources)
Express code
Explore the Express server implementation for h402 integration.
All examples
Browse all h402 integration examples available in our repository.
Key Points
- The resource server remains completely stateless - all necessary information is encoded in the payment header
- No hidden session state or database required
- Payment verification is deterministic and based on cryptographic proofs
- The same pattern works for any HTTP service, from API endpoints to static files
- Support for multiple payment networks through the same interface
- Adding proper error handling
- Implementing retry logic
- Setting up monitoring and logging
- Using a production-grade facilitator (or use ours
https://facilitator.bitgpt.xyz/)

