#KarlS-charge-payment
1 messages · Page 1 of 1 (latest)
I might have figured it out.
Hm.. never mind. I see I can get the charge ID from the Payment, but I need to go the other way and get the PaymentID from the charge.
ULTIMATELY: I need the Balance Trx ID from the charge.
Gotcha thank you. I am looking in to this
thx
Perfect, Charges have a balance_transaction field https://stripe.com/docs/api/charges/object#charge_object-balance_transaction
Yes, I see that. In my case, it is blank. Here is additional details to my scenario...
User goes to pay for a product, a Payment Intent Transcation is created, which we log. The payment fails "card declined". Later, I need more details for the charge that failed, I need to look up the Payment Intent details. I know the charge, I know it failed, I need to find the Payment Intent - rather, I need to know what that original Payment Intent TRX ID was.
Ah I see. Are you seeing something similar for the payment_intent field then? https://stripe.com/docs/api/charges/object#charge_object-payment_intent
Do you have an id of a charge that you see this for? (ch_123)
payment_intent is also Null
I'm looping through charges now
So, for succeeded Charge, there is a BalancTransactionId
Yes that would make sense.
Can you send the charge id of a failed charge that you would want to look in to like this? A specific example might help me understand what you want to do more
OK, first please looke at the charge: ch_3JaJjDG30Vl6ne6N0ILmXo5a
he has a succesful payment and an email of course.
when I try to get his email from the chargeService class List of charges... I can't find his email anywhere
ReceiptEmail is NULL
So in this case that Charge was created directly through the API, not as part of a PaymentIntent.
Oh. where do I see that detail?
And receipt_email would have to be passed in to the charge creation call to set it https://stripe.com/docs/api/charges/create#create_charge-receipt_email
See what detail?
The difference between set directly through API vs. PaymentIntent.
This doesn't make sense since my client payment flow is identical in all cases.
I believe...
@slim oyster it's not though. Just skimming your logs, part of your integration uses Checkout (which uses PaymentIntents) and another part uses multi-years old APIs creating charges via the API and collecting card details with the old Stripe.js v2 (deprecated 4 years ago)
oh my gosh. that is good to know. this is not my code, someone else wrote the PHP app. I'm supporting it and rewriting it in .NET.
Thanks for that info. Can you send me log example of the 4 year old payments? I'd like to try and determine where that is comging from.
look at https://dashboard.stripe.com/logs and wherever you see /v1/charges that uses really old APIs and likely a third-party plugin
but it's possible you just integrated many years ago and didn't upgrade (which most people do really, if it works, why fix it :p)
True. I'll dig. Thank you.
let me know if I can help further!