#ImBatman - transfer

1 messages · Page 1 of 1 (latest)

solar crest
#

Hi there!

#

The payout schedule of the connected account will define when the funds will be moved to their bank account.

runic cairn
#

There's a button for connect account. When it is clicked the payout will occur

#

So any Api or suggestions?

solar crest
#

There are two main option for the payout schedule:

  • automatic: it will be automatically sent to their bank at a regular interval (like every day or every week)
  • manual: it will be sent to their bank account when the platform use the payout API: https://stripe.com/docs/api/payouts/create
runic cairn
#

$stripe->payouts->create([
'amount' => 1000,
'currency' => 'usd',
'source_type' => 'bank_account'
], [
'stripe_account' => 'CONNECT_ACCOUNT_ID',
]);

#

above function will payout from our account to Connect one?

solar crest
#

Just to be clear, it's a 2 step process:

  1. Transfer funds fomr the platform to the connected account
  2. Then create a payout for the connected account
runic cairn
#

Yea, I've done the first part, transfer money to connect account

solar crest
#

But yes the code you shared looks correct.

runic cairn
#

But confused about payout, like my connect account has some amount. and that needs to payout

runic cairn
#

I want that the amount which is hold by Connect Account can payout to it's physical account when the withdraw button is clicked in my application.

solar crest
runic cairn
#

There's nothing in log, but here's the message that I receive. And this seems like My original stripe is sharing balance to connect account which is not the case I want.

solar crest
#

Can you share the account ID of the connected account?

runic cairn
#

acct_1LNFW3RmnZ3aT5K7

solar crest
#

It looks like this account has no available balance, so it's expected to fail.

#

Also, depending on what you want to do, you could remove the source_type: "bank_account" from your request. But in this case it will still fail since you don't have enough available balance.

runic cairn
runic cairn
#

another thing, when I'm creating the payout, balance retrieval, should I be using Connect account API key ?

turbid tendon
#

you should be using your platform API key and the Stripe-Account header

runic cairn
# runic cairn

My apologies, I'm still confused that I have balance in this connect account and I'm unable to do the payout

$stripe->payouts->create([
'amount' => 100,
'currency' => 'usd'
], [
'stripe_account' => 'acct_1LNFW3RmnZ3aT5K7',
]);

turbid tendon
#

can you share the exact JSON response you got from retrieving their balance?

#

do you have a specific reason for using 'source_type' => 'bank_account' by the way? Do you know what it means?

runic cairn
#

$stripe->balance->retrieve();
this will give me my account balance, right?
I have to fix the connect account header for this?

turbid tendon
#

yep. It's $stripe->balance->retrieve([], ['stripe_account'=>"acct_xxx"]) I think

runic cairn
turbid tendon
runic cairn
#

Got it, I removed the source_type.

#

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

turbid tendon
#

yep so you don't have available balance.

#

in test mode if you process a charge using the specific test card for this scenario the funds from that charge are available immediately and you can make payouts with them for testing of the manual payout scenario, if that's what you're looking to build.

runic cairn
#

Got it.
This is the scenario I did.

  • Created normal charge (ch_3LPOyODam180tPuS10J0L1U0) (using 4242 card)
  • Use that charge for transfer in connected account using source_transaction

Even for this scenario, I should do the available balance number?

turbid tendon
#

yes

runic cairn
#

got it, I'll run this flow

turbid tendon
#

source_transaction doesn't really change this, it just means that the request to create the Transfer will succeed without having to wait for the funds in your own account to move from pending to available

#

but you still can't take the money out of Stripe with a payout until after the payout speed in the docs, when the balance becomes available

runic cairn
#

roger.
and even if I'm providing source_transaction. I should also mentioned the exact values that needs to be transferred?
Like I have a charge ABC of $10. So, while creating transfer instead of $10 I insert $1 and source_transaction as ABC. Then only $1 amount will transfer to connect account, it'll not take the ABC amount?
Then, If I want to transfer the Exact charge amount, I have to insert the Exact value in transfer amount?

turbid tendon
runic cairn
#

yea, but it's like I want to have amount in my account then when everything is cleared then I'll transfer to connected account.

cursive oyster
#

👋 taking over for my colleague. Let me catch up.

runic cairn
#

Hi, Is there any way to have a subscription that can be less than daily basis for test purpose? Like subscription charge every 4 hours etc?

cursive oyster
#

for testing you could use the test clocks

runic cairn
#

thank you, looking into it.