stripe-payments - Stripe 费用计算

标签 stripe-payments stripe-connect stripe.net

关于Stripe费用计算,有没有什么办法可以根据提供的金额获得Stripe费用。

我们必须以这样的方式实现这一点:我们必须向一个经销商支付 x 金额,并向另一经销商支付 y 金额。

第一种情况:

Let say we have $100 to pay to Stripe.

According to our needs, we want to calculate the Stripe fee first and then add that fee to the $100 amount.

e.g:

Amount to be Paid is $100 + $3 (Stripe fee) = $103 (Total) you need to cut from the customers account.

第二种情况:

We need to pay $95 to the dealer and the $5 left we want to keep in our account (excluding the Stripe fee).

如果这是可能的,我们如何实现它?

最佳答案

最简单的方法是为余额交易添加扩展

$charge = \Stripe\Charge::create(array(
              "amount" => $totalAmount,
              "currency" => $currency_code,
              "source" => $stripeToken,
              "transfer_group" => $orderId,
              "expand" => array("balance_transaction")
            ));

这将为您提供 Stripe 收取的费用,然后您可以进行剩余的计算

关于stripe-payments - Stripe 费用计算,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36907341/

相关文章:

vue.js - 如何修复 Stripe API 错误 : "IntegrationError: We could not retrieve data from the specified Element." in a Vue component?

stripe-payments - 需要在 Stripe 电子邮件收据上显示增值税号

javascript - 如何使用 React Native 集成 Stripe 并符合 PCI 标准?

stripe-payments - 苹果是否为网络支持 iframe 付费?

ruby-on-rails - Stripe retrieve_or_create 卡

ruby - 如何获取自动付款的原始费用和退款 ID

stripe-payments - 传递 application_fee 时出现 Stripe API 错误

objective-c - 几个不推荐使用的对象集成 Stripe API IOS 9

stripe-payments - strip redirect_uri将不起作用

ios - 在解析中设置Stripe Cloud Module