#KarlS - webhook send
1 messages ยท Page 1 of 1 (latest)
Yes. I had 2 webhook events defined. I received an order in the form of an invoice on my website. Via strip webhooks, I logged the events. "Charge.Succeeded". I realized later that I need to capture the event "Invoice.Paid" (as I need the invoice line item details).
So I need to manifest an Invoice.Paid event.
Ok. I recommend tracking down that event ID then doing a resend: https://stripe.com/docs/cli/events/resend
in_1KgfWcG30Vl6ne6Npjt2qv2q
ch_3KgfWcG30Vl6ne6N0fCpCnKx
evt_1KgfWfG30Vl6ne6N7LiMhBFv
I'm trying a resend on the event finalized. Haven't tried that yet.
NO. That isn't true. I did resend that and all I got back was the charge.succeeded. WAIT. Can you listen for finalized?
Yes you can listen to that
Can you share the event id?
wait. I've just noticed that my endpoint was disabled. Wondering why...
I'm getting conflicting status here.
Webhook shows as active, yet the status of the resend shows, webhook disabled.
evt_1KgfWfG30Vl6ne6NuhW9sV0h
The event for this one ^^^ is invoice.payment_succeeded but I swear that the last time I was looking at this it was invoice.payment_finalized.
I'm adding this event now to my webhook listener.
Not sure if you are reading any of this..... ๐ฆ
Will look in a bit
Have a lot of threads
Looks like the last resend was successful
So endpoint is no longer disabled
Take a look at this info as to how your webhook can be disabled: https://stripe.com/docs/webhooks/best-practices
OK. got this error: Received event with API version 2020-03-02, but Stripe.net 39.64.0 expects API version 2020-08-27.
I set the version in CLI accordingly, so: -v 2020-08-27, and resent and getting same error.
resending a 3rd time for sanity check.
Also try with with the version in quotes
ok...
it did complain when I tried this: -v: 202-08-07 "bad version"
switched that to: -v 2020-08-07 "bad version" again
this worked: -v 2020-08-27, but getting bad version on Stripe side. NOW TRYING WITH QUOTES (1 sec)....
I think we (stripe) have a problem
Take a look at this actually: https://stripe.com/docs/webhooks/best-practices#api-versions
WAIT
you can't ignore my findings above.
Although the version attribute on the CLI is being validated when invoking the command, it is not being honored when the resend object is created (as shown above)
this needs to be looked at by Stripe engineers.
One min
ok
So take a look at the link I sent. Event objects aren't changeable (including their version). The -v parameter is just a parameter that all Stripe commands accept, so it's shown in the docs there. It won't change the event object data at all (as per the link above). What it can change is how the event object is rendered (not the data inside the event itself), so your server might rely on that. We've never actually changed how an object is rendered in a Stripe version, but in theory, we could.
But I get that it is confusing and makes it look like you could change the version of the event data
I will file this as feedback with the team though
ok. thank you this makes sense. What doesn't make sense though is that I'm not sure where the original api was constructed for the object as there was never a webhook event (unless it defaults to latest). oh well, I'll setup a mechanism to ignore api version for temporary so I can get a few orders through to m y end!
Even if you don't have a webhook endpoint configured, stripe still generates events for every action
They just wouldn't get sent to an endpoint
They would be generated on the version your account is set to
Not latest. The one your account has set
yes, the "default" you know what. I'm just going to upgrade and be done with it!!! thanks for your time.
No problem. Be sure to read this to avoid any pitfalls: https://stripe.com/docs/upgrades
thanks
Quick question: is there a resource that explain the differences/benefits for each of the webhook events such as with Invoice you have: invoice_finalized, succeeded, paid, etc..
Hey @quartz karma! Stepping in here for @oblique crag as they needed to step away. No, this doesn't exist. We have some select guides (like https://stripe.com/docs/billing/subscriptions/webhooks for Subs) but not one comprehensive one.
ok... I just need to know 1) invoice paid 2) I need invoice details with Line Items.
Sorry, is that a question? I haven't read the full thread above (helping a few folks) ๐
Let me know if you need more clarification
No, you don't need to read the entire thread. Yes, that was a basic question. I need to capture line item details + a succesful payment.
So... invoice.paid?
Yep invoice.paid!
awesome thank you.