#sai-rez_best-practices

1 messages ยท Page 1 of 1 (latest)

signal larkBOT
#

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

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

dry siren
#

Hi ๐Ÿ‘‹ to clarify, this is regarding creating a Subscription rather than updating it?

Which one we would recommend would depend on your flow and what you need to happen. The different values for payment_behavior and the behavior they cause is outlined in our API ref:
https://docs.stripe.com/api/subscriptions/create#create_subscription-payment_behavior

With the flow shown in that guide, you use default_incomplete becase the Subscription is being created on the server but you're going to confirm/process the payment from client-side code. So you use default_incomplete to avoid the Subscription trying to automatically process the first payment.

ocean halo
#

Hey Toby, yes in regards to creating a subscription, ok thanks for clarifying that's good to know. Is confirming on client side the recommended way?

dry siren
#

It's fine unless you have a need for server-side confirmation, so it depends on your business requirements.