#maksym-y_code
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/1432384593390075964
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Yep ECE the supports subscription mode. Is there something that a specific doc said that implied it only supports payment mode?
Just see in doc the mention only about mode=payment and received some error for key.
Ok, if you're confirming that ECE works with mode=subscription we need to double check our implementation.
Maybe you have any examples to share?
No example to share unfortunately, I just tested on my local server. Getting it to render in subscription mode should be as simple as passing in mode: 'subscription' when initializing Elements. The other changes will all be server-side where you are creating a subscription and confirming its first intent
Is there a specific piece of this that you are running in to issues with?
OK, thanks. I just want to validate all our flow and be sure that we're doing it right.
When you are saying intent is it payment intent? Because we're creating a checkout session on our backend side to get client_secret to return to the front side.
The front side is init checkout session how it described here https://docs.stripe.com/payments/quickstart-checkout-sessions?client=html
Then we're trying to use ECE to have the ability to make a fast checkout for subscription.
What is the format for client_secret key should be? cs_test... for testing in the sandbox, right?
Oh sorry I blanked that you mentioned Checkout and was talking about something slightly different. You are doing this the right way for custom checkout + ECE
Yes, our goal is to use Checkout Session API and ECE for subscription.
So, than we can use it like this and everything should work like a charm, right? ๐
const elements = stripe.elements({
locale: 'de',
mode: 'subscription',
amount: 1099,
currency: 'usd',
});
Thanks a lot for your help ๐