#tanzeel - Connect Payouts

1 messages ยท Page 1 of 1 (latest)

summer verge
#

Hello! It's likely the funds are still in the pending balance, not the available balance. If you fetch the balance via the API you can confirm this.

#

You can use the test card 4000000000000077 to bypass the pending balance in test mode.

sand vine
#

i did't get about pending balance

summer verge
#

Didn't get what?

sand vine
#

what are the balance API ? and what balance api will tell us ?
It will be show the amount of balance in our stripe account ?

summer verge
#

You use that to get details about a Stripe account's balance.

sand vine
#

@summer verge can you please help me to understand this

summer verge
#

That's the Dashboard, which is not what you want.

#

You need to use the API to see the detail required.

sand vine
#

okay just 2 mins i am checking. I am stuck here from last 4 days ๐Ÿ˜ฆ

summer verge
#

We should be able to get you unstuck! Let me know if you have any questions about the Balance API! ๐Ÿ™‚

sand vine
#

{
"object": "balance",
"available": [
{
"amount": 9063,
"currency": "usd",
"source_types": {
"card": 9063
}
}
],
"connect_reserved": [
{
"amount": 0,
"currency": "usd"
}
],
"livemode": false,
"pending": [
{
"amount": -261,
"currency": "usd",
"source_types": {
"card": -261
}
}
]
}

this is what i got response from balance api

summer verge
#

That's your live mode balance. Are you trying to create a Payout in live mode or test mode?

sand vine
#

test mode for now.

summer verge
#

Can you make the API call again, but using your test secret key instead so you can see your test mode balance?

sand vine
#

I am creating the transfer ( charge from user card and transfer funds to particular stripe external account) using this method. Remember we only transfer , payout not created yet.

return await this.stripeClient.transfers.create({
amount,
currency: 'usd',
source_transaction,
destination,
transfer_group: 'ORDER_95',
});

summer verge
#

Wait, let's back up a bit.

sand vine
#

okay okay

summer verge
#

You got the balance from the API, but you got your live mode balance, which has nothing to do with test mode. You need to get your balance in test mode using your test API key.

#

Can you do that and then share your test mode balance details here?

#

Or, wait, maybe I got this wrong!

sand vine
#

let me test i guess it is test mode balance but let me confirm again

summer verge
#

Nope, nevermind.

#

I'm wrong, sorry.

sand vine
#

no worries , liveMode : false is coming. in response

summer verge
#

I don't know why I read "livemode": false, as live mode. ๐Ÿ˜…

sand vine
#

hahah it happens to best of us.

summer verge
#

Okay, so does the Transfer creation succeed as expected?

#

Or is that where you're getting the error?

sand vine
#

Okay so there are two scenarios
when I use this card 4000000000000077 transfer successful and payout also created.

#

But when i use another card lets say 4242424242424242 **balance_insufficient **error occurs

summer verge
#

Yep, that's expected. The other test cards are going to put the money in the pending balance, but you can only create a Payout for funds in your available balance.

sand vine
#

this will be same in live mode ? if this happens how can i send payout to my external banks/cards

summer verge
sand vine
#

here funds means the "money charge from customer card to stripe account ?

summer verge
#

Yes.

sand vine
#

Please tell me what should I do. My whole story is i want to create a scenario just like Escrow
1-Customer (Our users in website) will pay the money from card for services.
2- stripe deduct the money and hold this.
3- we (admin ) will have some fee from the charged money (except stripe transaction fee)
4- then send to our service provider( another entity in our website who is giving services)

summer verge
sand vine
#

One question whenever Payout is created is it means we are going to send the money to his actual external account.

summer verge
#

Yeah, Payouts in Stripe are when money moves from a Stripe account to an external account (typically a bank account).

sand vine
#

yes i want manual payouts.
So there would be no delays like i want so create payout that should arrive to bank account at 10th date.
what i will do can i add delay days property or something else ?

#

or i have to mange it by my side with the code (lets say cron job or scheduler) so only create payout when 10th date is arrived

summer verge
#

Not sure what you're asking... you mentioned both "So there would be no delays" and "what i will do can i add delay days". Do you want no delay or do you want a specific delay?

sand vine
#

I want a specific delay for each payouts

summer verge
sand vine
#

hey @summer verge i have specific events (bookings)
each booking has ending date (like 10 and 14)
when booking ends(completes) i need to send the money (that charged from user before starting date of booking )

so i want to make sure
the payout should release the money on 10th and 14th (not weekly or monthly etc)

Did you get me point ?

summer verge
#

That's something you would need to do on your end, where you trigger the manual Payout at the proper time.

sand vine
#

