简体   繁体   English

条纹费计算公式

[英]Stripe Fee calculation Formula

How we can calculate the Stripe. 我们如何计算条纹。

I am using this formula to calculate Stripe Fee. 我正在使用此公式来计算条纹费用。

Say

amount = $100

(100 * 0.029) + 0.30 = 103.20

But On stripe it is displaying 103.29 instead of 103.20 . 但在条纹上它显示103.29而不是103.20

Don't know what's going on?? 不知道发生了什么事?

Stripe's pricing depends on the region, and might vary according to some other factors such as whether the card is domestic or not, or the card's brand. 条纹的价格取决于地区,并可能根据其他一些因素而变化,例如卡是否为国内卡,或卡的品牌。 But for US accounts, the pricing is simple: 2.9% + $0.30. 但对于美国账户,定价很简单:2.9%+ 0.30美元。

So if you create a $100.00 charge, the fee will be: 因此,如果您创建100美元的费用,费用将为:

($100.00 * 2.9%) + $0.30 = $3.20. ($ 100.00 * 2.9%)+ $ 0.30 = $ 3.20。

Those $3.20 will be taken out of the $100.00, ie the customer will be charged $100.00 and your account's balance will be increased by $96.80 ($100.00 - $3.20). 这些3.20美元将从100.00美元中扣除,即客户将收取100.00美元,而您的账户余额将增加96.80美元(100.00美元至3.20美元)。

If you want to pass the fee to the customer, then it's a bit more complicated, but this article explains the math you need to apply. 如果您想将费用转嫁给客户,那么它会有点复杂,但本文解释了您需要应用的数学。

In this case, if you want to receive $100.00, you'd compute the charge's amount like this: 在这种情况下,如果您想要获得100.00美元,您可以像这样计算费用金额:

($100.00 + $0.30) / (1 - 2.9%) = $100.30 / 0.971 = $103.30. ($ 100.00 + $ 0.30)/(1 - 2.9%)= $ 100.30 / 0.971 = $ 103.30。

So you'd charge $103.30 to your customer. 因此,您需要向您的客户收取103.30美元的费用。 Stripe's fee will be $3.30 ($103.30 * 2.9% + $0.30 = $3.30), and your account's balance will be increased by $100.00. Stripe的费用为3.30美元(103.30美元* 2.9%+ 0.30美元= 3.30美元),您的账户余额将增加100.00美元。

  function calculateCCAfterFee(qty) {
  var FIXED_FEE = 0.30;
  var PERCENTAGE_FEE = 0.029;
  return Number((qty + FIXED_FEE)/(1 - PERCENTAGE_FEE)).toFixed(1);
}

For the lost js developer ... 对于失去的js开发者......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM