#seor_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/1397237750763360438
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- seor_webhooks, 3 hours ago, 51 messages
look, i started my webhook and completed an application flow in local in order to buy a subscription via checkout session. here's the logs:
stripe listen --events customer.subscription.updated,customer.subscription.deleted,checkout.session.completed,invoice.payment_failed --forward-to http://localhost:5002/protected/stripe/webhook
2025-07-22 17:17:39 --> checkout.session.completed [evt_1RnhwlKKWf9Suo52KUoqN7tu]
2025-07-22 17:17:39 --> customer.subscription.updated [evt_1RnhwlKKWf9Suo52uDJklfry]
2025-07-22 17:17:42 <-- [200] POST http://localhost:5002/protected/stripe/webhook [evt_1RnhwlKKWf9Suo52KUoqN7tu]
2025-07-22 17:17:43 <-- [200] POST http://localhost:5002/protected/stripe/webhook [evt_1RnhwlKKWf9Suo52uDJklfry]
Ready! You are using Stripe API Version [2020-08-27]. Your webhook signing secret is whsec_a7bc2d2284b38df66c58d5cd6cf29962f42389db5de2a17e47a4057b25a516b0 (^C to quit)
then i fired this in another command line:
stripe trigger invoice.payment_failed --override payment_method:customer="cus_SjAGnUs5E494Cx" --override invoiceitem:customer="cus_SjAGnUs5E494Cx" --override invoice:customer="cus_SjAGnUs5E494Cx"
Setting up fixture for: customer
Running fixture for: customer
Setting up fixture for: payment_method
Running fixture for: payment_method
Setting up fixture for: invoiceitem
Running fixture for: invoiceitem
Setting up fixture for: invoice
Running fixture for: invoice
Setting up fixture for: invoice_pay
Running fixture for: invoice_pay
Trigger succeeded! Check dashboard for event details.
when i go back to the other shell where the webhook is running, NO EVENTS are received. what am i doing wrong?
hi there, are you receiving any error messages in either shell?
the [200] POST logs in stripe listen indicate that your code is picking up on the events being triggered and responding. there should be something on the dashboard... did you try refreshing?
looking up those event IDs on our backend, I can see that they were successfully received. do you have logging in your code that's printing out? also could you send me your account ID
logging in my code is not printing because there are no events received...
where can i find my account id?
acct_1Kc5KVKKWf9Suo52
found it
try running stripe login just to make sure your CLI is logged in to the account, then try running stripe listen and stripe trigger again
can you paste me the output of stripe listen for that attempt? did you get more [200] responses?
no responses
Ready! You are using Stripe API Version [2020-08-27]. Your webhook signing secret is whsec_a7bc2d2284b38df66c58d5cd6cf29962f42389db5de2a17e47a4057b25a516b0 (^C to quit)
Hi hi! Iโm going to be taking over for my colleague here. Please give me a minute to read back and understand things.
hi, take your time. thanks for the support
What server side language do you use, and what platform are you on (Win, Mac, Linux)?
windows, and nodejs
Ok yay. Do you have http-server installed globally by chance?
let me check
Or npx installed?
no i don't have http-server globally installed
What about npx?
You can just install it in a folder somewhere and kill it later. If you do this in an empty folder (without your app running):
npm i http-server
node_modules/.bin/http-server -p 5002
...And then try the whole process again, but watch the terminal window where you ran the above. Do you get output in that terminal window?
Oh. Windows. Oops. Sorry.
node_modules\.bin\http-server -p 5002
Starting up http-server, serving ./
http-server version: 14.1.1
http-server settings:
CORS: disabled
Cache: 3600 seconds
Connection Timeout: 120 seconds
Directory Listings: visible
AutoIndex: visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: none
Available on:
http://172.29.48.1:5002
http://192.168.0.151:5002
http://127.0.0.1:5002
http://172.18.32.1:5002
Hit CTRL-C to stop the server
Ok cool, now run all your stripe-cli things and see if you get output.
You should see an error, but at least that's output. ๐
i can't see any output
in the webhook listen command shell
just the usual ready bla bla
Can you list out the commands you run, by terminal window (like "1: blah \n2: blah blah" etc)
i run in a shell:
stripe listen --events customer.subscription.updated,customer.subscription.deleted,checkout.session.completed,invoice.payment_failed --forward-to http://localhost:5002/protected/stripe/webhook
then another shell:
stripe trigger invoice.payment_failed --override payment_method:customer="cus_SitR4T1wjSUMwZ" --override invoiceitem:customer="cus_SitR4T1wjSUMwZ" --override invoice:customer="cus_SitR4T1wjSUMwZ"
if i run only:
stripe trigger invoice.payment_failed
int he second shell, then i get the event. but i need to tie that event to a particular customer that previously bought a paid yealry subscription
Ok, try this, in this order:
Terminal 1, wherever you installed http-server:
\node_modules\.bin\http-server -p 5002
Terminal 2:
stripe listen --forward-to http://localhost:5002/protected/stripe/webhook
Terminal 3:
stripe trigger invoice.payment_failed
...Let me know if you see output in Terminal 1 after you run the Terminal 3 command.
in terminal 1 i don't see anything apart from:
Starting up http-server, serving ./
http-server version: 14.1.1
http-server settings:
CORS: disabled
Cache: 3600 seconds
Connection Timeout: 120 seconds
Directory Listings: visible
AutoIndex: visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: none
Available on:
http://172.29.48.1:5002
http://192.168.0.151:5002
http://127.0.0.1:5002
http://172.18.32.1:5002
Hit CTRL-C to stop the server
in terminal 2 i see the event and a 400 error since my flow handles that particular customer which terminal 3 didn't specify
nothing
just this:
Starting up http-server, serving ./
http-server version: 14.1.1
http-server settings:
CORS: disabled
Cache: 3600 seconds
Connection Timeout: 120 seconds
Directory Listings: visible
AutoIndex: visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: none
Available on:
http://172.29.48.1:5002
http://192.168.0.151:5002
http://127.0.0.1:5002
http://172.18.32.1:5002
Hit CTRL-C to stop the server
nothing
2025-07-22 18:12:41 --> invoice.payment_failed [evt_1Rnio1KKWf9Suo52pOMrnzfr]
2025-07-22 18:12:42 <-- [400] POST http://localhost:5002/protected/stripe/webhook [evt_1Rnio1KKWf9Suo52pOMrnzfr]
My current hypothesis is "this is Bill Gates' fault" but we probably should narrow it down further than that...
AHHAHAHAHAHAHAHHA
Is your app running too?
for sure it's uncle bill
yes
How?
[18:04:41.933] WARN (15064): POST /webhook 400 539ms
[18:12:41.910] INFO (15064): WEBHOOK_HANDLER_STARTED @22/07/2025, 18:12:41
[18:12:41.910] INFO (15064): WEBHOOK - INVOICE.PAYMENT_FAILED
[18:12:41.910] INFO (15064): invoice is in status: open
[18:12:42.344] ERROR (15064): Could not fetch subscription purchase record associated to customer with id cus_SjBAnvMEQi413l
err: {
"type": "Error",
"message": "Could not fetch subscription purchase record associated to customer with id cus_SjBAnvMEQi413l",
"stack":
Error: Could not fetch subscription purchase record associated to customer with id cus_SjBAnvMEQi413l
at <anonymous> (C:\Users\Rafiols\Documents\LAVORO\HEU\MONOREPO\heu-monorepo\apps\back-nodejs\src\components\stripe\services\handle-invoice-payment-failed.webhook.service.ts:56:10)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async C:\Users\Rafiols\Documents\LAVORO\HEU\MONOREPO\heu-monorepo\apps\back-nodejs\node_modules.pnpm\kysely@0.27.2\node_modules\kysely\dist\cjs\kysely.js:418:32
at async DefaultConnectionProvider.provideConnection (C:\Users\Rafiols\Documents\LAVORO\HEU\MONOREPO\heu-monorepo\apps\back-nodejs\node_modules.pnpm\kysely@0.27.2\node_modules\kysely\dist\cjs\driver\default-connection-provider.js:12:20)
at async StripeWebhookController (C:\Users\Rafiols\Documents\LAVORO\HEU\MONOREPO\heu-monorepo\apps\back-nodejs\src\components\stripe\stripe-webhook.controller.ts:25:3)
}
[18:12:42.345] WARN (15064): POST /webhook 400 437ms
yes
it receives this but i need to specify the customer
this is the one without overrides: stripe trigger invoice.payment_failed
i need : stripe trigger invoice.payment_failed --override payment_method:customer="cus_SitR4T1wjSUMwZ" --override invoiceitem:customer="cus_SitR4T1wjSUMwZ" --override invoice:customer="cus_SitR4T1wjSUMwZ"
Ok, right. So let's tighten up the listen. Re-run in Terminal 2 but with your full code that specifies the events, and then try again, and see if the trigger we just tried makes it to your app (and breaks).
you mean this trigger: stripe trigger invoice.payment_failed?
because this one is always arriving, the one that is not arriving is this one
stripe trigger invoice.payment_failed --override payment_method:customer="cus_SitR4T1wjSUMwZ" --override invoiceitem:customer="cus_SitR4T1wjSUMwZ" --override invoice:customer="cus_SitR4T1wjSUMwZ"
Right. First I just want to confirm the "simple" one works.
Once things splode, I'll get you to add --log-level debug.
Good good. Let's try this next:
stripe trigger invoice.payment_failed --log-level debug --override invoice:customer="cus_SitR4T1wjSUMwZ"
Any luck?
no ๐ฆ
it's ok. i'll try to debug more tomorrow. thanks for the support and have a nice day ๐
Did the trigger one output anything more with that --log-level debug in there?