#KarlS-webhook-events-charges

1 messages ยท Page 1 of 1 (latest)

red bay
#

Hello ๐Ÿ‘‹
When you say in the form of charges, you're using the Charges API?

spice pond
#

yes

#

here is a sample charge

#

ch_3KgFDzG30Vl6ne6N0ixUvctI

#

I have another question too...

red bay
spice pond
#

ok, so charge.succeded is equivalent to PAID

red bay
#

yup

spice pond
#

my other question: In the list of payment on my dashboard, my invoice payment Description is: Payment for Invoice.

#

I missed where to change that in the API apparently..

red bay
#

Apologies for the delay here
Server is a little busy today
Can you send me a screenshot of the description field here?

spice pond
#

yep

#

you see the lines below are the legacy Charges we are receiving with a "nice" description.

#

interesting... check this screenshot out

red bay
#

hmm interesting. can you share the invoice ID for that specific invoice?

spice pond
#

see the hightlights in yellow, those are all Charge(s) Paid, Failed, etc..

#

notice the Description for the first one is still Payment for Invoice...

#

yep, 1 sec on that invoice id

#

pi_3KgFWmG30Vl6ne6N0eAkxN79

torn badger
spice pond
#

oh, ok. I'll have a look at that. I have a webhook question if you don't mind.

torn badger
#

Yep, what's up?

spice pond
#

Yes, I see that if I listen for both charge.succedded and invoice.paid I am getting double logs on my side. So I guess I just need to listen to one of them.

#

So, in order to track succesful payment and failures I'm listening now only for charge.succeeded and charge.failed. Is that adequate?

torn badger
#

That depends on what your business requirements are. Stripe generates a charge.succeeded event every time a Charge succeeds. Stripe also generates an invoice.paid event every time an Invoice is paid. Invoices generate Payment Intents, and Payment Intents generate Charges to facilitate payment, so every time an Invoice is paid both of those events will be generated. Which you listen to is entirely up to you.

spice pond
#

OK, well given that I have legacy Charges coming in I'm stuck listening for charges... thanks for the detailed answer!