#HK6-analytics

1 messages ยท Page 1 of 1 (latest)

misty bronze
#

Do you have an example of a payment that had a different status in the report vs the API?

#

The id of one I mean?

left vapor
#

let me check

#

ch_3JhtcWED5xkfDv2c1YHz1WzR

#

basically when we download the csv Statuses do not correspond to the what we can see in the API doc statuses. neither for payment intent API or charge API. It looks like a kind of compbination of both

misty bronze
#

thank you

#

So what does it say in the sheet and what does it say in the API?

left vapor
#

API says "succeeded"

#

csv: "Paid"

#

And for this one: ch_3JaH7OED5xkfDv2c1vmUd9BU

csv says "Failed"

API says: "requires_payment_method"

#

Basically I need to be able to distinguish: Paid, Refunded and Failed

misty bronze
#

So paid will be succeeded, looking in to the logic behind Refunded and Failed

left vapor
#

thanks

#

Paid==succeeded or paid == succeeded AND captured?

#

because I see that there is also a captured boolean in the API response

misty bronze
#

Good point. Looking up the exact logic if I can.

left vapor
#

thanks

misty bronze
#

I am having trouble finding the exact logic but I do think Paid = succeeded (and captured if you are capturing seperately)

left vapor
#

ok

#

I think I can get the refund with the Refunded boolean

misty bronze
#

Though keep in mind that does not take in to account partial refunds

left vapor
#

Ok

#

so amount refunded

#

is somewhere

misty bronze
#

Exactly

left vapor
#

and for failed?

misty bronze
left vapor
#

not succeeded AND not paid?

#

not succeeded == failed?

#

systematically?

misty bronze
#

There is an actual failed status for Charges

left vapor
#

ok

#

I think as we did not find the same statuses as in the csv, in our last calls to API we took the statuses from the payment intent

#

in the hope of getting the ones from the export

#

we will revert to the charge statuses

#

and use what you suggested for refunds

#

Thanks

misty bronze
#

Glad that helped! Thanks for doing a lot of the digging yourself

left vapor
#

ha ha. I know you are all busy there ๐Ÿ™‚