#s0__0 - CLI webhook secret
1 messages ยท Page 1 of 1 (latest)
it is equal to client_secret ?
client_secret where?
Oh for the parameter where you verify the webhook signature? Yes, that is where you put the secret.
my error is occur in line 23
Stripe\Exception\SignatureVerificationException: No signatures found matching the expected signature for payload in /home/xxxxxx/domains/xxxxxx.net/private_html/plugin/stripe_api/full/lib/Exception/SignatureVerificationException.php:28
Hi ๐ I'm stepping in for @fluid karma
so i am just wondering if my $endpoint_secret is wrong, as i just copy from the webhook generator.
And you are using stripe listen?
But you mention above
how can i found my Stripe CLI webhook secret?
stripe listen is the CLI command for listening to webhook events
what is stripe listen?
WHen you run it, you will get a webhook signing secret value printed out in your terminal
that starts whsec_XXXXXXXX
Okay, so you have configured a webhook listener through the API or your Stripe dashboard?
Okay what is it you are trying to do?
Okay but you need to let Stripe know where to send the requests
Did you use the Dashboard webhook tool?
yes!
i have register the url
and my programme gave a 400 error to stripe
Stripe\Exception\SignatureVerificationException: No signatures found matching the expected signature for payload in /home/yudansnet8/domains/yudans.net/private_html/plugin/stripe_api/full/lib/Exception/SignatureVerificationException.php:28
Okay, so that is a different webhook signing secret.
i am just wondering if my secret is copy wrong
You will need to look in the Webooks table of the Developer page in your Stripe Dashboard.
yes, i press retry several times, still 400
When you test out the Payment Intent, can you share any request IDs associated with those tests?
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
What is the error message you are seeing?
pi_3KlEjvGRGdCFkMmo1wjSRy3a
Stripe\Exception\SignatureVerificationException: No signatures found matching the expected signature for payload in /home/yudansnet8/domains/yudans.net/private_html/plugin/stripe_api/full/lib/Exception/SignatureVerificationException.php:28
Okay so have you tried copying your webhook secret from your Dashboard table?
Have you tried adding any sort of logging to your PHP webhook code?
this is my webhook , just copying from stripe webhook generator
i have just only add insertErrorLog() for my error checking
Right, and that's fine if it's working for you. However, if you keep getting an error then maybe you need to change some things
in line 7 , where can i find this key? or this is correct now?
this code is not fine right now, it say 400 in line 26
becuase of invalid signature
Okay so as I have said, you can find this key on your Dashboard. https://dashboard.stripe.com/webhooks
You click on your registered webhook and in the table it will have your webhook Status, the Events you are listening for the API version, and the Signing Secret. You will need to click "Reveal" to show the secret.
You can then copy/paste the value.
oh got it! its fine right now
Great ๐
can i add my parameter here, to reconize which order is paid when i receive a webhook?
or using PaymentIntent id is safer?
Adding an order ID is a very common use case for appending metadata to your Payment Intent:
https://site-admin.stripe.com/docs/api/payment_intents/create#create_payment_intent-metadata
after webhook received success msg, do i have to check again with my database that the product info and price are match?
or i can trust all the data in webhook with not only the success status?
The entire payment intent object will be returned in the webhook data payload so you can inspect it there if you wish. I would test it out and make sure the behavior is what you expect.
okok many thanks