我正在尝试自动将资金从网站转移到用户的银行帐户。正确的方法是什么?
我尝试先用 JS 调用创建银行账户拳头:
Stripe.bankAccount.createToken({
country: 'US',
currency: 'USD',
routing_number: routing_number,
account_number: account_number,
account_holder_name: account_holder_name,
account_holder_type: account_holder_type
}, function(status, response) {
token_input.val(response.id);
form.submit();
});
我收到来自 Stipe 的回复:
{id: "btok_8JTQwnYQQAEAlF", object: "token", bank_account: …}
在服务器端我尝试使用 token ()
Stripe::Transfer.create(
:amount => 400,
:currency => "usd",
:destination => params['bank_account_token'],
:description => "Payout"
)
但是我得到条纹的回应是:
No such destination: btok_8JThh75QpdnB4m
将资金从 Stripe 转移到任何美国银行账户的方法是什么?