#forthepowersthatb
1 messages · Page 1 of 1 (latest)
Hello
hi
Overall this is a fine way to do it — having extra PaymentIntents created will clutter your Dashboard, but there is no real negative affect of creating a PaymentIntent every time. That said, another way to handle this is to use something like a session cookie and then use the same PaymentIntent for that session unless the cart actually changes.
You can't render Payment Element without the clientsecret, no.
ah ok thanks. i wasnt sure if you could render payment form without client scret
We are working on supporting this in the future, but not possible at the moment.
so then the everytime this page loads it will have to call the api, no way around that
ok thanks!
Well like I noted, you could use a cookie as a workaround
i dont think JS can read cookies
You would add logic to check if a PI has already been created for that Customer based on the cookie.
You would still need to call your backend on page-load, yes.
is that a backend thing?
Yep it would be based on the data you store with the cookie and you would check it in your backend
ok good to know thanks