#stereozwo
1 messages · Page 1 of 1 (latest)
Hi
How can I now attach the customer to the previously created SetupIntent?
No you can't attach a Customer after creating the SetupIntent
you need to create the customer first then create the SetupIntent.
But how can I show the Stripe Payment element on the page if I can't create a SetupIntent beforehand?
In order to create the customer, I have to show him the form and for that I need a SetuptIntent.
You need to invert the flow, create the customer and then create a SetupIntent.
But I need to implement the Payment Element
Is this possible without the SetupIntent?
The Checkout is one Page with the form for the subscriber and the payment
When creating a customer before SetupIntent you are/can still using Elements.
This is my Form. How can I implement the Payment Element without creating the SetupIntent beforehand?
const elements = stripe.elements({clientSecret, appearance}); const paymentElement = elements.create("payment"); paymentElement.mount("#payment-element");
This is how I implement the payment element
the client secret is from the setupIntent I created when the user open this page
Thanks, I will check this out!