#redtopia-express-balance

1 messages · Page 1 of 1 (latest)

cold dew
#

currency is whatever the Express accoutn can settle in

#

Obviously I've got a bit of a problem if the balance of the connected account uses a local currency.

not sure I understnad, the Express account balance will be in its local currency so say EUR and you'll only be able to pay out that currency since that is what they/their bank account settles in

stray fog
#

ok, so my platform does everything in USD... the vendor sets up their stripe connect express account and they're located in france. They sell something and I transfer money in USD into their connect account. What you're saying is that if I get their account balance, it will show up in EUR?

cold dew
#

it gets FX'ed so yes it goes from USD -> EUR into the Express Balance

stray fog
#

so how would I do a check to see if the account balance is >= than the payout amount?

cold dew
#

what you're doing above, fetching the Balance on the account

#

you fetch the Balance on the Connect account, and make a Payout for that amount

stray fog
#

it's a little trickier than that... our platform has it's own accounting system and has what we refer to as "pending" transactions, which basically means that a transaction might not be eligible for a payout until a future date. When a payment is made to a vendor on our platform, a transaction is applied to their "internal" platform account balance, which may or may not be considered "pending", but that amount is added to their Stripe account. When a payout is made, I am not including those pending transactions, so I may not be creating a payout that is equivalent to their entire balance.

In theory, their account balance should always be >= to any payout, but as a good programmers like to do, the code first checks to see that their account balance will cover the payout so that we don't have code that will just payout whatever... you know, bugs and stuff

cold dew
#

sure but that just means you have 2 amounts and everything still works

You want to check if acct_balance >= your_calc_amt and then pay that amount out

stray fog
#

when your_calc_amt is in USD, and their acct_balance is in EUR, then... ummmmm

#

when I do a transfers.create and I'm specifying USD for the currency, you're saying that it gets converted at that time to EUR, correct?

cold dew
#

when I do a transfers.create and I'm specifying USD for the currency, you're saying that it gets converted at that time to EUR, correct?
yes, try it in test mode to see it work

#

when your_calc_amt is in USD, and their acct_balance is in EUR, then... ummmmm
yes in that case, you will have to account for FX conversion

stray fog
#

does Stripe provide my backend with any way to do that conversion?

#

or is there a way for me to request the conversion when I get the account balance?

cold dew
#

so when you fetch the account balance, there isn't conversion. You're just asking acct_123 "what is your Balance" and they tell you "100 EUR" or "200 SGD", no relation to USD or nto

#

you'll have to take some FX into account, depends on what works for your usecase

#

is it the one when the original payment was made? the one at current point in time?

#

like what if the FX changed between charge time and payout time

#

these aren't quesitons I have strong opinions on, just clarifying that these are things you might need to account for

for FX rate, you'll have to integrate outside of Stripe to find "what does 1000 USD convert to in EUR"

Stripe auto-converts during Transfers etc, I'm referring to when you check later

stray fog
#

noticing that I can create a payout in USD, which is what I want

#

but what I don't want is to make a payout that exceeds the express account's balance

#

is it possible to prevent this from happening?

#

in other words, I don't want to create a negative balance

cold dew
#

but what I don't want is to make a payout that exceeds the express account's balance
that by default won't work

Stripe won't let you payout 100 when the account Balance is 90

stray fog
#

so it will fail?

cold dew
#

yes

#

that's an invalid requiest

stray fog
#

ok, checking because I read something about negative balances and I was under the impression that I could create a negative balance if I created a payout that was larger than the account balance.

#

but maybe that only applies to the root Stripe account

cold dew
#

no negative balances aren't possible by creating a payout, that happens due to chargebacks and refunds that take funds out of an account balance

stray fog
#

ok that's good enough for me... I guess I don't have to check the account balance before doing a payout, thank you for your patience and your help

cold dew
#

I guess I don't have to check the account balance before doing a payout
why not

#

what if you try to create a Payout for > Balance amount

#

and that request fails

#

how will you know what the right amount that you can create a Payout is

stray fog
#

we know what the right amount is according to our internal accounting system, so that's the amount we will use for the payout. If the stripe express account doesn't have the correct funds, and the payout fails, then there's an internal problem.

