#Szymon From Poland
1 messages ยท Page 1 of 1 (latest)
Hi there!
Adding your other screenshot here:
You should only mount the Element after you have received the client secret
so basically, after I created a paymentIntent?
Yes. Without a client secret (that comes form a PaymentIntent) you cannot mount the Element.
okay so it works, but when I try to add useStripe, and useElements, I'm getting that and it's just the circle of doom ๐ how should I initialise useElements properly?
because from my understanding i need useStripe & useElements to properly make a transaction
@wraith orchid
Can you try to follow what this guide is doing: https://stripe.com/docs/stripe-js/react
- One file with just the Element component, and without useStripe or useElements
- Another file with the PaymentElement, and with useStripe and useElements
yeah ofc
okay, got it it was because useStripe & useElements needs to be used inside checkout component
thx for help
Happy to help ๐
๐ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
hey @tropic finch!
I have a question if it's possible to add email input to payment element as required to all payment methods, e.g. in card
that's not possible, you'd have to add it yourself