#chepox_webhooks
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/1296191922930712637
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
.\stripe.exe trigger customer.subscription.created --add subscription:customer=cus_R24na8ucOShUJ7
that does send the event and I am able to catch it in the webhook
but it changes the customer
You basically want to resend evt_3QAcoeRpyK8wByBp15uwOsTW ?
the thing is that event changes the customer id
I want to update the status in my dabatase on the incoming event from stripe
but I need the customer ID to correctly change the correct user
I am unable to simulate an event with a specific customer
So cus_R24na8ucOShUJ7 is the customer you need to send the event for? But there's not an existing event id with that customer's id in it?
I did create a test subscription for that user in the dashboard.
I guess there is an event for that
let me look that one up
Yeah so you should be able to get that event and use https://docs.stripe.com/cli/events/resend
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
found it
so I can resend this particular event via CLI? over and over to continue my testing in my SQL database?
Yeah
Note that You can only resend events that have been created within the last 30 days.
and CLI for that?
yes that's a cli command
stripe trigger <EVENT>?
stripe events resend evt_1QAao4RpyK8wByBpwX1comGE
that did not send it to the webhook. That just displayed the values in the CLI
Did you pass the webhook endpoint? https://docs.stripe.com/cli/events/resend#events_resend-webhook-endpoint
It just sends it to your local listener if you don't specify endpoint id
I do have a local listener
PS C:\Users\Chepo\Documents\Programming\flash-vector\localfiles> .\stripe.exe listen --forward-to localhost:8000/api/stripe/webhook
Ready! You are using Stripe API Version [2024-06-20]. Your webhook signing secret is whsec_123456 (^C to quit)
That was running when you ran that command and it didn't receive the event?
yes
i just tried with .\stripe.exe trigger customer.subscription.created --add subscription:customer=cus_R24na8ucOShUJ7
and that triggers the webhook
.\stripe.exe events resend evt_1QAao4RpyK8wByBpwX1comGE --webhook-endpoint=we_123456 does not
wrong we_123456??
If you don't specify webhook endpoint at all it should send to local listener. In the logs it shows it sent it
webhook secrete is different for that event?
oh I think I might know the issue
SignatureVerificationError(message='No signatures found matching the expected signature for payload', http_status=None, request_id=None)
I am getting the event into the webhook now bue getting this error
Are you using the signing secret from the stripe listen command?
no. the one from the endpoint. no the CLI.
Hi, stepping in and catching up.
I just switched the webhooksecrert to the CLI listener provided one with the same result
PS C:\Users\Chepo\Documents\Programming\flash-vector\localfiles> .\stripe.exe listen --forward-to localhost:8000/api/stripe/webhook
Ready! You are using Stripe API Version [2024-06-20]. Your webhook signing secret is whsec_987654 (^C to quit)
success!
the damn .env variable was not reloading for some reason. Had to restart the app and now the correct webhook secret is being used.
Thank you for your help. I should have asked for assistance hours ago.
I was just about to say that the webhook signing secret is different from the CLI vs. your account. We document this here: https://docs.stripe.com/webhooks/signature?lang=dotnet#check-the-endpoint-secret.
If you’re using the Stripe CLI, the secret is printed in the Terminal when you run the stripe listen command.