#smjarr_react-savecard
1 messages ¡ Page 1 of 1 (latest)
đ 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.
@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
Sorry I mean the secret created from a call to get the payment intent. We want to be able to save a payment method with this new element rather than process a payment. Screenshot from quickstart guide (https://docs.stripe.com/payments/quickstart?client=react)
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?
only save the card for now
Gotcha so you should follow this end to end guide then: https://docs.stripe.com/payments/save-and-reuse
smjarr_react-savecard
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
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