#brian_johnson_payout-source-charges
1 messages ยท Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- brian_johnson_payout-charges, 2 days ago, 10 messages
- brian-johnson_api, 6 days ago, 47 messages
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1234535197353967678
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐
When you expand the sources, for transaction type payment, you should see Charge IDs.
For the objects you are seeing do they have an ID like ch_XXXXX?
Can you share an example of the IDs you are seeing? I don't need the full object
Yep
So I see:
(this is in the expanded "source" section)
[id] => py_1P9CFjRlSW68EqoABqOhlkPm
[application] => ca_NxE992xMt1obYtJxqDxT5zgrJOO4QYOl
[application_fee] => fee_1P9CFjRlSW68EqoAXO3lPb1A
[balance_transaction] => txn_1P9CFjRlSW68EqoAwC2RJA3Q
I don't need all of this, thanks
[source_transfer] => tr_3P9CFZDbVO0r1ghH14rI7VMr
OK sorry
just showing the different iDs
that's all
This is for an account transfer from a Connect Platform to an Connected Account
Yes because the Transfer from the Platform creates a Payment on the Connected Account
But you said you didn't see anything with type = charge?
correct
if I set type = "charge" I get nothing back
actually let me try one thing
Yeah it's empty
I just tested on my own accounts and I see plenty of ch_xxxx
How are you creating charges?
Can you share an example Payment Intent ID that you are trying to find?
Well I have a payout ID
that's the goal here - to get the list of payment intent IDs in the payout
let me see if I can find one
This is the payout ID I am testing with
po_1P9GzRRlSW68EqoA6bVOMbCG
possibly this one
pi_3P9CFZDbVO0r1ghH1xn0cTPg
Sorry that is why I'm trying to work backwards here
we have a list of payment intent IDs but they are not mapped to payout IDs
Okay so this was a Destination Charge made with OBO
I don't know if you will be able to map the payout to this payment Intent
Because the payout occrs on the Connected Account but the payment intent lives on the Platform
Take the first object ID you shared,
That is the payment that went to the Connected Account due to the transfer that occurs as part of the Destination Charge funds flow
that's the py_ ID?
Yup
What you can do is look up the Transfer
using the tr_XXX ID
That will get you to the source_transaction, which will have the ch_XXX ID
You can get there, it's just a longer road
OK - that would be OK as it doesn't need to be real time
So starting with the payout ID
I can get the transfer ID - that is the ID for the transfer from the platform to the connect account
using that transfer ID I can get the charge ID
quick question
How quickly after the payment intent is successful does the transfer happen?
is it immediate?
It should be pretty immediate but let's take a look
The transfer was created at 2024-04-24 20:17:15
The charge was captured at 2024-04-24 20:17:14
Yeah pretty quick
So 1 sec delay
So I'm thinking of a bit of a hack
Basically network latency
we DO record the payment intent time
so I could check the payment intent amount, the fee amount and if the timestamp is within 5 seconds let's say
I could infer this is probably the right transfer
This is for a report
so not the end of the world if it is not 100% perfect, although I'd like it to be if I could
Alternately I could get the transfer ID, get the details on that transfer which gets me the charge, get the charge details which should get me the payment intent ID
Correct. I realize it's a longer trip but I would still recommend the second approach
po_ --expand sources--> py_ --source transfer--> tr_ --source trasnaction --> ch_ --payment intent--> pi_
I agree
All of these objects can be used with the expand property
I can work this from a queue so it's really better
Since we have max depth of 4, you would likely need 2 API calls at least
Yep that's OK
I'm just glad there is a way to get there
OK that gives me something to work on
I appreciate your help (again) on this ๐
I belive you helped me last time as well
couple days back
Yeah, I thought something was up when you mentioned you weren't seeing any charges with charge. I'm glad we were able to get there
awesome appreciate your help - have a good one
Happy to do it! You too ๐