#savan3280_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1234321631686692955
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- savan3280_unexpected, 3 days ago, 8 messages
Which version of stripe-python are you using?
hm, 2.49.0
stripe.Subscription.resume() is only supported from v5.1.0 and above: https://github.com/stripe/stripe-python/blob/master/CHANGELOG.md#510---2023-02-02
I'd recommend upgrading stripe-python to the latest version, v9.4.0
wow. i didnt realize it was so old. are there breaking changes from 2->9?
Major version changes usually have have breaking changes. Here's the migration guide between versions: https://github.com/stripe/stripe-python/wiki
thanks, i'll check i tout
No problem! Happy to help ๐
actually that looks like a massive amount of change for my code because I would need to start using the client like
client.subscriptions.blah() for everything wouldn't I?
or do the old
stripe.Subscriptions.blah()
still work?
or i guess i could just go up to 5.whatever to get the resume method
Stripe Client is introduced in v8. If you wish to maintain the old service-based call pattern, v7 and below can be used
I have a different questiono about resume. should I start a different thread?
It's fine to stay with this thread ๐
great thanks. I just updated and ran my Subscription.resume. This subscription was a paused trial. When I hit resume i thought the trial would resume but instead the subscription went active.
is there a way to extend a trial onces it has gone past the trial end date and been paused?
Can you share the subscription ID (sub_xxx)?
sub_1PAjxGJJCQbUhES2sT0nG6qb
in this case i want to extend the trial rather than resume it as active
In sub_1PAjxGJJCQbUhES2sT0nG6qb, the subscription is still paused. When did you resume the subscription?
i did it on a different on so i know if i say this it will resume as active:
stripe.Subscription.resume(
subscription_id,
billing_cycle_anchor="unchanged",
)
Can you share the subscription ID (sub_xxx) that has been resumed, but the trial doesn't remain?
that was a paused trial, i resumed it and now it's active
you can se in the logs, it was created as a trial
- then i advanced the simulation to get it to pause.
- then i resumed with billing cycle anchor="now" which did nothing
- then i resumed with billing cycle anchor="unchanged" and it activated the sub (instead of extending the trial)
trying to figure it out from this but failing
https://docs.stripe.com/billing/subscriptions/trials#resume-a-paused-subscription
How did you pause the subscription in sub_1PAk7WJJCQbUhES2fFaIUksU while it's still in trial?
i used a simulation clock and advanced the clock beyond the trial end date
i wondered if
Subscription.resume('sub....', billing_cycle_anchor='now')
doesnt play well with the simulation clock in the future
but couldn't prove it
i used a simulation clock and advanced the clock beyond the trial end date
If the test clock is beyond the trial end date, it's expected that the subscription is no longer in trial after resuming it
What is your expected behavior?
ok, that's the behavior i saw
I am trying to find a way resume a paused trial as a trial
Once the subscription is beyond the trial period, unpausing the subscription will become active
A subscription will only remain in trial if the subscription is still in trial period
ok, i will look for another way. mainly trying update the trial date before it gets paused i guess
thanks again-
No problem! Happy to help ๐