But that does bring up another question... when I transfer the funds in USD, those funds are converted at that time. Then let's say there's a 6 week gap between that transfer and the payout, and during that time the exchange rate changes, does that affect the payout?

cold dew
#

when you pay out, you just payout in the connected accounts currency

#

so you have to figure out FX before that

stray fog
#

ok, then maybe I need to recalibrate... is there any way for me to "save" funds from a payment in our root Stripe account so that they are not transferred to our external account? This way, I could do a single transfer from our main stripe account to a vendor's express account, and then create the payout at the same time.

#

Alternatively, I could add only non-pending funds to the express account, and let them get paid out on a schedule

clear citrus
#

Hi 👋

#

I'm stepping in for @cold dew BTW

stray fog
#

the complication is that the internal non-pending funds get paid out to our main external account and are not available to be transferred to an express account when they clear (internally)

#

I am doing the recipient service agreement

#

I have read that separate charge and transfer document, and that's kind of what we're doing... an end user can purchase from multiple vendors at the same time. We collect the funds for that purchase, and credit the vendor's account using our internal accounting system. When a purchase is yet to be fulfilled by a vendor, those transactions (internally) are considered "pending" and should not be paid out to the vendor until they are fulfilled. Other transactions can be paid out immediately.

The approach that I would like to take is that when a purchase comes through, I can tell Stripe to keep some of those funds in our account and they will not be paid out to us. Then, when we want to payout a vendor, we will transfer funds from our main Stripe account to the Express account, and then create the payout. Is this possible?

#

This way we can guarantee that funds will always be available in Stripe for all payouts

#

Otherwise we would need to add funds when we create payouts, which complicates the whole thing

clear citrus
#

While remaining on a scheduled payout scenario?

stray fog
#

no, we are processing payouts using a cron job

#

in other words, payouts are not using the scheduled payout scenario... we will initiate the payouts using the API

clear citrus
#

For this scenario the best option I can advise is to have your system determine how much of the funds in your Stripe account to retain based on the "pending" transactions and adjust your manual payouts to ensure you don't payout those funds.

stray fog
#

I can easily do that when I create the charge... but, how do I specify how much of the funds to retain?

clear citrus
#

If it were me, and I was trying to maintain regular payouts while understanding I needed to keep some funds in reserve to handle those "pending" transactions, here's what I would do:

  1. Calculate the amounts needed to cover pending transfers (plus some buffer for FX wiggle room)
  2. Query my account balance to see what is currently present
  3. Dynamically compute the amount to payout from my Stripe account to my bank account
stray fog
#

that's kind of what I'm thinking... but maybe I don't need to calculate for FX and wiggle room. Ideally everything is calculated to the penny.

So, maybe I'm starting to see the full picture. Are you saying that I can setup my stripe account so that I don't have my balance paid out to our external account on a regular basis? I can initiate the payout using the API?

#

ie, I can do a payout to us the same way I do a payout to a stripe express account?

clear citrus
#

Exactly. You can programmatically trigger payouts to yourself just like your connected accounts

stray fog
#

well then... that might help. If I can do that, then I don't have to tell stripe to "keep this extra amount"

clear citrus
#

In this case your system would determine "I need to reserve $500 for Bob the Handyman" and payout your current balance - $500

#

So you would know the "extra amount" you want to retain in your Stripe account on your end.

stray fog
#

OK, I've done enough testing with the API that I'm pretty sure I can figure it out from here. One final question, is there a cost associated with manual payouts to either us or the vendor?

clear citrus
#

I'm pretty sure there is no difference in fee structure for manual vs scheduled. I'm reviewing my test accounts and I don't see any fees assessed.

stray fog
#

great, so in other words, there's no cost for us to create payouts to vendors? I haven't come across any, but to be honest, I haven't been looking for that as much as diving into the API docs

clear citrus
stray fog
#

in those cases, are the fees deducted from the express account at the time of the payout?

clear citrus
#

But, from what you've said previously, I think you'll be fine without having to worry about this.

stray fog
#

ok thank you very much... I think I have a pretty good understanding of how to put this together now

#

I have to run... have a wonderful rest of your day

clear citrus
#

I'm glad we were able to get to a good point! Feel free to come back if you have more questions as you test/implement these ideas.