#alessandroricci_best-practices

1 messages ยท Page 1 of 1 (latest)

dusty meteorBOT
#

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

๐Ÿ“ Have more to share? You can add more detail below, including code, screenshots, videos, etc.

candid fernBOT
versed carbon
#

Can you be more specific? I don't understand the question

hidden stump
#

Sorry for that! but message was to long for the form. Basically what happened is that i splitted correctly a payment with stripe connect to 2 different account .... then another payment came in and waited to splitted, meanwhile a dispute for the first payment happened, so now i cant pay to the connected accounts the second payment because that money are covering the dispute. Is there a way i can handle better this case ?

#

i saw that i can reverse the transfer but only if the connected account has the balance to do it. Is there another smart way ?

versed carbon
#

Can you share both payment intent id's?

hidden stump
#

first payment id pi_3ODovbEutbHy81io1rUUCg0X

#

second payment id pi_3OII3jEutbHy81io0a5TufaN

versed carbon
#

Gotcha. And do you happen to have the transfer id's? Or the request id's for creating the transfers (even the failed one)?

#

If you use source_transaction in the transfer it should prevent this error

hidden stump
#

$stripe->transfers->create([
"amount" => $serviceFeeNet,
"currency" => "eur",
"source_transaction" => $booking->order->source_transaction,
"destination" => env('STRIPE_ACCOUNT'),
]); yes we use the source transaction

#

checking the ids requested just one moment

candid fernBOT
hidden stump
#

First payment
tr_3ODovbEutbHy81io1YTdt2OS with source transaction
ch_3ODovbEutbHy81io1D6Gs7vi

versed carbon
#

Gotcha. Curious about the one failing. Do you have its request id?

hidden stump
#

where can i get more info ? basically im receiving this mail : Insufficient funds in Stripe account. If you provide source_transaction and the source transaction's available_on date has passed, you still need funds in your available balance. You can use the /v1/balance endpoint to view your Stripe balance (for more details, see stripe.com/docs/api#balance).

#

a here ch_3OII3jEutbHy81io0uYt0M9y

small wadi
#

Hi there ๐Ÿ‘‹ jumping in as my teammate needs to step away soon.

#

source_transaction can't be used there, because the Charge you're using has already settled.

#

source_transaction is used to tie a Transfer to a payment that is in progress, so the Transfer is created once the funds are available. That can't work if the payment has already settled (in this case months ago) and those funds were already made available to your account balance.

hidden stump
#

yes that's correct, why then my balance do not cover the transfer?

small wadi
hidden stump
#

yes i can confirm that the balance do not cover the transfer, my assumption was that the balance is not covered due to the dispute in the middle of the process.

#

maybe im missing something

small wadi
#

I'm not sure offhand what exactly pulled your balance too low, but if it is lower than the amount you're trying to create a Transfer for, then that is expected to fail as you can't transfer funds you don't have.

hidden stump
#

that is clear

small wadi
#

You will need to take an action to increase the balance of your account in order to proceed. Either by adding to your balance through the dashboard:
https://dashboard.stripe.com/balance/overview
or I believe reversing a previous Transfer to a Connected Account would also increase your funds.

I noticed that these objects and requests are from livemode, I'd strongly recommend testing in testmode before proceeding with any actions in livemode.

hidden stump
#

that was my idea. but i need some confirmation, if i have a dispute for a payment stripe get the amount from my current balance to cover the dispute, is that correct?

hidden stump
#

so my assumption was right, basically i dont have the balance because of the dispute in course and this could leave to a trasfer failure on some other payments. Now as this particular payment is not a real problem for us. What can i do to prevent this for the next cases.

#

?

small wadi
#

You can keep more funds available in your balance, you already seem to be on manual payouts allowing you to control that. Aside from that, the approaches that have already been mentioned to increase the available funds in your account are also options.

#

Or, if you create the Transfer sooner, before the charge settles, you can use the charge as the source_transaction so the Transfer is tied to that in-progress payment.