PixelDance
API Reference

API Reference

REST endpoints for the Hono + Bun API server running on port 3002.

The API server (apps/api) is built with Hono + Bun.

Base URL

EnvironmentURL
Localhttp://localhost:3002
Productionhttps://api.your-domain.com

Endpoints

GET /health

Health check — used by uptime monitors and load balancers.

Response: 200 OK, body: OK

curl http://localhost:3002/health
# OK

GET /cron/keep-alive

Keeps the database connection warm. Triggered by a cron scheduler.

Response: 200 OK

{ "ok": true }
curl http://localhost:3002/cron/keep-alive
# {"ok":true}

POST /webhooks/payments

Receives Stripe webhook events.

Requires a valid stripe-signature header. Run bun run stripe in apps/api to forward events locally via the Stripe CLI.

Headers:

HeaderRequiredDescription
stripe-signatureYesStripe webhook signature

Handled events:

EventAction
checkout.session.completedFires "User Subscribed" analytics event
subscription_schedule.canceledFires "User Unsubscribed" analytics event

Response: 200 OK

{ "result": { "type": "checkout.session.completed", ... }, "ok": true }

POST /webhooks/auth

Auth webhook endpoint for external integrations.

Body: Any JSON payload

Response: 200 OK

{ "success": true }

Running Locally

cd apps/api
bun run dev

With Stripe webhook forwarding:

bun run stripe

On this page