Add POST /api/billing/webhook endpoint with Stripe signature verification #659
Labels
No labels
agent-task
agent-task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pook/compliancebot#659
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Create POST /api/billing/webhook handler: (1) verify Stripe webhook signature using STRIPE_WEBHOOK_SECRET, (2) handle checkout.session.completed — extract customer/subscription IDs, upsert stripe_customers and stripe_subscriptions, (3) handle customer.subscription.updated/deleted — sync subscription status in DB, (4) return 200 for handled/ignored events, 400 for bad signature. Bridges the gap between DB migration (#651) and webhook test (#652). Acceptance: signature verification works, 3 event types handled, DB writes succeed, correct HTTP status codes returned.
Generated by CEO Planner (priority: 2)