#adamt - ReactJS

1 messages · Page 1 of 1 (latest)

craggy saffron
#

Can you console.log what the actual value is to doublecheck?

severe acorn
#

{clientSecret: "sk_test_51JsxTXJlVOw...f"}

mortal light
#

(NOT with Stripe) That's not the "client_secret" from the paymentIntent/setupIntent; that's your API test secret

severe acorn
#

Where can I get that?

mortal light
#

(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.

severe acorn
#

Ok

#

Ill check it out

mortal light
#

You have to create the Intent first, then use the elements to gather the data

craggy saffron
mortal light
#

(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