Feature #11550
openFeature #11348: Integrate stripe subscription module for onboarding companies
After Free trail ends
0%
Description
1. What Happens on Dec 4, 2026 (Trial End Date)
At the end of the trial period on December 4, 2026, Stripe automatically initiates the first billing cycle:
Stripe generates the first invoice:
Stripe creates an invoice for $1.00 USD (as shown under Next invoice $1.00 on Dec 4).
Automatic Card Charge:
Stripe automatically attempts to charge the payment method (credit/debit card) that the customer entered when they signed up.
2. The Two Possible Outcomes
Scenario A: Payment Succeeds (Normal Flow)
In Stripe:
Invoice is marked paid.
Subscription status transitions from trialing $\rightarrow$ active.
Next renewal date advances to Jan 4, 2027.
In your Backend System:
Stripe sends the invoice.paid and customer.subscription.updated webhooks to
onboardingWebhook.controller.js
.
tenantBilling.service.js
records a plan_renewal transaction, extends planExpiresAt, and sends an invoice receipt email to the tenant.
Tenant Experience: Seamless — no interruption in POS or dashboard access.
⚠️ Scenario B: Payment Fails (Expired card, insufficient funds, or bank block)
In Stripe:
Invoice marks as payment failed; subscription changes from trialing $\rightarrow$ past_due.
Stripe initiates its Retry Schedule (Smart Retries): It will attempt to charge the card multiple times over the next few weeks.
Auto-cancel date (Jan 13, 2027): As shown in your screenshot (Auto-cancels Jan 13, 2027), if Stripe cannot collect payment after all retry attempts by January 13, 2027, Stripe will automatically cancel the subscription.
In your Backend System:
The invoice.payment_failed webhook triggers a payment failure alert email with a link for the customer to update their billing card via the Customer Billing Portal.
The tenant enters their grace period (past_due / grace).
If Stripe cancels the subscription on Jan 13 (customer.subscription.deleted), the backend marks the company canceled/suspended and locks access until payment is resolved.
3. What if the Customer Cancels Before Dec 4?
If the tenant clicks "Manage Billing" in their dashboard and cancels before December 4:
They keep free trial access until December 4.
On December 4, Stripe cancels the subscription without charging their card.
so which will prioritize when free trial ends since past due is present in payment fail hook we need to check if it is free trial and payment didn't done than what we should.
Subtasks
Related issues