[英]stripe create payout getting error “Sorry, you don't have any external accounts in that currency (usd)”
I am working on create payout, while run the code i am getting error 我正在努力创建支付,而运行代码我收到错误
Sorry, you don't have any external accounts in that currency (usd)
first i am creating the customer, and then i am creating the bank account, and after then i am doing the payout, can anyone please help me how can i resolve this issue, here is my code 首先我创建了客户,然后我创建了银行账户,之后我正在做支付,任何人都可以帮助我如何解决这个问题,这是我的代码
<?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;
?>
You're adding a bank account as a payment source to a customer object , ie for ACH payments . 您将银行帐户添加为客户对象的付款来源 ,即ACH付款 。
For payouts, if this is your own Stripe account, you need to enter your bank account details in your dashboard at https://dashboard.stripe.com/account/payouts . 对于付款,如果这是您自己的Stripe帐户,则需要在信息中心的https://dashboard.stripe.com/account/payouts中输入您的银行帐户详细信息。 You'll also need to set your payout schedule to "Manual" if you want to be able to create payouts via the API.
如果您希望能够通过API创建付款,还需要将付款时间表设置为“手动”。
Also note that when creating charges, funds are not immediately available, so you will not be able to create a payout immediately after creating a charge. 另请注意,在创建费用时,资金不会立即可用,因此您无法在创建费用后立即创建付款。 You can read all about payouts in Stripe's documentation at https://stripe.com/docs/payouts .
您可以在https://stripe.com/docs/payouts上阅读Stripe文档中有关付款的所有信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.