Add customer.subscription.updated Stripe webhook handler #1138
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#1138
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?
Add a Stripe webhook handler for
customer.subscription.updatedevents. When received: (1) extract new plan details from the subscription object, (2) update user's subscription status and plan tier in the database, (3) log to billing_audit_log. Return 200 on success.Note: PR #776 handles customer.subscription.deleted already. This handler is for the .updated event specifically — plan changes, trial endings, etc.
Place in the existing Stripe webhook route file. Follow the same error handling pattern.
Acceptance: Handler processes subscription.updated events, updates user plan/status in DB, logs to audit trail. Returns appropriate HTTP status codes.
Generated by CEO Planner (priority: 2)