#gaurav

1 messages · Page 1 of 1 (latest)

polar oxideBOT
eternal roost
#

Hello! Not sure what you mean by "reverse the balance," can you provide more details?

raw lark
#

We would like to reverse the balance amount in the users connected account into our stripe account, as these funds are stuck in users account and cannot be used.

eternal roost
#

Stuck? Why can't they be used?

raw lark
#

Since the payouts are stuck due to accounts being restricted, the user never receives the money until they finish their requirements.
This amount will not be available in our total stripe balance as a transfer was already initiated from our stripe account.
This makes these funds unavailable for future payouts to other users.

eternal roost
#

Gotcha. In that case you can reverse the Transfers you made, yep.

raw lark
#

Is there a way to figure out which transfers have failed/blocked due to unfinished requirements(not been paid out) through the api, if the user has many transfers?

What happens if I reverse a transfer that has already been paid out?

I am asking the above question to address all the possible scenarios:

  1. User has 5 transfers and 0 payouts. So, we use the api to go through all transfers(latest first) and reverse each one of them until the balance is 0. This is a successful case.
  2. User has 5 transfers and 5 payouts. The 3rd payout failed for some reason and account got restricted after that. The balance matches the 3rd payout amount and I only should reverse that transfer.
    How do I figure out 3rd transfer is the only transfer I have to revert using the api in this scenario?
eternal roost
#

That states that the connected account's available balance must be greater than the reversal amount or it has connected reserves enabled.

#

If the money has already been paid out the available balance will not be suffificent to cover all of the reversals.

polar oxideBOT
raw lark
#

Example:
Demostrating the 2nd scenario with an example:

Connected account balance - $50

Transfer 1 - $5 (paid)
Transfer 2 - $10 (paid)
Transfer 3 - $50 (failed)
Transfer 4 - $10 (paid)
Transfer 5 - $ 20 (paid)

So, in this case I only have to reverse the 3rd transfer that is same as the balance and has failed.
How do I do that using the api?

In this example, we can reverse the 1st 2 transfers because the amount is less than the balance but we do not want to do that as those have already been paid.

candid bough
#

Do you have examples to look at here? It's possible some of the balance is already set up for a payout etc

raw lark
#

Do you want me to share the account link that runs into the 2nd scenario here?

candid bough
#

An example request id that fails for you would be best

raw lark
#

I will try to see if I can find one.
These are some of the issues that I see on the account associated with failed payout on stripe interface/account:

  1. This payout will not be retried, since it is not an automatic Stripe payout. You should create a new payout after the bank account issues have been resolved.
  2. Payout failed - This is because your bank declined the transaction. Contact your bank to start receiving payouts again.
  3. Payouts and charges are paused
    You have 2 active requests from Stripe that require action

Is the request id available somewhere on the UI?

polar oxideBOT
raw lark
#

I could not find the logs for failed payout for the account in question(running into scenario 2).

Request id for a random payout that is failing: req_1g5Of8sLBznrNa

pure quest
#

Thanks for the request ID, will look in to it and get back with what I can find

raw lark
#

Thanks, look forward for your response.

pure quest
#

Apologies that it took me a while to look in to this. The error that you got back is:
Cannot create payouts: this account has requirements that need to be collected.. Please provide those fields to re-enable payouts.
So it sounds like you need to collect more info from this account. You can see the info that you need to collect by retrieving the account[1] and can then either collect the info yourself and update the account or you can direct the user to a Stripe Onboarding link to collect that info

[1] https://stripe.com/docs/connect/connect-onboarding#info-to-collect

raw lark
#

This thread completely looks to be diverging off topic here.
My question here is not how to fix a failed transfer but how to figure out which transfer has failed programmatically, so that the transfer can be reversed.

Please help me answer the question here
#1124025881451565158 message

based on the example scenario here
#1124025881451565158 message

pure quest
#

Apologies, the server has been busy so I was just looking at the last few messages. Will catch up on the failed transfer error

polar oxideBOT
pure quest
#

User has 5 transfers and 5 payouts. The 3rd payout failed for some reason and account got restricted after that. The balance matches the 3rd payout amount and I only should reverse that transfer.
This isn't quite how payouts and transfers work in Stripe. We don't pay out to the bank transfer by transfer. Like if you transfer $20 to an account and then $5 and then pay out $20, we just see that as coming out of their total $25 of available balance as opposed to those being the funds specifically from the $20 transfer

#

So if you are creating partial manual payouts that are suppposed to be tied to a specific transfer, I think you'll want to give yourself a way to tie the transfer to the specific payout (maybe either metadata or a DB entry on your side) and can refer to that when figuring out what to reverse when a payout fails

polar oxideBOT
raw lark
#

Since, transfers are not associated to payouts if I reverse a transfer that should not affect the already paid payout right.
So, essentially in the above scenario:
Can I do the following?

  1. Reverse transfer 1 for $5
  2. Reverse transfer 2 for $10
  3. Reverse transfer 3 partially - $35

Are there any concerns with the above?

slate forge
#

Hi 👋

#

I'm taking of as @pure quest needs to go soon.

#

In those cases, that would work as long as the Stripe balance for the Connected Account could cover those amounts. Otherwise you would need to reverse the payout. You can only reverse payouts for Express and Custom accounts though: https://stripe.com/docs/connect/payout-reversals

raw lark
#

ok, thanks. That is helpful.

One more question:
Is there a way to query all payouts for a connected account? Do not see any option to do that as per the docs (https://stripe.com/docs/api/payouts/retrieve)?

Also, when I query a payout by id I receive a resource_missing error?
request_id: req_Z5gOgZTRlFp5XB
Can you help me understand the reason for it?

slate forge
#

You need to use the LIst API parameter but you have to use the Stripe Account header. If you don't the API tries to find the payout in your account

raw lark
#

Sweet!
Thank you very much. It works.