#tetthys

1 messages ยท Page 1 of 1 (latest)

jagged narwhalBOT
granite violet
#

Hi there!

urban wasp
#

Hi

#

I'm new to payment gateway

granite violet
#

usually you create a product first, then you add prices to the product. Both can be created with the API or directly in the dashboard.
and you pass the price ID to the Checkout Session

urban wasp
coral sorrel
#

Hi ๐Ÿ‘‹ I'm jumping in as my teammate needed to step away. You're correct, secret keys are used for server-side code, while your publishable key is used within your client-side code.

urban wasp
#

Or official docs??

coral sorrel
#

Are you still looking at the Checkout Session example that you linked initially? That flow doesn't require the use of your publishable key.

Your client-side code will need to have your publishable key if you're embedding Stripe Elements or Stripe.js into it.
For instance, you see it used in this section where the documentation talks about setting up client-side coding to use our Payment Element:
https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-collect-payment-details

Securely accept payments online.