#sai-rez_best-practices
1 messages ยท Page 1 of 1 (latest)
๐ 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.
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.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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?
It's fine unless you have a need for server-side confirmation, so it depends on your business requirements.