Add Stripe webhook handler for customer.subscription.deleted event #736

Open
opened 2026-04-11 14:35:22 -04:00 by pook · 0 comments
Owner

Create a handler for the Stripe customer.subscription.deleted event. When a customer fully cancels their subscription (after the billing period ends), mark their subscription as canceled in the database so the subscription-check middleware (issue #720) blocks further /api/generate calls. Acceptance criteria:

  • Handler processes customer.subscription.deleted events
  • Updates stripe_subscriptions status to 'canceled'
  • Sets canceled_at timestamp to current time
  • Logs the cancellation with customer ID and subscription ID
  • Returns 200 to Stripe to acknowledge
  • Follow same pattern as checkout.session.completed handler (PR #718)
  • Add to the existing webhook handler file alongside checkout and update handlers

Generated by CEO Planner (priority: 3)

Create a handler for the Stripe customer.subscription.deleted event. When a customer fully cancels their subscription (after the billing period ends), mark their subscription as canceled in the database so the subscription-check middleware (issue #720) blocks further /api/generate calls. Acceptance criteria: - Handler processes customer.subscription.deleted events - Updates stripe_subscriptions status to 'canceled' - Sets canceled_at timestamp to current time - Logs the cancellation with customer ID and subscription ID - Returns 200 to Stripe to acknowledge - Follow same pattern as checkout.session.completed handler (PR #718) - Add to the existing webhook handler file alongside checkout and update handlers --- *Generated by CEO Planner (priority: 3)*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot#736
No description provided.