2017-06-05 32 views
0

我已經通過Jayme Davis的文檔進行了搜索,並且我找不到如何使用令牌將賬戶添加到Stripe Managed Account。在文檔中添加銀行賬戶的唯一方式是使用CustomerBankAccount對象,該對象需要CustomerID作爲參數,並且不能與AccountID(即Managed Account ID)一起使用。我基本上想使用Stripe.NET和C#代碼來提出這個請求(來自Stipe的網站)。任何幫助將不勝感激!先謝謝你!Stripe.NET使用令牌添加銀行賬戶到Stripe Managed Account

curl https://api.stripe.com/v1/accounts/acct_1032D82eZvKYlo2C/external_accounts \ 
    -u sk_test_xxxxxxxxxxxxxxxxxxxxxx: \ 
    -d external_account=btok_xxxxxxxxxxxxxxxxxxx 

回答

1

可以使用ExternalBankAccount屬性這個問題,看看在測試的例子here

var params = new StripeAccountUpdateOptions(); 
params.ExternalBankAccount = new StripeAccountBankAccountOptions 
{ 
    TokenId = _token.Id 
} 

var accountService = new StripeAccountService(); 
StripeAccount response = accountService.Update("acct_XXX", params);