Why Inngest
Without Inngest, you’d need:- A polling cron to check pending sessions
- A background worker for payment verification
- A retry queue for webhook delivery
The 5 functions
Getting started
- Create a free account at app.inngest.com.
- Create a new project.
- Go to Manage → Event Keys and copy your Event Key.
- Go to Manage → Signing Keys and copy your Signing Key.
Environment variables
pnpm inngest:dev) and won’t connect to Inngest Cloud.
Registering the app
After your first Vercel deployment:- In the Inngest dashboard, click Add app.
- Enter your app URL:
https://your-app.vercel.app/api/inngest - Inngest will discover all 5 functions automatically.
Pricing
Inngest charges per step. One complete payment flow uses approximately 4 steps:- 1 step in
sessionLifecycle(subscribe address + sleep) - 1–2 steps in
paymentVerify(verify + finalize) - 1 step in
webhookDeliver(deliver event)
Local development
For local development, start the Inngest dev server alongside the web app:http://localhost:8288 to see function runs, replay events, and debug workflows.
Recovery after an outage
If Inngest is unavailable during active sessions, re-emit lifecycle events after it recovers:session/created events for all in-flight sessions. Each event is deduplicated by session-{id} so running it multiple times is safe.