#savan3280_api

1 messages ยท Page 1 of 1 (latest)

fleet pathBOT
#

๐Ÿ‘‹ 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.

north crystalBOT
#

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.

balmy flame
#

Which version of stripe-python are you using?

waxen jetty
#

hm, 2.49.0

balmy flame
waxen jetty
#

wow. i didnt realize it was so old. are there breaking changes from 2->9?

balmy flame
#

Major version changes usually have have breaking changes. Here's the migration guide between versions: https://github.com/stripe/stripe-python/wiki

GitHub

Python library for the Stripe API. . Contribute to stripe/stripe-python development by creating an account on GitHub.

waxen jetty
#

thanks, i'll check i tout

balmy flame
#

No problem! Happy to help ๐Ÿ˜„

waxen jetty
#

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

balmy flame
#

Stripe Client is introduced in v8. If you wish to maintain the old service-based call pattern, v7 and below can be used

waxen jetty
#

I have a different questiono about resume. should I start a different thread?

balmy flame
#

It's fine to stay with this thread ๐Ÿ˜„

waxen jetty
#

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?

balmy flame
#

Can you share the subscription ID (sub_xxx)?

waxen jetty
#

sub_1PAjxGJJCQbUhES2sT0nG6qb

#

in this case i want to extend the trial rather than resume it as active

balmy flame
#

In sub_1PAjxGJJCQbUhES2sT0nG6qb, the subscription is still paused. When did you resume the subscription?

waxen jetty
#

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",
)

balmy flame
#

Can you share the subscription ID (sub_xxx) that has been resumed, but the trial doesn't remain?

waxen jetty
#

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)
balmy flame
#

How did you pause the subscription in sub_1PAk7WJJCQbUhES2fFaIUksU while it's still in trial?

waxen jetty
#

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

balmy flame
#

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?

waxen jetty
#

ok, that's the behavior i saw

#

I am trying to find a way resume a paused trial as a trial

balmy flame
#

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

waxen jetty
#

ok, i will look for another way. mainly trying update the trial date before it gets paused i guess

#

thanks again-

balmy flame
#

No problem! Happy to help ๐Ÿ˜„