【问题标题】:Stripe send payment to connected accounts within platformStripe 向平台内的关联账户发送付款
【发布时间】:2017-01-11 11:07:12
【问题描述】:

场景是我们的网站有 3 个用户,Admin、Sender 和 Receiver。 发件人将付款发送给收款人,但在我们的网站发件人不直接将付款发送给收款人,该金额保留在 Admin Stripe 帐户 中,并在确认收款人从 Admin Stripe 帐户 收到付款后强>。对于这个过程,我从 Admin Stripe Account 创建了一个平台,现在 Sender 和 Receiver 都连接到该平台。

以下是我们正在使用的代码:

发件人将付款发送到管理员剥离帐户

\Stripe\Stripe::setApiKey("sk_test_ADMIN_KEY");

\Stripe\Charge::create(array(
  "amount" => 400,
  "currency" => "usd",
  "source" => "tok_18uL5yIXv4Heg2KDdPHJFo8A", // obtained with Stripe.js
  "description" => "Charge for abigail.white@example.com"
));

收款人从管理员 Stripe 帐户接收付款

\Stripe\Stripe::setApiKey("sk_test_ADMIN_KEY.....");

\Stripe\Charge::create(array(
  'amount' => 400,
  'currency' => 'usd',
  'source' => $token,
  'destination' => 'acct_...' // 
));

三个用户都有自己的条带帐户,并且在测试模式下,三个用户都有 $0 可用余额。使用上述代码后,Amount 不会添加到 Receiver Stripe Account 中。

【问题讨论】:

    标签: php stripe-payments stripe-connect


    【解决方案1】:

    在代表第三方接受付款时,您不能在平台账户(“管理员”)中持有资金。出于合规原因,您必须在创建费用时设置目标帐户。

    \Stripe\Stripe::setApiKey("sk_test_..."); // platform's API key
    
    \Stripe\Charge::create(array(
      'amount' => 400,
      'currency' => 'usd',
      'source' => $token,
      'destination' => 'acct_...' // connected account's ID
    ));
    

    这将向客户收费(通过$token 中的付款方式)并将资金添加到关联帐户的余额中。一旦资金可用,就可以将其转入关联账户的关联银行账户。

    请注意,由于此费用是“通过平台”创建的(即使用 destination 参数),平台将支付 Stripe 的费用并负责退款和退款(参见 here)。由于没有application_fee 参数,平台将在此交易中实际亏损,因为它会支付 Stripe 的费用但不会收到任何东西。

    如果您使用managed accounts,那么您(作为平台)也可以控制向关联银行账户的转账。你可以阅读更多关于这个here的信息。

    使用standalone accounts,平台无法控制银行转账——相反,每个独立账户的所有者可以通过他们自己的账户设置来控制。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-01-22
    • 2023-03-23
    • 2018-09-26
    • 2016-11-30
    • 2016-05-09
    • 2021-12-27
    • 2016-07-18
    • 2015-03-01
    相关资源
    最近更新 更多