【问题标题】:Stripe: Send payout to customers' external bank account or debit cardStripe:将付款发送到客户的外部银行账户或借记卡
【发布时间】:2020-12-15 05:34:31
【问题描述】:

我正在尝试向用户添加的外部银行账户或借记卡付款,但我收到了类似No such external account: ''的错误

我已经使用 https://stripe.com/docs/api/external_accounts#external_accounts 这个对象添加了一个外部银行账户或卡,我可以添加一个银行账户和卡,当我使用这些详细信息进行支付时,它会出错。

我的要求是: 用户有他们的个人钱包,用于存储金额。每当用户想要提取资金时,他们可以添加银行帐户或借记卡,然后他们可以将金额记入他们的银行。

谢谢

【问题讨论】:

    标签: node.js stripe-payments


    【解决方案1】:

    要汇款,您必须将用户信息保存在 Stripe 中。将注册 button 插入到 Stripe。 然后将 Stripe 用户 id 存入数据库:

    const stripe = require('stripe')(StripeSecretKey);
    
    const stripeUser = await stripe.oauth.token({
          grant_type: 'authorization_code',
          code,
    });
    
    DB.save(stripeUser.stripe_user_id); // example
    

    现在您可以通过这种方式汇款:

    const stripe = require('stripe')(StripeSecretKey);
    
    const stripeUser = await DB.find(id); // example
    
    await stripe.transfers.create({
          amount,
          currency,
          destination: stripeAccount.stripeAccountId,
    });
    

    更多关于transfers和oauth的信息。

    【讨论】:

    • 如何转账到借记卡银行账户?
    • @MysteriousCoder 同样,要汇款给其他用户,他必须使用您网站上的按钮进行注册,注册时他会显示他的卡或银行帐户,您将参考 Stripe 中的用户 ID并会寄钱给他
    • 我知道,但使用转账 api 我无法向他们的借记卡汇款。
    • 我希望可以。 transfer和payout api有什么区别
    • @MysteriousCoder payout - 将资金提取到您的个人卡或转移到其他 FULL Stripe 用户/转移 - 将资金转移到通过您的应用程序注册的用户的帐户,他们没有完整的Stripe 中的帐户。阅读文档,伙计)支付:stripe.com/docs/api/payouts 转账:stripe.com/docs/api/transfers
    猜你喜欢
    • 2023-03-23
    • 2018-04-26
    • 2016-05-09
    • 2016-07-18
    • 1970-01-01
    • 2018-09-26
    • 2021-10-25
    • 2016-01-31
    • 2021-06-06
    相关资源
    最近更新 更多