so in this way the insufficient balance will never occur because with in 2 days the funds will be available in our stripe right

summer verge
#

If that's the amount of time it takes for the funds to become available in your specific scenario, yes.

sand vine
#

how can i check funds are available now ?
like i want to send the payout for my service provider and want to send it after 6 days. But how can i check funds are available in my stripe account ?

summer verge
#

You fetch the account balance and confirm the amount in the available balance will cover the amount of the Payout.

sand vine
#

you mean this balance (that i got from balance api)
"object": "balance",
"available": [
{
"amount": 9063,
"currency": "usd",
"source_types": {
"card": 9063
}
}
],

summer verge
#

Yep.

sand vine
#

so lets say
i have to send two payouts for 50$
before creating payout i will check i have more than 50$ in my available balance if so then boom send payout. am I right ?

summer verge
#

If you want to send two $50 Payouts you would need $100 in the available balance.

sand vine
#

YOU HELPED ME A LOT โค๏ธ BIG THANKS ๐Ÿ™‚

THE ONLY LAST QUESTION FROM YOU NOW

#

yes yes sorry ๐Ÿ™‚

#

One thing I was checking last night even funds are not available in from charge card to stripe account
But when i create transfer after keeping lets say 15% admin fee(admin means us the site where customer booked events)

i can see the amount in Balances.
like 15% of 14$ is 2.1 after processing fee (0.71 )
1.39$ is added to estimated future payouts

#

1.39 we will keep it appears in future estimated payouts but not the rest like (11.20 $ from 14$)
so 11.20$ was in pending state ?

summer verge
#

I recommend you avoid looking at the balances information in the Dashboard and only look at the balance information from the API. The balance info shown in the Dashboard is not detailed enough for your use case and tracking funds at a granular level.

sand vine
#

Okay perfect

#

Thank you very much โค๏ธ

#

you helped me a lot.

#

I hope now i found what I was looking for. Appreciated your time and effort here ๐Ÿ™‚

summer verge
#

Happy to help!

sand vine
#

@summer verge one minute please

#

{
"object": "balance",
"available": [
{
"amount": 9063,
"currency": "usd",
"source_types": {
"card": 9063
}
}
],
"connect_reserved": [
{
"amount": 0,
"currency": "usd"
}
],
"livemode": false,
"pending": [
{
"amount": -261,
"currency": "usd",
"source_types": {
"card": -261
}
}
]
}

still please check i already have enough balance now

#

if i create payout of 30$ it should create but its not creating ๐Ÿ˜ฆ

summer verge
#

What code are you using to create the Payout?

sand vine
#

this one

return await this.stripeClient.payouts.create(
{
amount: parseInt(${amount}),
currency: 'usd',
method: 'standard',
source_type: 'card',
},
{
stripeAccount, // '{{CONNECTED_STRIPE_ACCOUNT_ID}}',
},
);

#

this is image

summer verge
#

To clarify, is the balance information above from your platform account or the connected account?

sand vine
#

i called this api and it returns this so the platform account

summer verge
#

You may want to remove your secret test key from that message. ๐Ÿ™‚

sand vine
#

you may also see its the same as in stripe account api

summer verge
#

So in your actual running code are you trying to create a Payout on your platform account or on a connected account?

sand vine
#

thanks for the highlighting the key mistake ๐Ÿ™‚

#

i am trying to payout in my connected account

#

@summer verge this is one of my connected account user

#

all payouts and transfers under this connected account as you can see

#

I hope you got this now ?

summer verge
sand vine
#

okay let me check

#

@summer verge i didn't get now i need to send the header of connected account id for balance apis is it?

summer verge
#

Yep.

#

If the Payout is being created for your connected account the connected account's balance will be used for the Payout, not your platform balance.

sand vine
#

{
"object": "balance",
"available": [
{
"amount": 0,
"currency": "usd",
"source_types": {
"card": 0
}
}
],
"instant_available": [
{
"amount": 2100,
"currency": "usd",
"source_types": {
"card": 2100
}
}
],
"livemode": false,
"pending": [
{
"amount": 8325,
"currency": "usd",
"source_types": {
"card": 8325
}
}
]
}

Oh so this is what i got when I add connected account id in header
and yes available amount is 0$ you are right

summer verge
#

Okay, so you need to create some charges/transfers to fill up that balance before you can pay anything out.

sand vine
#

when we create transfer (first it will be in pending state) but after 2 or 3 days it will be in available state
So only then i can create payout.

#

Great Great Sir ๐Ÿ™‚ Thank youuuuuuuuuuuuuuuuuuu ๐Ÿ™‚
Now i will test and hopefully it would be done now.

#

โค๏ธ

summer verge