#smjarr_react-savecard

1 messages ¡ Page 1 of 1 (latest)

tranquil zenithBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1251287441793355897

📝 Have more to share? Add details, code, screenshots, videos, etc. below.

lone ridge
#

@foggy snow Hello! I don't really follow what you are asking unfortunately so I'm going to need more specific details. PaymentElement runs client-side in a browser and would never ask for (or need) your Secret API key

foggy snow
lone ridge
#

Sorry that's a picture. Let;s ignore the code for a sec I still don't understand what your ask means

#

Are you trying to accept a payment and save card details for future payments. Or only save card details and not accept any payment for now?

foggy snow
#

only save the card for now

lone ridge
#

smjarr_react-savecard

foggy snow
#

yes, we have that functionality in place. It just seems like this PaymentElement (unlike the older CardElement) is only for payment intents? Or is that not the case?

#

With the card element we are currently using it to generate a token and then send to our stripe save payment functionality

lone ridge
#

That's not correct/the case no. PaymentElement works well with PaymentIntent and SetupIntent. The doc I shared is about SetupIntents.
SetupIntentsa re the right way to save card details. The old approach of Token -> Attach to a Customer has been deprecated for over 5 years now. That doesn't handle 3D Secure for example, that's susceptible to card testing, etc.

So really all you need to do is follow the doc I shared above end to end