#surgical

1 messages · Page 1 of 1 (latest)

crisp veldtBOT
empty mantle
#

👋

dark snow
#

we're not retrieving any intent, as we're just getting the event object from the webhook - in our test account, we do receive an object of charges:

empty mantle
#

Yeah okay that listener is on an older API version

dark snow
#

Ohhhhh

empty mantle
#

I'd recommend updating your code to handle latest_charge instead (latest_charge is on older API versions as well)

dark snow
#

okay got it. so if we receive the intent succeeded through webhook and there is no charges object, should we just make a call to get the same intent id, ie intents.retrieve, and request for the latest charge?

empty mantle
#

I would just always retrieve the PaymentIntent in the handler and expand latest_charge

#

Unless you care about the non-successful charges?

#

But either way you are going to need to do that for the newer API versions so you should just update your code for the handlers that are on an older API version as well.