I will explain my business logic here,
step 1. i use my stripe test api credentials in code
step 2. i provide shop site for shop owners (like shopify), where customers can purchase products from them using stripe
step 3. shop owners update their card details and their card token store in DB
step 4. when customers purchase 10 rupees product, i took 1 rupee as service fee and i transfer 9 rupee to shop owner stripe account
in old stripe api version i use charge like ,
$charge = \Stripe\Charge::create(array(
'amount' => 100,
'currency' => 'gbp',
'customer' => "cus_AAAAA",
'destination' => array(
"account" => "shop_owner_account,
"amount" => 1
)
));
it worked well..
but suddenly i got error like 'destination account must have any one of legacy_payments or transfers'.
then i used like,
$account = \Stripe\Account::create(array(
"type" => "custom",
"country" => "GB",
"email" => 'asdsad@gmail.com',
'capabilities' => [
'card_payments' => ['requested' => true],
'transfers' => ['requested' => true],
]
));
and used Connect Onboarding for Custom accounts to get business details
but still got payout error "Add a bank account or debit card to enable payouts."
i have to get bank details from shop owner ? is it mandatory ? , because i already got card details (token, carid)
how to achieve above in new stripe api using php stripe