Learn x402 through real-world demos of paywalled endpoints and instant payment flows.
x402-examples is an early-stage Java project in the AI payments / x402 ecosystem, focused on cryptocurrency, java, spring, spring-boot. It currently has 4 GitHub stars and 0 forks, and sits alongside related tools like x402-spring-boot-starter, x402-java-client, x402-facilitator.
Website • Documentation • Examples • Twitter
Our examples showcase real-world x402 payment flows you can run and adapt instantly. From protecting endpoints with paywalls to demonstrating full transaction lifecycles, they’re designed to teach by doing. Each example comes with ready-to-use code so you can explore, learn, and integrate x402 in minutes.
| Example | Path |
|---|---|
| src/main/java/tech/mogami/spring/example/WeatherController.java | Server example |
| src/test/java/tech/mogami/spring/example/IntegrationTest.java | Client example |
Protect your APIs with pay-per-call logic using a single Spring Boot annotation.
Use x402 payments into your apps: fetch requirements, sign, and send transactions.
Run your own payment gateway as a Docker image, or use ours online to verify and settle x402 transactions instantly.