#eskimo_dev
1 messages ยท Page 1 of 1 (latest)
Hi there
hello
Yeah you shouldn't really do it that way. If they ask for a refund you just refund the full amount regardless of whether the FX rate has changed.
well, we're doing a partial refund, since they forgot to use their coupon code
i just don't understand how the numbers don't add up that the api is returning
ok so our price is 399.99 in cad the customer apparently paid 553.58
we got 396 it seems and it says the exchange rate is 0.715339
so that adds up that way, but if i try to use that same rate of 0.715339 to go from 396 to cad, it comes out as 508.73?
Oh yeah there is a built in FX fee as well
so the customer pays that fee?
For US businesses there is a 1% FX fee
If you are trying to issue a partial refund then you know the partial amount that they are owed back right?
yes, that's easy to calulate based on the rate, but what if we're gonna give a full refund, i still need to be able to calculate the full amount properly
The full amount is just refunding the 399.99
Have you read through https://stripe.com/docs/currencies/conversions#conversions-disputes-refunds ?
That explains it mostly:
The amount deducted from your merchant balance depends on the current rate and this amount might be more or less than the original payment. The customer is always refunded the exact amount they paid and in the currency they paid in, regardless of any rate fluctuations.
but you refund in the customers currency, not yours
so i need to calculate how much to refund them
I don't understand. You don't specify an amount at all for a full refund
oh?
so not putting amount is a full refund?
don't you need to put an amount?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ohhh nevermind, the amount is optional, no amount is full
ok i can work with that
still confused why the amounts aren't adding up to what the customer paid though
The amounts won't be the same because the 1% FX fee is charged when that currency conversion takes place.
Do you have a specific PaymentIntent ID I can look at
pi_3Nkp6yHCU60rhTgG1NyRbSyN
How are you performing your calculation
I'm wrong actually and the FX fee is built into that exchange rate you see
If you simply do 396/.715339 then it comes out to 553.58
oh wtf
๐
i was making it way more complicated
i was doing 1 - the rate, then + 1 then * the sale amount
lol yeah that's not gonna work
never dealt with conversion shit before
Glad we got it sorted out !
thanks for making me feel like a moron
Any time