#society-paymentelement-nextjs
1 messages ยท Page 1 of 1 (latest)
Hey, thanks for reaching out ๐
society-paymentelement-nextjs
Okay so I am not good at Next.js or React and barely understand those. But the error message is quite explicit/clear and says you can't render the element until after you have a client_secret available
are you sure process.env.STRIPE_CLIENT_SECRET is correct? Because it's really abnormal to use an environment variable to store a client secret. Like that doesn't really make sense
does it work if you hardcode a value?
the client secret supposed to be created by a payment intent server-sided or the one from the dashboard?
My goal is to create a form where a user can pay and create his account at the same time.
So then, ill process the form data in the server - create a stripe customer and execute the subscription on that user that just got created
yeah that's not really how any of this works ๐
You're supposed to create the Customer and the Subscription upfront and use the underlying PaymentIntent that is created for you to confirm client-side
Read carefully through https://stripe.com/docs/billing/subscriptions/build-subscriptions
there's no way for me to make a form where i can implement even card element? then ill process the data sent from the form and create the customer account and link the subscription?
Im trying to make it all in 1 form
there are many ways to integrate
yeah thats kinda confusing ๐
So it depends a lot on what you are doing. But if you are building an entirely new integration I would highly recommend following that guide first