#ironbeard - webhooks

1 messages ยท Page 1 of 1 (latest)

floral oriole
#

Hello! Just starting a thread for you -- I'll review and respond as soon as I can ๐Ÿ™‚

#

Assuming a payment is required, yes, roughly

#

(an invoice might not need payment if it is for $0 or the customer had a credit balance, eg)

faint crow
#

Gotcha gotcha. I'm keeping track of invoices in my database and I think I'm getting a "finalized" webhook after an "updated", since my database says the Invoice has a status of "open".

Probably just need to figure out better logic for my webhooks

faint crow
#

I think I got it sorted. Thanks ๐Ÿ™‚

#

BTW, when I use this test number: 4000008260003178 I'm getting the popup for the 3D Secure, not just the automatic insufficient funds that it claims to do

#

Oh wait, I guess I have to click approve in the 3D secure message, and then it says "insufficient funds"

floral oriole
#

Argh, sorry, this chat didnt reveal a pending message before

#

(i missed a couple)

#

Yea, thats the out-of-order events -- what you can do is use any invoice.* event as a signal to fetch the latest invoice object from the API to make srue you have the current status

#

if you depend on both

#

Yea, that card requires auth and declines as insufficient

faint crow
#

no worries, you guys have your hands full ๐Ÿ™‚

#

My out-of-order solution ended up being only creating local Invoice objects in the invoice.finalized event (and ignoring an error if the invoice already exists). In the invoice.updated event, I do a update_or_create, so it all works out.