Getting started with Hono
Start accepting 402 payments in your Hono server in 2 minutes.You can find the full code for this example here.
Step 1: Install dependencies
Step 2: Set your environment variables
.env
file should look like this:
Step 3: Create a new Hono app
index.ts
Step 4: Run the server
Your server is now accepting x402 payments!
Step 5: Test the server
You can test payments against your server locally by following the fetch example or the axios example. Just set your environment variables to match your local server, install the dependencies, and run the examples.Need help?
Join our Community
Have questions or want to connect with other developers? Join our Discord server.