#brian_johnson_payout-source-charges

1 messages ยท Page 1 of 1 (latest)

digital sorrelBOT
soft plinthBOT
#

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.

digital sorrelBOT
#

๐Ÿ‘‹ 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.

soft plinthBOT
viral void
#

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?

shrewd oak
#

No

#

I see some IDs, but not charge IDs or payment intent IDs

#

I can post what I see

viral void
#

Can you share an example of the IDs you are seeing? I don't need the full object

shrewd oak
#

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

viral void
#

I don't need all of this, thanks

shrewd oak
#

[source_transfer] => tr_3P9CFZDbVO0r1ghH14rI7VMr

#

OK sorry

#

just showing the different iDs

#

that's all

viral void
#

This is for an account transfer from a Connect Platform to an Connected Account

shrewd oak
#

OK

#

I'm using "type" => 'Payment'

#

should account transfers be in that listing?

viral void
#

Yes because the Transfer from the Platform creates a Payment on the Connected Account

shrewd oak
#

OK

#

that makes sense

#

So I guess I'm a bit stuck

viral void
#

But you said you didn't see anything with type = charge?

shrewd oak
#

correct

#

if I set type = "charge" I get nothing back

#

actually let me try one thing

#

Yeah it's empty

viral void
#

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?

shrewd oak
#

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

viral void
#

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

shrewd oak
#

that's the py_ ID?

viral void
#

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

shrewd oak
#

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?

viral void
#

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

shrewd oak
#

Yeah pretty quick

viral void
#

So 1 sec delay

shrewd oak
#

So I'm thinking of a bit of a hack

viral void
#

Basically network latency

shrewd oak
#

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

viral void
#

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_

shrewd oak
#

I agree

viral void
#

All of these objects can be used with the expand property

shrewd oak
#

I can work this from a queue so it's really better

viral void
#

Since we have max depth of 4, you would likely need 2 API calls at least

shrewd oak
#

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

viral void
#

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

shrewd oak
#

awesome appreciate your help - have a good one

viral void
#

Happy to do it! You too ๐Ÿ™‚