gpt4 book ai didi

javascript - 使用 strip 验证用户银行只是为了激活帐户

转载 作者:行者123 更新时间:2023-11-30 14:19:06 25 4
gpt4 key购买 nike

我正在使用 NodeJS 和 ExpressJS

如何使用 stripe 实现帐户验证?这可能吗?我只想验证该用户是否有银行账户,但我不想向他们收费。我可以从该验证中获得哪些详细信息?这只是因为我要在我的平台上过滤骗子,这种验证肯定会让他们三思而后行。

最佳答案

您可以使用以下 API 验证帐户:

A customer's bank account must first be verified before it can be charged. Stripe supports instant verification using Plaid for many of the most popular banks. If your customer's bank is not supported or you do not wish to integrate with Plaid, you must manually verify the customer's bank account using the 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"
}

您需要使用 stripe token 在 stripe 上创建客户和银行帐户。

创建客户: https://stripe.com/docs/api/customers/create

创建银行账户: https://stripe.com/docs/api/customer_bank_accounts/create

关于javascript - 使用 strip 验证用户银行只是为了激活帐户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53043940/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com