#mudassir_code

1 messages · Page 1 of 1 (latest)

echo basinBOT
#

👋 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.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

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

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

somber field
#

we are following complex logic for our market place.

We charge customer with stripe invoice and let suppose there are two connect accounts order we are charging

50 euro each for connect account

two invoices 50 each (connect 1, connect 2) + 19 percent tax
platform fee 5 percent (100 euro So 5 euro platform fee) + 19 percent tax

the connect accounts receive the funds immediately after the customer pays.

If the fail to provide delievery we refund the connect account invoice but after order is complete

we want to debit 20 percent each connect account on his order + 19 percent tax

and rest money can be just be payout

#

we have achieved stripe invoice and payments on connect behalf ( each connect account has manual payouts now want to charge connect account with 20 percent and payout we are not be able to do that

normal hearth
#

So you want to collect a fee when accepting a payment (pay-in) and also want to specify the th payout amount?

#

Are you using destination charges?

somber field
#

no

#

not using destination charge

#

for first time we are using stripe invoice and that money goes to connect accounts

normal hearth
#

So you are using direct charges

somber field
#

after connect account perform order delievery we want to charge 20 percent fee or whatevery possible as stripe invoice not possible for connect

#

but when we have manual payouts available funds are showing as 0

normal hearth
#

I'd recommend you using destination charges so that you have better control over fund flows

somber field
#

but the connect account has balance which he got for customer that money he can now withdraw after we charge 20 percent so want that money to payout

#

this is our code for charge of 20 percent ? here you want us to use desitination charge or at stripe invoice ?

#

You create a charge on your platform’s account. ( this is writtten we not want to collect money on our platform we want our connect accounts collect payments from customer once they delievery then we want to receive our 20 percent and let them to payout the other amount)

#

this is our requirement we cant hold customer money on platform side we want to have it on connect account side and after order delievery we just want to charge 20 percent to connect account order and rest to be ready for payout

normal hearth
#

Let me clarify, are you chargin 20% for both pay-ins and payouts?

somber field
#

here we are creating invoice for customer and paying to connect account this is working well ( now next part which i shared above at that part we want to charge 20 percent and let connect to payout rest 80 percent amount)

#

let me explain

let suppose customer comes to our website and choose 2 connect account services
50 euro each connect account
platform will charge customer 5 percent platform fee

customer will pay 50+50+5 euro ( three invoices)

the 5 percent comes to us and 50 goes to connect account

after connect account deliever the order that we need to charge connect account with our comiission for 20 percent (10 euro on 50 ) rest to be available for payout as we have manual payouts so now he can withdraw that 40

#

on last part where we want to debit our commission from connect account and make other amount available for payout there we are facing issue (we are using express accounts so we can debit their money) the only requirement until order is complete the money stays on connect account after successful delievery we want to collect 20 percent else we are refunding the invoice that is working fine

normal hearth
#

No there's no way for a platform to debit funds from a standard connected account. Account debits (https://docs.stripe.com/connect/account-debits) is only applicable to express/custom accounts

You should include all the fees that the platform would charge in the appplication_fee upfront. and you can create application fee to return some funds to the connected account if applicable

somber field
#

we have express account debit is fine

#

we just have issue the account has manual payouts so their funds not showing as available but showing as instant available

#

and we want to charge our express connect account with 20 percent and make the other amount payout that we need to know how can this is our last part code ( 20 percent charge perform but balance shows 0 so it cause negative to connect account and we want to make the funds ready for payout after 20 percent charge

#

all connect accounts are express

now order supposed to be delieverd by connect account on his money which customer pays we want to caputure our fee and rest to payout that is our usecase

normal hearth
#

Wait, you are doing direct charges on express accounts?

somber field
#

yes is it better or transfer both options are available as per docs

normal hearth
#

No you shouldn't do that. You should use destination charges instead.

somber field
#

if ($balance->instant_available[0]->amount < intval($commissionAmount * 100)) {
return redirect('/active-campaigns')->with('error', 'Insufficient balance in connected account');
}
here the balance show as instant not available ( we want to make payout after charging 20 percent our comission)

somber field
normal hearth
#

No you don't need a charge ID to create an account debit

somber field
#

ok we will use this
$stripe->transfers->create(
[
'amount' => 1500,
'currency' => 'eur',
'destination' => '{{PLATFORM_STRIPE_ACCOUNT_ID}}',
],
['stripe_account' => '{{CONNECTED_ACCOUNT_ID}}']
);

#

but the thing is how can we enable the payout for rest of funds ?

#

after 20 percent account debit

normal hearth
#

Let's do it one by one

#

First you should use destination charges on express accounts, not direct charges

somber field
#

ok we are doing with this method as you said

$stripe->transfers->create(
[
'amount' => 1500,
'currency' => 'eur',
'destination' => '{{PLATFORM_STRIPE_ACCOUNT_ID}}',
],
['stripe_account' => '{{CONNECTED_ACCOUNT_ID}}']
);

destination charge

normal hearth
#

You can also charge 20% application fee with destnation charges

somber field
#

$account = \Stripe\Account::retrieve();
$platformAccountId = $account->id; this will give us our platform account id ? right ?

normal hearth
#

You can decide how much you want to transfer to the connected account and keep the remaining on the platform.

somber field
#

at the time of account creation we arleady set manual payout ( now after 20 percent is done we want to release that 80 percent for payout

#

payout setting is already manual but for making the 80 percent amount for payout how we can make it ?

normal hearth
somber field
#

ok we create payout the money will go to bank of connect account or connect account will withdraw manually ?with request

#

and manual payouts work with specific days ( if days are passed the funds will be payout automatically right ?)

normal hearth
#

Payout means moving funds from Stripe account to a bank account

#

I don't understand your follow-up question

somber field
#

if we create payout the funds will be withdrawn to bank ? right

#

why on connect account with manual payouts if we check balance it shows 0 and instant_available shows

     if ($balance->instant_available[0]->amount < intval($commissionAmount * 100)) {
            return redirect('/active-campaigns')->with('error', 'Insufficient balance in connected account');
        }
#

instant_available[0]->amount this is showing balance not $balance->available

normal hearth
#

I'm afraid that I still struggle to understand you

somber field
#

at the time of capturing our 20 percent comission from connect account ( we are checking his balance )

#

$balance->available shows 0 why he has money

#

$balance->instant_available[0]->amount this show money but $balanace->available[0]->amount shows zero

normal hearth
#

No you can't create a payout if there's insufficent balance

somber field
#

but customer pays that money is going to connect account instead of showing as available it is showing under instant_available what does that mean ? this is my question

normal hearth
somber field
#

when customer pays to our connect accounts those funds not available immediately ?

normal hearth
#

No

somber field
#

okay thanks i will look into, things looks clear now. thanks for your time

normal hearth
#

No problem!