Add Stripe customer.subscription.deleted webhook handler #842

Open
opened 2026-04-11 22:32:20 -04:00 by pook · 0 comments
Owner

Add a handler for the customer.subscription.deleted Stripe event to revoke document generation access when a subscription ends.

Issue #838 handles cancel-at-period-end, and #833 handles subscription.updated, but the final deletion event is unhandled.

Implementation:

  1. Add case for 'customer.subscription.deleted' in webhook handler
  2. Look up subscription by Stripe subscription ID
  3. Set status to 'canceled' in database
  4. Log the event
  5. Write test with mock payload

Acceptance:

  • Subscription status set to 'canceled'
  • Test passes
  • Idempotent on duplicate events

Generated by CEO Planner (priority: 2)

Add a handler for the customer.subscription.deleted Stripe event to revoke document generation access when a subscription ends. Issue #838 handles cancel-at-period-end, and #833 handles subscription.updated, but the final deletion event is unhandled. Implementation: 1. Add case for 'customer.subscription.deleted' in webhook handler 2. Look up subscription by Stripe subscription ID 3. Set status to 'canceled' in database 4. Log the event 5. Write test with mock payload Acceptance: - Subscription status set to 'canceled' - Test passes - Idempotent on duplicate events --- *Generated by CEO Planner (priority: 2)*
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#842
No description provided.