![](/img/trans.png)
[英]How to make External Bank account as default account in Stripe Connect?
[英]How to connect to managed account in stripe and make a payment?
首先,對不起我的英語。
我想在Stripe中創建從帳戶A到帳戶B的費用。帳戶A是管理帳戶。 帳戶B可以是多個帳戶中的任何一個。 但是,當我嘗試使用目標參數創建費用時,API會返回錯誤。 說:
"error": {
"type": "invalid_request_error",
"message": "The destination param must be a connected account.",
"param": "destination"
}
如何連接目標帳戶(帳戶B)以獲取此權限??。 我正在為此使用php api條。 接下來,這是我使用的示例代碼。 提前致謝:
\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>";
如果您已經閱讀了Stripe文檔,則可以清楚地看到Stripe Connect中存在三種收費類型。
就您而言,您將不得不使用目的地費用。 你可以用
$charge = \Stripe\Charge::create(array(
"amount" => 1000,
"currency" => "usd",
"source" => "cus_ID_CUSTOMER_TO_GET_PAYMENT",
"destination" => array(
"account" => "{CONNECTED_STRIPE_ACCOUNT_ID}",
),
));
代表您的關聯帳戶向客戶收費。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.