ZIm/crates/collab/src
Marshall Bowers a4dd92fe06
collab: Prevent users from creating a new subscription when they have overdue subscriptions (#22870)
This PR adjusts the create billing subscription endpoint to prevent
initiating a checkout flow when a user has existing subscriptions that
are overdue.

A subscription is considered "overdue" when either:

- The status is `past_due`
- The status is `canceled` and the cancellation reason is
`payment_failed`

In Stripe, when a subscription has failed payment a certain number of
times, it is canceled with a reason of `payment_failed`. However, today
there is nothing stopping someone from simply creating a new
subscription without paying the outstanding invoices. With this change a
user will need to reconcile their outstanding invoices before they can
sign up for a new subscription.

Release Notes:

- N/A
2025-01-08 22:50:48 +00:00
..
api collab: Prevent users from creating a new subscription when they have overdue subscriptions (#22870) 2025-01-08 22:50:48 +00:00
bin Fix .env.toml paths (#15645) 2024-08-01 15:43:29 -04:00
db collab: Prevent users from creating a new subscription when they have overdue subscriptions (#22870) 2025-01-08 22:50:48 +00:00
llm Stop sending data to Clickhouse (#21763) 2024-12-10 08:47:29 -07:00
rpc Remove dev servers (#19638) 2024-10-24 12:14:03 -06:00
tests Add validation in LspCommand::to_lsp + check for inverted ranges (#22731) 2025-01-06 22:00:36 +00:00
api.rs Send llm events to snowflake too (#21091) 2024-11-22 20:40:39 -07:00
auth.rs Remove dev servers (#19638) 2024-10-24 12:14:03 -06:00
cents.rs Send llm events to snowflake too (#21091) 2024-11-22 20:40:39 -07:00
completion.rs Supermaven (#10788) 2024-05-03 12:50:42 -07:00
db.rs ssh remoting: Show the host's GitHub name in the titlebar when sharing an SSH project (#19844) 2024-10-29 09:52:54 +01:00
env.rs collab: Add support for reading boolean values from .env.toml (#16317) 2024-08-15 17:07:17 -04:00
errors.rs Remove more unused code related to GitHub auth and errors 2022-04-21 08:57:49 -06:00
executor.rs Remove 2 suffix for collab, rope, settings, menu 2024-01-03 12:29:16 -08:00
lib.rs Stop sending data to Clickhouse (#21763) 2024-12-10 08:47:29 -07:00
llm.rs Stop sending data to Clickhouse (#21763) 2024-12-10 08:47:29 -07:00
main.rs Fix crash in collab when sending worktree updates (#19678) 2024-10-24 15:57:24 +02:00
migrations.rs collab: Remove unused parameter to run_database_migrations (#15883) 2024-08-06 17:31:52 -04:00
rate_limiter.rs chore: Fix several style lints (#17488) 2024-09-06 11:58:39 +02:00
rpc.rs Start to split out initialization and registration (#21787) 2024-12-11 14:05:10 -07:00
seed.rs collab: Seed GitHub users from static data (#18301) 2024-09-24 16:35:09 -04:00
stripe_billing.rs collab: Anchor new subscription's billing cycle to the first of the month (#19367) 2024-10-17 10:18:12 -04:00
tests.rs Use LiveKit's Rust SDK on Linux while continue using Swift SDK on Mac (#21550) 2024-12-05 15:06:17 -08:00
user_backfiller.rs collab: Require github_user_created_at at ingress points (#17180) 2024-08-30 17:09:59 -04:00