#adamt - ReactJS
1 messages · Page 1 of 1 (latest)
{clientSecret: "sk_test_51JsxTXJlVOw...f"}
(NOT with Stripe) That's not the "client_secret" from the paymentIntent/setupIntent; that's your API test secret
Where can I get that?
(NOT with Stripe) You'll need to read the documentation on paymentIntents/setupIntents, but in general they are created server-side; the creation calls return the client_secret, which the server sends/returns to the client/frontend to create the elements.
You have to create the Intent first, then use the elements to gather the data
Just wanted to echo the above. I would recommend starting here and following the React guide: https://stripe.com/docs/payments/quickstart
(NOT with Stripe) couple points re: API secret - if it gets exposed publically (such as on this server), you really should roll it, and it really should only be used server-side