#annex2040_best-practices

1 messages ¡ Page 1 of 1 (latest)

pastel ospreyBOT
#

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

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

spark abyssBOT
sage locust
#

What do you plan to update on the subscription?

jovial sinew
#

i have one product and it has three plans

i already done buy-subscription feature where i generate checkout session token so on frontend side user can pay subscription amount but i not able to find code for update plan using checkout session token

#

i wants a code where i give current subscription_id of user and plan_id of update plan

sage locust
#

After the Checkout Session is created, the Checkout Session can't be updated

jovial sinew
#

no i dont wants to udate checkout session

#

update ?

sage locust
#

What do you want to update specifically? Can you illustrate in an example?

jovial sinew
#

i have django apis backend which i used to run subscription feature in that -

  1. we have plans and there stripe_plan_ids
  2. i have users
  3. user can buy plan subcription also change plans

now i wants a update-subscription api where i give plan_id and user_id
i wants to create a update plan sucription session so on frontend side user can do payment for updating payment ?

how should i do ?

sage locust
spark abyssBOT
jovial sinew
#

ok than whats now how can user pay for updating plan ?

timber junco
#

Hi @jovial sinew I'm taking over this thread

#

If your customer changes plan through billing portal, they can choose the existing payment method, or add a new payment method for the subscription.

jovial sinew
#

i want somthing like that

  1. i give users current subscription_id and also the plan_id which i needs to update into it

  2. user pay amount for that new upgrate plan

  3. and on stripe customar old subscription needs to we cancel and new plan subscription will activate ?

timber junco
#

Why do you want to cancel the old subscription?

jovial sinew
#

i mean i wants switch user-subscription to new plan ?

#

when user update to new plan

timber junco
jovial sinew
#

yes what in that way user cant pay - i wants to create session token for update plan so user can pay ? after payment we update plan ?

timber junco
#

In fact no user interaction is needed (unless 3DS authentication is request) when you change a subscription.