#BarrelRider
1 messages · Page 1 of 1 (latest)
Either works, they can keep making attempts on that incomplete subscription for up to 24 hours
So whatever makes more sense for you to implement with your flow
Thank you for that. I am just wondering, I can't see anything - if I am sing checkout page hosted by Stripe - is there a piece of docs that shows how to retry existing incomplete subscription?
If you are using Checkout pages, you would re-use the link for the Checkout Session. The user won't be able to start their subscription until payment on that page succeeds
Hmm stripe seems to create brand new subscription when I try to subscribe again. How to I reopen the same subscription while redirecting to checkout page for failed scenario? 🤔
You would have to re-send the original Checkout link
Checkout Sessions are also valid for 24 hours, so you would want to find the session you already created and direct your user to its URL
oh I see, so it all comes down to two options, I would probably have to save it to the database when user fails to pay and serve it on retry within 24 hours OR I could just remove everything from my database regarding that failed transaction, completely ignore the one on stripe as it will die off within 24 hours anyway and start a brand new one
Is that correct? Sorry to be a pain I am just trying to be through.
Yeah, that sounds right. The one thing you would have to look out for is that if you are making an API call that lists subscriptions for the user, you would need to make sure to only list active subscriptions if you only want to work with active ones. I think that any subscription that isn't cancelled or expired will show up on the list subscriptions call if you don't specify a status
I see. Just to clarify I assume that by the "active subscription" I can understand the one that has been paid for so I am giving users access only if I have "active" or "trailing status". I do not offer grace periods.
For incomplete, unpaid, I will allow users to reuse the checkout link, for incomplete_expired I will simply give them new checkout link.
For past_due status - I assume this is when they will remove payment method and not pay I will just cease giving access to the services.
Please let me know if I am asking too many questions - am I still on the right track here?
Always happy to answer questions here as long as they are about our API.
Those first two sound right, for past_due, I will note that that can be recoverable
Sometimes it happens because the user had insufficient funds and then a retry will succeed
Or you can reach out to them and ask for new payment method info (there is even a Stripe setting to have us automatically send them an email about that)
perfect thank you, I think I have sufficient amount of information for now
you've been very helpful
I am sure I will be back for more!
Awesome, glad I could help!
Oh sorry one more thing, I see in docs that you do not allow for retrieval of existing checkout URL's I need to save it on my side?
I mean from subscription point of view, If I only have subscription with incomplete status Iwas wondering if php client for stripe can get me the URL based on failed sub?
Not based on the subscription itself, you would need to retrieve the Checkout Session itself. That will have the URL
You can also use the list Checkout Sessions call if you have enough info to filter for the right one https://stripe.com/docs/api/checkout/sessions/list
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.