#nicobzz-checkout-price
1 messages ยท Page 1 of 1 (latest)
Hi there ๐ sorry, but I'm not sure I understand your concern. Could you try clarifying?
Yes: for creating a php page for stripe checkout , a page which redirect to the stripe website in order to pay, I copied my price_id and public key from the dashboard, and it didn't work
(I copied this ID in my php code in order for this code to create a session)
So I thought I was doing something wrong. But when I copied this part of code from the stripe documentation, with autocompletion of price_id and public_key (my price_id an my public_key), it worked well. In fact the price_id and public key from the dashboard an code autocompletion of code are different.
It seems to me not right
Just to confirm, did you use your public key, or did you use the secret key as mentioned in the comment within the code.
I did both, both didn't work. I finally tried with public key many times because it seemed to me the good one
Was I wrong?
Yes, server-side code should use your secret key. The public key is intended for operations that need to happen client-side.
maybe I copied the public one, and made a mistake when coping one time the secret one
But what I also don't understand is that connection seemed to work and after it told that price_id was wrong, and my price id from dashobard and autocompletion of code are different
I may have made a mistake too?
Can you clarify what you mean when you're referring to using auto-completion for the price ID?
Yes, I use this part of the documentation from the stripe site:
https://stripe.com/docs/checkout/quickstart
If you are loggin in, then there is a form selector which permit you to select the product you want to sell, then when you select it, it automatically put the price_id in the source code that you can copy to your php file
logged *
Hm, the populated ID is matching the price ID that I'm seeing in my dashboard.
Now the id seem to be the same ๐
I don't understand wheter if I made a mistake or there was a bug on the site, sorry for that
It surprised me that I made a mistake because I checked many times, but maybe I did, sorry if I disturbd you.
Thank you very much ๐
It's hard to say without being able to see it, it's possible that your login session expired and you were just seeing a placeholder value. But glad to hear that you're seeing the right values now!
ok, maybe it s what happened, have a nice day, bie