#maksym-y_code

1 messages ยท Page 1 of 1 (latest)

broken cedarBOT
#

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

hollow burrow
#

Yep ECE the supports subscription mode. Is there something that a specific doc said that implied it only supports payment mode?

chrome jacinth
#

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?

hollow burrow
#

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?

chrome jacinth
#

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?

hollow burrow
#

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

chrome jacinth
#

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',
});
hollow burrow
#

Yep yep, I would expect it to

#

Same setup works on my ECE page

chrome jacinth
#

Thanks a lot for your help ๐Ÿ‘