#ali-raza_api

1 messages ¡ Page 1 of 1 (latest)

nocturne mortarBOT
#

👋 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/1314520265052393482

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

elfin skiff
#

hi! the approach you posted using pause_collection seems reasonable, was there a problem you were running into with it?

tardy reef
#

No, I haven't tried runing it. I was just curious and I thought it would be good if I can ask the devs first

#

the pause is not a problem for me.
Resuming the subscription is creating confusion

#

as you have seen I did 2 things to resume the subscription

 await this.stripe.subscriptions.update(member.user.Stripe_customer_id, {
          pause_collection: null,
        });

        await this.stripe.subscriptions.resume(subscriptionId, {
          billing_cycle_anchor: 'now',
        });

I am not sure which is the best way to handle this

Ref: https://docs.stripe.com/api/subscriptions/resume

#

also there are some other paramteres in resume STRIPE subscription api. which I am not able to understand

elfin skiff
tardy reef
#

So doing this is fine?

this.stripe.subscriptions.update(member.user.Stripe_customer_id, {
          pause_collection: null,
        });

Manaully un-pausing/resuming the subscription ?

elfin skiff
#

yes

tardy reef
#

Thanks.

#

By the way, can you tell me what is proration_behavior in the resume API?

#

okay, no problem

#

I read the docs