#Ida
1 messages ยท Page 1 of 1 (latest)
Hi! Let me help you with this.
Could you please share an example Request ID req_xxx? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Hi Vanya,
Thank you.
I have the payout_id in SANDBOX. Can this help you?
po_1N4D5QQLD4uJHLRUDC5rzb6P
Let me check if I can get the request id
I'm using Java, retrieving the transfers list with:
Transfer.list(params, requestOptions). This is the Request ID: req_cnaJtx8Ihnmjip
What do you mean by "SANDBOX"? You mean Test mode?
Yes
Thanks. Is this an example of a transfer that you don't get when listing all transfers?
Yes, I get only the charge transfers, not the refunds
Hey! Taking over for my colleague. You can specify the type when retrieving balance transaction. You can set refund for example:
https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-type
My apologies for not being clear. I don't have any issues with retrieving the balance_transaction list. The issue is with retrieving the transfers
https://stripe.com/docs/api/transfers/list
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I get only transfers related to charges, not to refunds
Do you have an example of an object that you didn't managed to retrieve ?
Are you looking for transfer_reversals by chance ?
https://stripe.com/docs/api/transfer_reversals
As I understood, transfer_reversals is a list for each transfer. I'm trying to avoid calling to each refund transfer, would like to get them all in one call, like done for payment transfers
Yes it looks like that is how that list API works. So you are looking for all refunds related to the charges on a specific payout?
yes, exactly
Or all the refunds that happened during the refund period?
well, the second
I'm not sure I'm following the difference between the two
I need all refunds that are related to a payout ID
In the example I shared, there is one payment transactions and 5 refunds. On of the refund is related to the payment.
When I try to get all transfers for the period of the payout, I get only the payments transfers, not the refunds of the payout
po_1N4D5QQLD4uJHLRUDC5rzb6P
The distinction would be that you could receive a payment today, get those funds paid out to you, and then the customer could request a refund. So the payment be on one payout and the refund would happen during the time period of the next payout
I understand that.
How can I retrieve the data of the all refunds related to the payout in one call, instead of getting them one-by-one?
I can do it for payments related to the payout using the Transfer.list(). As I wrote previously, this list doesn't includes the refunds
Transfer.list accepting as a parameter the connected account Id. From what I read in the documantions for Refund.List, I cannot filter by connected account Id
Yep, got it that the list does not include refunds, was just making sure I understand the ask. Will see if there is an easy way to list the refunds that happened during that specific period
Thank you.
Have you tried listing all refunds and filtering the created timestamp on the time period that the payout has transactions for? https://stripe.com/docs/api/refunds/list#list_refunds-created
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
But this will give me all refunds, not just the one of the required connected account. We have thousand of connected accounts, which will result with thousands of refunds, and again, will reduce the performance.
Is there a way to filter by the connected account ID?
Ah gotcha, thank you for the clarification. I do see how you flagged that earlier. Will ask my colleagues if there is an easy way to do this via the API. I am not immediately thinking of one but think there may be
thank you
Hi there ๐
Hi there to you too ๐
Hopping in to help with busy discord ๐
This seems like a long running thread, can you give me a short summary of your question while I catch up?>
Ah looks like you're using Destination Charges and are looking to retrieve list of all refunds by connected account ID, correct?
I'm working on retrieving information for transactions for a payout reconciliation event
Ah looks like you're using Destination Charges and are looking to retrieve list of all refunds by connected account ID, correct?
You pin-pointed the issue I have
I found how to do it for payments using Transfer.List, but no success yet for refunds
Hmm okay, so With destination charges the objects are owned by the platform account.
So a refund object typically don't have a destination in this case because platform account is the destination for the refund (since they own the objects).
I understand.
I get the transfers list by destination account Id and created to find the ones that done during the payout period, but the list doesn't include the refund transactions/transfers. The transfer_reversal is per transfer, not per account
Correct.
As far as my understanding goes about this, there's no elegant/direct API call for this problem unfortunately. You're going to have to
1/ List all Transfer reversals while expanding transfer parameter
https://stripe.com/docs/api/transfer_reversals/object#transfer_reversal_object-transfer
2/ Check if the transfer object has your connected account ID as the destination
https://stripe.com/docs/api/transfers/object#transfer_object-destination
More elegant way would be to utilize webhook for the data going forward and record each activity w.r.t. payments and refunds on your end
This would allow you to cache the results and improve on performance.
I see that to do 1/ above I should call:
TransferReversalCollection transferReversals =
transfer.getReversals().list(params);
Ah actually, the transfer object itself should have the reversal list
https://stripe.com/docs/api/transfers/object#transfer_object-reversals
This is for a single transfer.
Is there a way to get all TransferReversal by 'created' or something similar?
But I don't have the transfers of the refunds, so how can I get the reversal?
Have you tried
1/ Listing all Transfers by destination
https://stripe.com/docs/api/transfers/list#list_transfers-destination
2/ Filtering out the objects where reversal: false
https://stripe.com/docs/api/transfers/object#transfer_object-reversed
That should only leave transfers that were reversed
I'll try to be more clear. I need to find the reversals of transfer done in previous payouts.
I can find the reversal for transfers during the payout period.
The challenge is to get the other refunds in the payout period, that were charged in previous period.
I can see all of them in Stripe dashboard, and when retrieving them by transaction Id one by one, there is no issue. however, the created date of the transaction from previous periods is out of the period.
Do you have an example you're looking at? Maybe that'd help be on the same page
maybe I just need to expand the source-> TransferReversal to get the data I need?
"po_1N4D5QQLD4uJHLRUDC5rzb6P"
This is my starting point, I retrieve all BalanceTransaction for this payout
I do expend "data.source.transfer_reversal",will expending "data.source.transfer_reversal.transfer" will give me the info I need, meaning, the transfer object?
I will trying now
Yeah try it out maybe
That's exactly what I was looking for!
It even save me the need to get the Transfer list!
Explaining you the issue, help me to find the best approach, thank you very much
Sometimes the right question gives the solution
I have another question, hopefully faster, on the weekly_anchor for payouts. Should I open a new thread?
You can ask here
We set automatic payout to be weekly with weekly_anchor on Monday, leaving the default rollout of 7 days. We did it on Wednesday May 3rd.
From the documantions I understood that the weekly_anchor is the payout day, meaning, the day the payout is created. However, we had the first payout one Wednesday May 10th. The many reach the connected account bank account on Monday May 15th.
The question is: what should we expect with weekly_anchor set to Monday, payout created on Monday, or payout created 3 business days before Monday?