1
votes

I am implementing paypal checkout 2.0 with smart buttons into an eCommerce website I am developing.

Now the problem I am facing is that the "shop" is priced in South African Rands(ZAR) and paypal gateway does not support ZAR as a currency to pay in, so I convert the currency to USD through a third party library. where I send a get request to an api and get the exchange rate for USD/ZAR.

then I divide the product order total/exchange rate and the result is the USD amount. which I parse to the paypal object then proceed with the checkout.

The problem is that Paypal has its own exchange rate and when it picks up that a users card is with a South African Bank it automatically does a conversion and shows the user how much he/she will be paying in the ZAR amount, and that value is different to the actual ZAR Amount.

I would like to know is there an api I can request the exchange rate of the USD/ZAR amount and use that value as the exchange rate or Is there away to disable the ZAR value from being Shown in the checkout

enter image description here

1

1 Answers

0
votes

There is no API to get the current foreign exchange rate. The rate varies from moment to moment.

As far as hiding the rate in your screenshot, the answer is no. That currency conversion is happening for the buyer end and is invisible to whoever is receiving a payment denominated in a different currency (USD in this case). They have no visibility or control over this process. A buyer paying from a non-South African country would see something entirely different on this screen, for instance --not ZAR. So that's entirely between them and PayPal, you are not a party to this.