#joseant99.client-secret

1 messages · Page 1 of 1 (latest)

night terrace
#

Hello, how can I help?

brave orbit
#

my problem is that I don't know what the clientSecret is

night terrace
#

Are you working with Payment Intents?

brave orbit
#

yes

night terrace
#

Great! So the client_secret is the parameter on the Payment Intent object that is used with Stripe.js to confirm the payment (and handle any required authentication)

brave orbit
#

fetch("/create-payment-intent", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ items: [{ id: "xl-tshirt" }] }),
})
.then((res) => res.json())
.then((data) => setClientSecret(data.clientSecret));
}, []);

#

I use this, in items id I have to add the id of a product that says no?

#

@night terrace hello?

night terrace
#

Sorry, had to step away

#

There's no items parameter when creating a Payment Intent

brave orbit
#

okey thanks