[英]Cannot create or update posts using php v3 library ((403) We're sorry, but you don't have permission to access this resource.')
[英]stripe create payout getting error “Sorry, you don't have any external accounts in that currency (usd)”
我正在努力創建支付,而運行代碼我收到錯誤
Sorry, you don't have any external accounts in that currency (usd)
首先我創建了客戶,然后我創建了銀行賬戶,之后我正在做支付,任何人都可以幫助我如何解決這個問題,這是我的代碼
<?php
require_once('init.php');
\Stripe\Stripe::setApiKey("*************");
$customer = \Stripe\Customer::create(array(
"description" => "Customer for payout"
));
$customer_id = $customer->id;
$customer = \Stripe\Customer::retrieve($customer_id);
$bank_data = \Stripe\Token::create(array(
"bank_account" => array(
"country" => "US",
"currency" => "usd",
"account_holder_name" => "Charlotte Thomas",
"account_holder_type" => "individual",
"routing_number" => "110000000",
"account_number" => "000123456789"
)
));
$bank_token = $bank_data->id;
$bank_account = $customer->sources->create(array("source" => $bank_token));
$payout_data = \Stripe\Payout::create(array(
"amount" => 100,
"currency" => "usd",
));
echo "<pre>";
print_r($payout_data);
die;
?>
對於付款,如果這是您自己的Stripe帳戶,則需要在信息中心的https://dashboard.stripe.com/account/payouts中輸入您的銀行帳戶詳細信息。 如果您希望能夠通過API創建付款,還需要將付款時間表設置為“手動”。
另請注意,在創建費用時,資金不會立即可用,因此您無法在創建費用后立即創建付款。 您可以在https://stripe.com/docs/payouts上閱讀Stripe文檔中有關付款的所有信息。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.