我使用的是条纹连接账户,我面临余额不足的错误。我想收取一个人的费用,并将这笔钱分配给两个卖家。
错误:
"error": {
"code": "balance_insufficient",
"doc_url": "https://stripe.com/docs/error-codes/balance-insufficient",
"message": "You have insufficient funds in your Stripe account. One likely reason you have insufficient funds is that your funds are automatically being paid out; try enabling manual payouts by going to https://dashboard.stripe.com/account/payouts.",
"type": "invalid_request_error"
}使用以下格式:
// Using charge and transfer
$charge = \Stripe\Charge::create(array(
"amount" => $chargeprice,
"currency" => "usd",
"source" => Yii::$app->request->post()['Order']['stripe_token'],
// "destination" => $sellerStripeAccount->s_acount_id,
"transfer_group" => Yii::$app->request->post()['Order']['product_id'],
));
// Create a Transfer to a connected account (later):
$transfer = \Stripe\Transfer::create(array(
"amount" => $sellerprice ,
"currency" => "usd",
"destination" => $sellerStripeAccount->s_acount_id,
"transfer_group" => Yii::$app->request->post()['Order']['product_id'],
));
$transfer = \Stripe\Transfer::create(array(
"amount" => $adminammount,
"currency" => "usd",
"destination" => $adminStripeAccount->s_acount_id,
"transfer_group" => Yii::$app->request->post()['Order']['product_id'],
));我使用的是沙盒账号。帮助?
发布于 2018-04-17 23:48:10
你不能转移你还没有的资金。当您创建费用时,资金需要时间(在美国为2天)才能可用。
文档中详细介绍了这一点,并且Stripe解释了如何使用source_transaction将转移链接到原始费用的可用性计划:https://stripe.com/docs/connect/charges-transfers#transfer-availability
发布于 2018-11-20 19:32:50
我也有同样的问题。
正如koopajah所说:
https://stripe.com/docs/connect/charges-transfers#transfer-availability
添加以下内容:
"source_transaction" => "{CHARGE_ID}",解决了这个问题。
https://stackoverflow.com/questions/49878689
复制相似问题