Hono integration demonstrating multi-provider routing and webhook handling. Edge-runtime ready (Cloudflare Workers, Bun, Deno, Node).
cd examples/frameworks/hono
npm install
export STRIPE_API_KEY=sk_test_...
export PAYSTACK_API_KEY=sk_test_...
npm run dev- POST /checkout — body:
{ amount, currency, reference, customer } - POST /webhook/:provider — raw body; verifies signature
Use ngrok / localtunnel + provider sandbox dashboard, or:
curl -X POST http://localhost:3000/webhook/stripe \
-H "stripe-signature: t=...,v1=..." \
-H "Content-Type: application/json" \
-d '{"id":"evt_test"}'- This example uses
@hono/node-serverfor Node.js runtime - Hono is runtime-agnostic and works on Cloudflare Workers, Bun, Deno, and Node
- For edge runtimes, replace
InMemoryIdempotencyStorewith a worker-compatible adapter (e.g., Redis with Cloudflare Workers KV bindings) - The exported
app.fetchcan be deployed directly to Cloudflare Workers