The scenario is there are 3 users in our website, Admin, Sender and Receiver. Sender send payments to Receiver, but in our website Sender not directly send the payment to Receiver, the amount holds on Admin Stripe account and after the confirmation Receiver receive the payment from Admin Stripe account. For this process I create a platform from Admin Stripe Account , now Sender and Receiver both are connected to that platform.
Below are the codes we are using:
Sender Send Payment To Admin Strip Account
\Stripe\Stripe::setApiKey("sk_test_ADMIN_KEY");
\Stripe\Charge::create(array(
"amount" => 400,
"currency" => "usd",
"source" => "tok_18uL5yIXv4Heg2KDdPHJFo8A", // obtained with Stripe.js
"description" => "Charge for [email protected]"
));
Receiver Receive Payment From Admin Stripe Account
\Stripe\Stripe::setApiKey("sk_test_ADMIN_KEY.....");
\Stripe\Charge::create(array(
'amount' => 400,
'currency' => 'usd',
'source' => $token,
'destination' => 'acct_...' //
));
and more all of three users have their stripe accounts, and on test mode all of three have $0 Available Balance. and Amount is not added to Receiver Stripe Account after using the above code.