#shohan-mir_api

1 messages ¡ Page 1 of 1 (latest)

plain boneBOT
#

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

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

pearl basin
obtuse elbow
#

Yeah I've already checked it. But the problem is, it is not possible to migrate the subscription from schedule to normal update. And I'm getting an error.

#

Is it possible through the customer portal that a user can upgrade from monthly to monthly or yearly to another yearly plan with proration cost, but when it comes to an upgrade plan from a monthly plan to yearly plan then the user has to pay the yearly full payment. And for downgrade, downgrade will apply at the next billing cycle until then the current plan will continue?

pearl basin
#

What error did you get?

obtuse elbow
#

StripeInvalidRequestError: You cannot migrate a subscription that is already attached to a schedule: sub_sched_1Q1lrxB84jWnFmRfeMK3xeu3.

pearl basin
obtuse elbow
#

Ok

#

req_ltdYiXOXjS82TZ

#

I tried to release the schedule before updating the plan using stripe.subscriptions.update. because stripe subscriptionSchedule doesn't have payment_behavior. So I get that error.

pearl basin
#

This request is to create a new schedule from an existing subscription

obtuse elbow
#

Look here, at first I release it, then tried to update the subscriptions.

pearl basin
#

No, you should call stripe.subscriptionSchedules.release to release the schedule, not update it.

obtuse elbow
#

Oh

#

Okay.

#

Can you hold for a minute?

obtuse elbow
#

Is there any other way to subscription will only update when user will pay through stripe invoice?

pearl basin
#

Sure, you can listen to invoice.created event and set its auto_advance to false

#

So that you can direct your customer to the invoice's hosted invoice page to complete the payment.

obtuse elbow
#

through webhook?

pearl basin
#

Yes you are right

obtuse elbow
#

Ok got it.

#

Thanks for your help. Really appreciate it.