#pkdiscgolf_code

1 messages ¡ Page 1 of 1 (latest)

rose whaleBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1341492910323011596

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

warm hazel
#

hiya! it looks like you're passing in your secret key at a glance

#

let me sanity check something

#

yeah you want to be passing in the client secret from a payment intent

#

i would direct you to the "accepting a payments" guide rather than startihg straight on the react JS reference. let me find that for you

#

this is basically a "hello world" guide for creating and accepting payments:
https://docs.stripe.com/payments/accept-a-payment?platform=web&ui=elements

you can almost copy / paste verbatim code from that and get an example up and running. but yeah the short answer is that you're skipping a few steps, you want a backend that creates a payment intent, and then you return the client secret from that to the frontend and use that to initialize elements

supple delta
#

OK, ill start there. Thanks