Customer.valid_subscriptions should exclude SubscriptionStatus.incomplete
See original GitHub issueIf people use Payment Elements to sell subscription by following this guide https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements#install-setup
People will create subscription using code below:
subscription = stripe.Subscription.create(
customer=customer_id,
items=[{
'price': price_id,
}],
payment_behavior='default_incomplete',
expand=['latest_invoice.payment_intent'],
)
This will create Subscription
which has incomplete
status (before we confirm the payment), and I do not think it is valid_subscriptions
@property
def valid_subscriptions(self):
"""
Returns this customer's valid subscriptions
(subscriptions that aren't canceled or incomplete_expired).
"""
return self.subscriptions.exclude(
status__in=[
enums.SubscriptionStatus.canceled,
enums.SubscriptionStatus.incomplete_expired,
]
)
I think we should update Customer.valid_subscriptions
to exclude enums.SubscriptionStatus.incomplete
as well.
Thx.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Remove subscription valid/active/current inconsistencies #490
Calling this method with no plan and multiple valid subscriptions for this customer will throw an exception. :type plan: Plan or string ...
Read more >Subscription status explained—incomplete, past_due, unpaid…
incomplete_expired - if the subscription is in incomplete for 23 hours, then the customer is not billed and the subscription is effectively ...
Read more >How subscriptions work | Stripe Documentation
The subscription status may be incomplete if customer authentication is required to complete the payment or if you set payment_behavior to default_incomplete ....
Read more >Stripe Create subscription returns Status - Incomplete
The subscription will be incomplete if the initial payment failed or required authentication. What is the value of subscription.latest_invoice.
Read more >Laravel Cashier (Stripe) - The PHP Framework For Web Artisans
Retrieving Customers. You can retrieve a customer by their Stripe ID using the Cashier::findBillable method. This method will return an instance of the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@kavdev Fair enough I will look at the Subscription Lifecycle and report back.
I’m a strong +1 on keeping these helper methods around.