#rahuls1098_code

1 messages · Page 1 of 1 (latest)

marsh cairnBOT
#

👋 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. Thank you for your patience!

⏱️ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime! If this thread is closed and you have another question you'll need to start a new thread.

🔗 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/1214700078137352192

📝 Have more to share? You can add more detail below, including code, screenshots, videos, etc.

high basaltBOT
supple snow
#

Hi there! In the code above, I take it balance_transaction.payout is resolving to nothing?

grim dew
#

I believe that provides payout IDs but still doesn’t tie into PaymentIntent IDs.

supple snow
#

Hm, I don't think so. The line above it is retrieving the Charge's balance transaction. The type of this Balance Transaction will be charge

#

What you should do instead is look at charge.available_on. This will correspond to 00:00 UTC on the day when funds will be/were released. You can then use List Payouts where arrival_date[gte] is set to the available_on value and arrival_date[lte] is the next day: https://docs.stripe.com/api/payouts/list

#

This should return the Payout that was paid when the funds from that Charge were available. You can then list Balance Transactions and pass the payout ID as the value of payout: https://docs.stripe.com/api/balance_transactions/list

This will return all Balance Transactions that were part of that Payout. You'll need to see if the Charge you started with was included in that Payout

grim dew
#

Sorry what do gte and lte stand for?

supple snow
grim dew
#

Will explore this suggestion and report back if any issues

grim dew
#

Is there potential for error if there are multiple payouts that occurred on the available_on date? There could be mulitple payouts that are tied to differnet payment intent IDs (but we want to correctly map the payment intent ID to the payout ID)

supple snow
#

There could be multiple payouts on a given day, yes.

grim dew
#

Since there is no direct link between payout ID and balance transaction, charge, or payment intent ID (from my understanding), is there a way to check that the payout listed (in that specified date range) is in fact associated with the payment intent id?

#

This can only work if there is one payout per day, but this is not the case

supple snow
#

You might see more than one Payout listed when you make a call to list payouts with the arrival_date boundaries you provide

#

If you do, you should make two calls to list Balance Transactions, one for each Payout

grim dew
#

I am trying to retrieve a charge from PaymentIntentID but I don't think there is a charge field on PaymentIntent. Is there a way to get a charge object from paymentintent ID? Was not able to find anyhting on the docs

supple snow
grim dew
#

I see, I was able to retrieve the charge for for the payment intent ID by specifying that parameter in the list function on Charge. Thank you

#

Last question is where can I find the 'Payout Trace ID'?

#

I can now get the payout ID through the steps you described, but I don't see the payout trace ID parameter anywhere

#

On the Stripe dashboard, under Balances, and Details, it lists the stripe payout ID and Payout trace id, but I don't see an endpoint or field to get this

supple snow
#

Ah, this currently isn't available via the API

grim dew
#

Got it. Is there any other field or ID that my client can use to reconcile with their bank that the balance has in fact hit their account?

#

For more context, I have a payment ledger for my client. On the ledger where I report a payment, I also need to report the ID that they can take to the bank to verify that the transaction has been deposited. I know Payout trace ID was a way to do that, is there any other ID that can achieve this?

supple snow
#

Our suppor team would be able to assist with this question. We're not experts on reconciliation flows