First of all, I'm Sorry for my english.
I want to create a charge in Stripe from account A to account B. The account A is a mananaged account. The account B can be any of multiple accounts. But when I try to create the charge with the destination parameter the API resturn an error. Says:
"error": {
"type": "invalid_request_error",
"message": "The destination param must be a connected account.",
"param": "destination"
}
How I could connect the destination account (Account B) to get this??. I'm using the php api stripe to this. Next this is the example code that I using. Thanks in advance:
\Stripe\Stripe::setApiKey('sk_test_ACCOUNT_A_KEY');
// Charge the order:
$charge = \Stripe\Charge::create(array(
// 'source' => $token,
'customer' => 'cus_ID_CUSTOMER_TO_GET_PAYMENT',
"amount" => 100000,
"currency" => "usd",
"description" => "from account A to account B",
'destination' => 'acct_ID_DESTINATION_ACCOUNT'
)
);
echo "<pre>";
print_r($charge);
echo "</pre>";