首页 文章

条带连接多个目标帐户ID

提问于
浏览
2

我们可以创建付款并使用NodeJS中的Stripe connect为application_fee收取follows

// Get the credit card details submitted by the form
var token = request.body.stripeToken;

// Create the charge on Stripe's servers - this will charge the user's card
stripe.charges.create(
  {
    amount: 1000, // amount in cents
    currency: "eur",
    source: token,
    description: "Example charge",
    application_fee: 123 // amount in cents
  },
  {stripe_account: CONNECTED_STRIPE_ACCOUNT_ID},
  function(err, charge) {
    // check for `err`
    // do something with `charge`
  }
);

可以使用Stripe native checkout handler获取源代码 .

但是,如果我有一个市场并且我想要检查具有不同作者的多个项目,那么我将如何继续?

问题是我需要从一个来源创建多个费用 . 但是系统会认为存在错误,因为总量(在检索stripeToken源时使用)与单个量(单个项目)不匹配 .

1 回答

  • 1

    一次充电不能在多个账户之间分配 .

    1)您需要将令牌保存到平台帐户中的客户 . 2)使用"Shared Customers"为每个要创建费用的帐户创建新令牌

    // Create a Token from the existing customer on the platform's account
    stripe.tokens.create(
      { customer: CUSTOMER_ID, card: CARD_ID },
      { stripe_account: CONNECTED_STRIPE_ACCOUNT_ID }, // id of the connected account
      function(err, token) {
        // callback
      }
    

    3)使用新令牌使用您在问题中的代码创建费用

相关问题