#DT

1 messages · Page 1 of 1 (latest)

glossy bluffBOT
fallen root
#

Hi there

#

If you want the timestamp that the payment was captured you want the Charge's created timestamp

#

Are you using manual capture?

green sparrow
#

both manually and automated

#

So to be clear, the example you provided is for when the payment was captured and not when the payment was initiated right? Our business model doesn't always capture immediately.

fallen root
#

Yes that will be when it was captured

#

You can test this out pretty easily as well!

green sparrow
#

I am seeing something different

#

The charge object contains the created date of when the payment was initiated which is why I am have this question.

fallen root
#

Hmmm maybe I am mis-remembering but I thought that was the time of capture

#

Can you provide me an example ID you tested with?

green sparrow
#

I only have a production example

fallen root
#

That's fine

green sparrow
#

It's off by 1 second between the initiated and captured time

#

I have a more extreme case where it's off by 5 days but it's in prod

fallen root
#

Thanks looking

#

Yeah okay my bad. I forgot that in these cases we actually create the Charge on successful confirmation.

#

So with manual capture or async payments the created date will not be when the PaymentIntent moves to succeeded

#

So what you actually want is the balance transaction

#

That is created on capture

green sparrow
#

Will the new example you provided cover both automated and manual captures?