#isxander-subscription-upgrade-cancel
1 messages · Page 1 of 1 (latest)
Hello isxander, we'll be with you shortly! Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
• isxander, 17 minutes ago, 6 messages
• xander-cli-forward, 1 hour ago, 31 messages
• isxander, 19 hours ago, 56 messages
Stripe automatically retries failed webhook events on regular interval so if your webhook endpoint is up when Stripe retries (which happens multiple times) then your integration should be able to handle cancellation
Otherwise, what you can also do is call the list all events API and filter with delivery_success and type parameters
https://stripe.com/docs/api/events/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.
Should I worry about this then? Is it documented how long Stripe retries for until it gives up trying to send the webhook?
We have it documented here
https://stripe.com/docs/webhooks#retries
Okay 3 days sounds long enough. Thanks a lot for all the help.
NP! 🙂 Happy to help
Sorry, I do have one more question; I have multiple subscription plans, but they cannot be subscribed to at the same time. I have already implemented a failsafe before I create the checkout session, but is there a way to prevent users from renewing other plans through the portal when they already have a plan subscribed?
Also I must say the support here is exceptional, thanks for being so prompt!
I have multiple subscription plans, but they cannot be subscribed to at the same time. I have already implemented a failsafe before I create the checkout session, but is there a way to prevent users from renewing other plans through the portal when they already have a plan subscribed?
I believe you can tweak the portal configuration to not allow switching prices
https://stripe.com/docs/api/customer_portal/configurations/create#create_portal_configuration-features-subscription_update
Would recommend trying it out in test mode
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Oh I haven't done them as prices but separate products. I thought prices was to offer say GBP vs USD for the same thing?
You can also configure prices for specific products I think
https://stripe.com/docs/api/customer_portal/configurations/create#create_portal_configuration-features-subscription_update-products
I don't think that's what I mean, each subscription tier is a different product not price
hmm maybe I am misunderstanding. Do you have a screenshot of the UI or an example for the usecase?
that'd help be on the same page
so I have two sets of subscription plans, for buyer and developer
If someone first gets e.g. bronze buyer, then upgrades to unlimited buyer, how do I prevent them from going into the portal and renewing the bronze. so they have to plans active
How exactly are you upgrading these subscriptions?
Are you just creating a new subscription linked to the higher price?
Ideally you'd just have these tiers under same product
but I think you can upgrade the sub to a diff product's price, yes
Haven't tested it myself but should be possible
I check if my account already has a subscription associated it and immediately cancel is with Subscription#cancel in stripe-java, but it doesn't appear to do anything
Can you elaborate? Like what's happening instead?
Can you share request IDs for the cancellation requests?
https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Can you elaborate? Like what's happening instead?
it's just not cancelling at all, still appears in the portal saying it will renew in a month
I'll get you that api request now
ah, it's saying the subscription doesn't even exist?
req_WOvSs3Fy8BDIyF
how wouldn't it exist if that was what was set in the db
I think you sent the request twice
https://dashboard.stripe.com/test/logs/req_tYUM1WtS0wBnUh
This one succeeded^
the second one failed since the one prior worked
it gets sent twice for some reason but they both fail
There was more than one request, look at the timestamps
This one came in at 2023-10-24 19:42:18 UTC
https://dashboard.stripe.com/test/logs/req_tYUM1WtS0wBnUh
versus the ones that errored, came after that time
so by that time, the subscription was deleted already
ok so turns out that when it failed with an exception, my db never updated with the new subscription ID, however what is strange is that now with that fixed, the cancel method is sending a request for both the old and the new subscription and cancelling it
I definitely only call it on the old one
all working now, i was provisioning the subscription from multiple webhooks
isxander-subscription-upgrade-cancel