zulip/corporate/lib
Aman Agrawal cfe589e725 stripe: Error on missing invoice for invoice-billed free trial.
An invoice-billed free trial always has an invoice created when it
starts (in process_initial_upgrade), expiring at the end of the
trial. When the trial ended, make_end_of_cycle_updates_if_needed
treated a missing invoice the same as an unpaid one and downgraded
the customer. But a missing invoice means it was never sent on our
end, so downgrading penalizes a customer who never had a chance to
pay. Raise a BillingError instead, so the failure is surfaced for
follow-up rather than silently downgrading them.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 10:06:40 +05:30
..
__init__.py billing: Move zilencer/lib/stripe to corporate. 2018-10-01 15:43:44 -07:00
activity.py activity: Add bot owner information for bot users in activity charts. 2025-12-12 15:21:03 -08:00
billing_management.py corporate: Add BillingSessionCommand for billing management commands. 2026-02-25 16:30:37 -08:00
billing_types.py corporate: Use Literal types for upgrade parameters. 2024-09-24 18:18:26 -07:00
decorator.py request: Use Django 5.2 HttpRequest.get_preferred_type. 2025-07-17 14:37:11 -07:00
registration.py models: Refactor corporate/models.py into models package. 2025-04-08 10:16:35 -07:00
remote_billing_util.py get_identity_dict_from_session: Use overload to avoid unnecessary cast. 2025-12-16 13:00:02 -08:00
stripe_event_handler.py requirements: Upgrade Python requirements. 2026-04-17 15:04:02 -07:00
stripe.py stripe: Error on missing invoice for invoice-billed free trial. 2026-06-02 10:06:40 +05:30
support.py corporate: Add BillingUserCounts dataclass for billable user counts. 2026-04-05 20:47:24 -07:00