-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
a0fca24
commit a4dd92f
Showing
3 changed files
with
162 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters