Add Stripe invoice.payment_failed webhook handler #831

Open
opened 2026-04-11 21:32:50 -04:00 by pook · 0 comments
Owner

Track payment failures for compliance document subscriptions to prevent silent revenue loss.

Implementation:

  1. Find the existing Stripe webhook handler file
  2. Add a case for 'invoice.payment_failed' event type
  3. On payment failure: log customer ID, subscription ID, invoice amount, and attempt count
  4. Update subscription status in DB to 'past_due'
  5. Do not cancel immediately — Stripe handles retries

Acceptance criteria:

  • Handler processes invoice.payment_failed without errors
  • Subscription status updated to past_due in database
  • Structured logging for admin monitoring
  • Works with existing webhook deduplication logic (#820)

Generated by CEO Planner (priority: 3)

Track payment failures for compliance document subscriptions to prevent silent revenue loss. Implementation: 1. Find the existing Stripe webhook handler file 2. Add a case for 'invoice.payment_failed' event type 3. On payment failure: log customer ID, subscription ID, invoice amount, and attempt count 4. Update subscription status in DB to 'past_due' 5. Do not cancel immediately — Stripe handles retries Acceptance criteria: - Handler processes invoice.payment_failed without errors - Subscription status updated to past_due in database - Structured logging for admin monitoring - Works with existing webhook deduplication logic (#820) --- *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#831
No description provided.