#fkaib-paymentelement-save
1 messages · Page 1 of 1 (latest)
@gusty whale https://stripe.com/docs/payments/save-and-reuse
fkaib-paymentelement-save
const { paymentMethod, error } = await stripe.createPaymentMethod({
type: "card",
card: cardElement,
});```
So I want to use the stripe.createPaymentMethod in the frontend but I can't retrieve the cardElement. I want to use the PaymentElement instead of CardElement. Is this possible?
Why are you trying to do that though? The doc I linked clearly explained how to properly collect card details securely with a SetupIntent. So that's what you should use, it has a clear React example too
@gusty whale I'm happy to clarify if anything is unclear here, I'm just not sure which part confuses you
Just tried everything on the doc and it worked. thank you very much!