#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/1235915553512886272
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi! do you need the PaymentMethod on the backend server, i..e do you actually look at any details of it?
if you don't then the guide is simply https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements where you create the Subscription first and confirm client-side.
Atm we use it to add as the default card when creating a customer
To give more context, when trying to create a payment method based on the link provided in OP, i get the error
elements.submit() must be called before stripe.createPaymentMethod(). Call elements.submit() as soon as your customer p
Which then links me to the below flow
https://docs.stripe.com/payments/accept-a-payment-deferred?platform=web&type=payment&client=react#web-fulfillment
Would this flow work closer with what we have atm?
well you need to follow one of the specific guides really(either my one or your one) rather than just the raw API reference
the deferred flow? yes, that's more like what you have now. i.e. https://docs.stripe.com/payments/accept-a-payment-deferred?platform=web&type=subscription .
Following the deferred flow, would the amount and currency properties for Elements be compulsory?
yes
Ok good to know
I will give that try thanks! For future updates, would you say the flow you linked initially - https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements is the most optimum flow when creating a customer and subscription?
they both work, the difference is just if you want to have the backend server more involved in final confirmation.