Project

General

Profile

Edit Copy Actions

Feature #11529

closed

Feature #11348: Integrate stripe subscription module for onboarding companies

Task 1: Complete Stripe Subscription Webhook Lifecycle (Backend)

Added by Divya Inapakurthi 8 days ago. Updated about 14 hours ago.

Status:
Closed
Priority:
Normal
Start date:
10/15/2026
Due date:
10/15/2026
% Done:

100%

Estimated time:
Spent time:

Add

Subtasks


Add

Related issues

Updated by Divya Inapakurthi 7 days ago

  • Due date set to 10/15/2026
  • Status changed from New to Resolved
  • Start date changed from 10/14/2026 to 10/15/2026
  • % Done changed from 0 to 100

Complete Stripe Subscription Webhook Lifecycle (Backend)

Implemented and verified the webhook event lifecycle handling for tenant SaaS subscriptions:

1. Webhook Handlers Implemented
  • invoice.paid:
    - Processes successful renewals and first-time charges.
    - Updates `saasBilling.planExpiresAt` to the new billing cycle date.
    - Clears `past_due` status and resets grace counters.
    - Generates paid transaction record and appends to `saasBillingActionHistory`.
  • invoice.payment_failed:
    - Handles recurring invoice charge failures.
    - Updates status to `past_due` and activates grace period window.
    - Dispatches email notification with payment update link.
    - Logs `Renewal Payment Failed` into `saasBillingActionHistory`.
  • customer.subscription.updated:
    - Synchronizes status transitions (`active`, `past_due`, `canceled`, `trialing`).
    - Correctly captures scheduled cancellations (`cancel_at_period_end: true`) and reversals.
  • customer.subscription.deleted:
    - Handles immediate subscription terminations.
    - Transitions company status to `canceled` / `suspended`.

2. Verification
  • Verified webhook processing and database updates via E2E test scripts.
  • Code passed ESLint with 0 errors.

Actions #2

Updated by Divya Inapakurthi 3 days ago

  • Target version set to sprint (10/12/2026 - 10/31/2026)
Actions #3

Updated by Divya Inapakurthi about 14 hours ago

  • Status changed from Resolved to Closed
Edit Copy Actions

Also available in: Atom PDF