#theryanmark
1 messages · Page 1 of 1 (latest)
Hi, can you add more details on how you're triggering these events?
sure locally through the cli
What event are you triggering?
i also see the the respose ifs a 400 respose but the system is loggig the paymet
logging8
whoops the 400 is because i didnt replace the endpoint secret. disregard the last message.
Got it
Can you confirm what event you're triggering?
Also, can you send me how you're triggering the event?
stripe trigger checkout.session.completed
through the cli in a terminal.
also, I am not sure I know where to find my endpoint secret for local use its not in the webhooks section in my dashboard.
Yeah, I do not think you could do this via the CLI.. I tried this on my end.
You'd need to make make API calls in your test mode to trigger these events for your specific products
Your webhook secret should be in your DB: https://dashboard.stripe.com/test/developers
its not this is what i see.
Ah that is because you have not added an endpoint yet, https://stripe.com/docs/development/dashboard/register-webhook/
You'd need to add one to get a webhook secret key
but it won't let me add a localhost edpoint. dont understand what the cli is for if i cant test it locally. if its live cat i just let the process do its thing?
I see what you're looking for... With the CLI, you can forward these events to your local host: https://stripe.com/docs/webhooks/test
stripe listen --forward-to localhost:4242/stripe_webhooks for instance
and that given you a webhook signing secret
so the response with that added is:
2023-04-25 17:59:15 --> product.created [evt_1N0ttHB08C6CKnpkuFLLy2Mw]
2023-04-25 17:59:15 <-- [400] POST http://localhost:5000/payment/hook [evt_1N0ttHB08C6CKnpkuFLLy2Mw]
2023-04-25 17:59:15 --> price.created [evt_1N0ttHB08C6CKnpkfiUtzM1O]
2023-04-25 17:59:15 <-- [400] POST http://localhost:5000/payment/hook [evt_1N0ttHB08C6CKnpkfiUtzM1O]
2023-04-25 17:59:18 --> charge.succeeded [evt_3N0ttIB08C6CKnpk1BtFsIt8]
2023-04-25 17:59:18 <-- [400] POST http://localhost:5000/payment/hook [evt_3N0ttIB08C6CKnpk1BtFsIt8]
2023-04-25 17:59:18 --> checkout.session.completed [evt_1N0ttKB08C6CKnpkVGS4s4o8]
2023-04-25 17:59:18 <-- [400] POST http://localhost:5000/payment/hook [evt_1N0ttKB08C6CKnpkVGS4s4o8]
2023-04-25 17:59:18 --> payment_intent.succeeded [evt_3N0ttIB08C6CKnpk1fac9nMg]
2023-04-25 17:59:18 <-- [400] POST http://localhost:5000/payment/hook [evt_3N0ttIB08C6CKnpk1fac9nMg]
2023-04-25 17:59:18 --> payment_intent.created [evt_3N0ttIB08C6CKnpk14gOLjw3]
2023-04-25 17:59:18 <-- [400] POST http://localhost:5000/payment/hook [evt_3N0ttIB08C6CKnpk14gOLjw3]
still getting the 400 error and i am using the code from here:
https://stripe.com/docs/payments/checkout/fulfill-orders#create-event-handler
am getting a error message of:
No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe? https://github.com/stripe/stripe-node#webhook-signing
I'll have to dig into this later. this sets me on the right path.
Sounds good!