我正在使用NodeJS和ExpressJS
如何使用Stripe进行帐户验证?这可能吗?我只想验证该用户是否拥有银行帐户,但不希望向他们收费。我可以从此验证中获得哪些详细信息?这仅仅是因为我想过滤平台上的骗子,而这种验证肯定会让他们三思而后行。
答案 0 :(得分:2)
您可以使用以下API验证帐户:
必须先验证客户的银行帐户,然后才能收费。 Stripe支持对许多最受欢迎的银行使用Plaid进行即时验证。如果不支持客户的银行,或者您不希望与Plaid集成,则必须使用API手动验证客户的银行帐户。
检查以下内容:https://stripe.com/docs/api/customer_bank_accounts/verify
stripe.customers.verifySource(customerId, bankAccountId, params)
示例:
var stripe = require("stripe")("sk_test_4eC39HqLyjWDarjtT1zdp7dc");
stripe.customers.verifySource(
"cus_DsJV8TIcCJGSym",
"ba_1DQVjc2eZvKYlo2COqxnGt4h",
{
amounts: [32, 45]
},
function(err, bankAccount) {
});
响应:
{
"id": "ba_1DQVjc2eZvKYlo2COqxnGt4h",
"object": "bank_account",
"account_holder_name": "Anthony Anderson",
"account_holder_type": "individual",
"bank_name": "STRIPE TEST BANK",
"country": "US",
"currency": "usd",
"customer": "cus_DsJV8TIcCJGSym",
"fingerprint": "1JWtPxqbdX5Gamtc",
"last4": "6789",
"metadata": {
},
"routing_number": "110000000",
"status": "new",
"name": "Jenny Rosen"
}
您需要使用条带令牌在条带上创建客户和银行帐户。
创建客户: https://stripe.com/docs/api/customers/create
创建银行帐户: https://stripe.com/docs/api/customer_bank_accounts/create