我知道您必须创建一个客户并验证一个银行帐户,但我不确定如何做后者。
我该如何在客户身上验证它们?
要将银行账户添加到客户,您需要创建一个令牌并将其添加到 sourceToken 参数,因为目前尚未实现使用银行账户服务添加。例如:
BankAccountCreateOptions bankAccount = new BankAccountCreateOptions();
bankAccount.SourceBankAccount = new SourceBankAccount() {
AccountHolderName = accountHolderName,
AccountHolderType = "company",
AccountNumber = bankAccountNumber,
BankName = bankName,
Country = "US",
Currency = "usd",
RoutingNumber = bankAccountRoutingNumber
};
// Setup the customer
StripeCustomerCreateOptions options = new StripeCustomerCreateOptions();
options.Email = email;
options.Description = company;
options.PlanId = plan.Id;
options.TrialEnd = DateTime.UtcNow.AddMonths(1);
options.SourceToken = bankAccount.SourceToken;
// Create the customer
StripeCustomer customer = new StripeCustomerService().Create(options);
但是,我仍然不知道如何验证创建后的银行帐户。