【问题标题】:Charging a user via Stripe and depositing money into another users account通过 Stripe 向用户收费并将钱存入另一个用户帐户
【发布时间】:2016-08-14 02:17:05
【问题描述】:

我有一个基本上是商店的 Web 应用程序。用户的帖子要出售,其他用户购买。这是我第一次使用 Stripe API,我需要向买家的信用卡(客户或仅从 Stripe 代币)收取费用,然后将其存入卖家账户。我在文档中看到,如何为卡充电,例如

var stripeToken = request.body.stripeToken;

var charge = stripe.charges.create({
  amount: 1000, // amount in cents, again
  currency: "usd",
  source: stripeToken,
  description: "Example charge",
  metadata: {'order_id': '6735'}
}, function(err, charge) {
  if (err && err.type === 'StripeCardError') {
    // The card has been declined
  }
});

但是我完全不知道如何将钱存入卖家的银行账户?我需要用户的银行账户信息吗?借记卡?我是否让他们成为我 Stripe 帐户中的客户?

【问题讨论】:

    标签: javascript node.js stripe-payments payment


    【解决方案1】:

    您需要使用Stripe Connect代他人收款。

    您可以找到文档here。简而言之,Connect 可以与 standalone accounts(与您的一样是全功能的 Stripe 帐户)和 managed accounts(它们是仅存在于您自己的帐户中的“类似帐户”的实体)一起使用。

    您应该使用哪个取决于您所在的位置(管理帐户尚未在任何地方都可用)和您的确切需求。 This article 有一些信息可以帮助你选择。

    然后您需要决定是否要向directly on the connected account 收费:

    var destination = 'acct_...'; // ID of the destination account
    var charge = stripe.charges.create({
      amount: 1000, // amount in cents, again
      currency: "usd",
      source: stripeToken,
      description: "Example charge",
      metadata: {'order_id': '6735'}
    }, {stripe_account: destination},
    function(err, charge) {
      ...
    

    through the platform:

    var destination = 'acct_...'; // ID of the destination account
    var charge = stripe.charges.create({
      amount: 1000, // amount in cents, again
      currency: "usd",
      source: stripeToken,
      description: "Example charge",
      metadata: {'order_id': '6735'},
      destination: destination
    }, function(err, charge) {
      ...
    

    【讨论】:

    • 这是否意味着我的 Web 应用程序用户需要条带帐户?
    • 如果他们需要接收资金,可以。如果托管账户可用(即如果您位于美国和加拿大),您可以使整个体验非常透明——除了同意 Stripe 的服务条款外,托管账户永远不会直接与 Stripe 交互,一切都通过平台进行(即你)。
    猜你喜欢
    • 2020-12-13
    • 2015-11-10
    • 2011-09-01
    • 1970-01-01
    • 2020-04-17
    • 2020-09-04
    • 2021-12-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多