#DaanVDH
1 messages · Page 1 of 1 (latest)
Of the Stripe fee that you were charged on a transaction? I don't think the API has that breakdown, if you talk to our support team they may be able to help you dig down in to this for some transactions
Okay, because this is the way I'm currently calculating the total after fees, It works fine for the other payment methods with the supplied pricing from your website but for card it's just not correct:
bi, _, err := tot.BigInt()
i := bi.Int64()
if err != nil {
return 0, fmt.Errorf("could not calculate transaction fees")
}
switch method {
case Card:
var p float64
var f int64
switch {
case pkg.IsEEACountry(country):
f = 25
p = 0.015
case country == "UK":
f = 25
p = 0.025
default:
f = 25
p = 0.0325
}
return int64(math.Round((float64(i) + float64(f)) / (1 - p))), nil
Gotcha, that does look like the formulas that we have on that page, unfortunately I am not sure why your actual fees would be different here. If you reach out to our support team they can check if your account has slightly different rates or something like that https://support.stripe.com/?contact=true
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Will do, thanks for the help!