条纹连接三个不同的账户PHP


stripe connect with three different account php

我正在尝试使用三个不同的帐户进行条带连接付款,但我无法成功,所以如果有人知道这一点,请分享以便我实施它。

示例 = 客户 1 想要将 100 美元的钱交给客户 2,而客户 3(应用程序所有者)需要 10 美元的申请费。

Stripe::setApiKey('customer3 api key');
        try {
        $charge = Stripe_Charge::create(array(
                "amount" =>  100 * 100, // amount in cents, again
                "currency" => "usd",
                "source" => 'customer1 account token',
                "description" => 'xzx@xyx.com',
                "application_fee"=> 10*100,
                "destination" => 'customer2 account number')
              );
        $customer_array = $charge->__toArray(true);
Thanks in advance.

只有平台账户才能收取申请费。从这个意义上说,customer1 应该只是网站上进行付款的用户(即在您的网站上结账的用户或已保存付款详细信息的客户 - 而不是已连接帐户),customer2 将是连接帐户 [0],客户 3 将是平台帐户(您的应用程序正在使用的主 Stripe 帐户)。

您将无法进一步拆分付款。例如,收取费用并将申请费发送到一个已连接帐户,然后将剩余的付款发送到另一个已连接帐户将不起作用:https://support.stripe.com/questions/can-a-charge-s-funds-be-split-among-different-connected-accounts

同样,source应该是表示付款详细信息的令牌,而不是帐户令牌或帐户 ID。您将无法使用账户 ID 直接向已连接的帐号收费。有关付款流程如何与 Connect 配合使用的详细信息,请参阅此处:https://stripe.com/docs/connect/payments-fees

[0] https://stripe.com/docs/connect/connecting-to-accounts