#ak_api
1 messages ยท Page 1 of 1 (latest)
๐ 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/1244980896864534528
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
What's the error?
There's no error as such but when running the stripe file it redirects here : http://localhost:4242/stripe/public/checkout.html but the output is not shown
It should open stripe embebbed checkout page
Can you open the developer console in your browser? There's likely an error there. Screenshots please โ I can't access the links your're sharing as they're local to your system
Oh I see
can you see the screenshot
Can you click in the console tab of the developer tools? Probably some error messages there
..
You request to fetch the clientSecret fails
Could you please check the Network tab and see what is the response?
..
These are just new requests. Could you please reload the page while keeping the dev tools open?
But overall your answer is here โ๏ธ
You need to find out now why the call to fetch the clientSecret is failing and fix it.
I appreciate vanya, But I am purely new to this, Can you please help me out
Basically, in order to display the embedded Checkout on your frontend, you need to generate a clientSecret on the backend. The frontend sends a request that calls the backend endpoint, you should have implemented it if you follow the guide: https://docs.stripe.com/payments/accept-a-payment?platform=web&ui=embedded-form#create-checkout-session
Have you done this step?
Not directly, But by installing the stripe package I ran the code in VScode which already has this code
By doing this, Will this fix the problem ?
And forward the triggers in my stripe acc for successful payments
Which code did you run exactly?
I ran Checkout.html file in VScode.
Where did you download the files from exactly?
If you find the request to get your clientSecret, it will contain the error message that will clarify the problem.
Have you added your Stripe keys to the project?
Those are test keys
It was by-default added
..
See this
From here I download the full app : https://docs.stripe.com/checkout/embedded/quickstart
The Stripe Package Code for creating an Embedded form
{{PRICE_ID}} needs to be the real Price ID
Okay
But in order to investigate such errors quickly on your own, it's best to look for the exact error message.
What happens if you call the endpoint directly? http://localhost:4242/checkout.php
Can I write a random price_ID
I see, So first I need to put my real keys, write a random number in order for it to open up the page that I desire to open,
No, you have to create a real Price and Product (in Test mode) in your Stripe Dashboard and then use the newly generated Price ID price_xxx
Got It, Then
Please try to find the error message first, because it might not be the only problem with your integration, and you need to be able to investigate it on your own. Have you tried opening http://localhost:4242/checkout.php directly in your browser?
Hi there ๐ jumping in as my teammate needed to step away, please bear with me a sec while I catch up.
That error seems to indicate there isn't anything running where you tried to navigate to with your browser. Is your server up and running?
Yes, Actually It runs the stripe page but doesn't give the output, I am sharing the screenshots
..
I am trying to run this, I use Mac and I have installed the necessary libraries
What's the code you're running?
Are you successfully creating Checkout Sessions, do you see evidence of those requests succeeding in the request logs in your Stripe account?
I am runnng this file. Nop, It sends for only first one
It Is sent from the terminal but It doesn't triggers the forwarding and payment intent
This is just a webpage, what's the webserver you're running to go with it?
How familiar are you with building integrations? You can't just run a single html file. That file needs to be served by your server, so it can interact with the other files served by the server, like the checkout.js file it relies on.
I am new to this so, I don't have much Idea, Sorry Toby If I am bothering you. I am just stuck
Sorry, we're here to help with questions related to our API and libraries, but we usually don't have the bandwidth to walk you through learning how to get started building a full end-to-end integration. I can try to answer questions as I have time, but there are other threads ongoing currently that need my attention. It seems to me like your server likely isn't up and running, but maybe I'm mistaken, it's hard to say without more context.
The most recent screenshot you shared is about handling webhook events, but that seems beyond where you may be. Do you have basic payments flowing yet?