#KarlS - webhook send

1 messages ยท Page 1 of 1 (latest)

oblique crag
#

Hello. Can you summarize quickly what you are trying and what is the issue?

quartz karma
#

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.

oblique crag
quartz karma
#

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?

oblique crag
#

Yes you can listen to that

quartz karma
#

here is the result

oblique crag
#

Can you share the event id?

quartz karma
#

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..... ๐Ÿ˜ฆ

oblique crag
#

Will look in a bit

#

Have a lot of threads

#

Looks like the last resend was successful

#

So endpoint is no longer disabled

quartz karma
#

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.

oblique crag
#

Also try with with the version in quotes

quartz karma
#

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

oblique crag
quartz karma
#

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.

oblique crag
#

One min

quartz karma
#

ok

oblique crag
#

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

quartz karma
#

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!

oblique crag
#

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

quartz karma
#

..and defaults to lates API version I guess..?

#

wait, my account, or my webhook?

oblique crag
#

Not latest. The one your account has set

quartz karma
#

yes, the "default" you know what. I'm just going to upgrade and be done with it!!! thanks for your time.

oblique crag
quartz karma
#

thanks

quartz karma
#

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..

sudden saffron
quartz karma
#

ok... I just need to know 1) invoice paid 2) I need invoice details with Line Items.

sudden saffron
#

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

quartz karma
#

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?

sudden saffron
#

Yep invoice.paid!

quartz karma
#

awesome thank you.