Foreign Currencies and API

SystemSystem Posts: 412 admin
This discussion was created from comments split from: Foreign Currency Invoices and Bills.

Comments

  • murraymurray Member Posts: 18

    I'm selling a product in multiple countries. The product has a single unit price in Australian dollars. When I generate the invoice for a New Zealand customer I was expecting the unit price to adjust to the currency of the invoice, but it didn't, it was still the Australian dollar value. So the total of the invoice was the Australian total, not the New Zealand total, although the invoice shows a New Zealand dollar value.

    PS I'm really enjoying using Wave and am now using the API to create customers and invoices. This is awesome!

    Currently I'm wondering how to work around this - that is, access the exchange rates and then apply this to the default unit price. The currencies api call doesn't provide an exchange rate. However if I create an invoice in this currency it includes the exchange rate. So I may be able to get the exchange rate and then manually adjust the unit price for this customer.

    I keep thinking, I must be doing something wrong. Surely the unit price should be automatically adjusted to the currency for the customer? Can anybody help?

    Currently I'm planning to create a dummy invoice for the customer with just a single item. Retrieve the invoice and extract the exchangeRate. Next I delete the dummy invoice. Now I can create the real invoice, and using the exchangeRate make the appropriate adjustment to the unit prices.
    1) It would be easier if there was a function called 'exchangeRate' to retrieve the exchange rate for this customer's currency.
    2) It would be ideal if Wave did the adjustment to the unit price automatically.

    edited May 21, 2020
  • ConnorMConnorM Member Posts: 1,229 ✭✭✭

    Hey @murray! Thanks for reaching out here. I've split your comment out into it's own discussion within our API forums, which should yield some more fruitful results! I'm also going to flag this question for my development teams in order for them to get back to you with some insight.

  • murraymurray Member Posts: 18
  • PaulCPaulC Member Posts: 186 ✭✭✭

    Hi @murray,

    Thanks for sharing your experience.

    While Wave allows you to set a price on a Product, this is not in fact explicitly assigned a currency. While it is reasonable to assume this would be in your business' currency, I've seen Wave customers set up:
    Product A - [amount]
    Product A (Other currency) - [different amount]
    etc.

    While Wave uses its internal currency calculations for accurate bookkeeping, it is actually very difficult to create a way of determining foreign currency invoice amounts that customers in general will be happy with.

    Specifically, we use mid-market rates from XE.com, which is never the rate that you will get from the bank. Most Wave customers, when they sell in foreign currency, do something like this:

    • Rate in my currency
    • Adjust to foreign currency based on typical actual bank exchange rate
    • Add a little bit, just to be safe
    • Round up or down a little bit to a nice number - e.g. a whole number; ending 9; nearest 5; etc.

    This is why we are not attempting to calculate the foreign currency price, and leave customers to input their own price, which we then convert back to business currency for bookkeeping.

    It sounds like the process you are following gives you a way to get access to the 'mid-market' rate, and from there you should be able to code your own rules to get to a 'customer price' if that is something you want to do.

    Hope that helps.

  • murraymurray Member Posts: 18

    Hi @PaulC

    I understand what you are saying, our Wave customers are not banks so they are not under any pressure to provide currency exchange rates in line with XE.com, but at the same time managing different product entries for each country is not our best solution.

    Our Wave customers do want to grow their businesses, so providing automated solutions is something we should be supporting. The API provides a great way of automating these processes so all of our businesses can grow without manual intervention. There are two methods of pricing for the international market:
    a) Sell everything in your local currency
    b) Sell everything in the customers currency using some derived exchange rate

    For many years companies have adopted method (a) as it simplifies all of the pricing and the accounting. However method (b) enables a company to market their products in any country and appear to be local. There are two options we can use to support local currency:
    1) Maintaining 195 entries for "Product A" (one for each country) and maintaining all of the changing exchange rates with each of those countries. This really is untenable.
    2) Maintain 1 entry for "Product A" with our local currency. Then we use the current XE.com exchange rate for this country to calculate the price. Please note when calculating the price we might had a small 3% markup to the exchange rate, possibly with rounding, to arrive at the product price for each country.

    My ideal solution is an API call: exchangeRate($countryCode) that provides an exchange rate. I can then modify this rate as necessary for arriving at a local price for any country in the world. I can use the same process when a website visitor from Moldovia (a random country) wants to know the price of my product in their local currency.

    Now, I realise I could simply go to XE.com directly and retrieve the same exchange rate. Actually, I did this with a system a few years back, however I found XE.com was not always responding, so I couldn't rely on it. I'm assuming you have programmed a solution to work around XE.com being offline (probably storing the last know rate for each country). Having access to a WaveAPI call exchangeRate would solve this problem nicely.

    I have a work-around for the moment, but I would appreciate you keeping this option on your to do list.

    Cheers
    Murray

  • PaulCPaulC Member Posts: 186 ✭✭✭

    Hi @murray,

    Thanks for the additional colour.

    I agree that the best approach would be to get an authoritative exchange rate and manipulate this 'on the fly' to set the customer rate in whatever currency.

    I understand it would be convenient to get the rate from Wave, but we license our rates from XE.com which is a paid service, and the license is to use them in our product. We are not at liberty to re-publish XE's rates in a 'bare' exchange rates API endpoint.

    If I were in your position, I would consider alternative APIs. Based on a couple of quick searches, I think that ExchangeRatesAPI.io (free), published by the European Central Bank, looks like a good bet. Getting rates looks simple, for example to get NZD against AUD base, call https://api.exchangeratesapi.io/latest?base=AUD&symbols=NZD. This returns:

    {
        "rates": {
            "NZD": 1.0696649562
        },
        "base": "AUD",
        "date": "2020-05-27"
    }

    While the ECB rate may not be identical to Wave's XE rate, the fact that you are going to apply a margin and rounding makes this unimportant.

    Hope that helps.

Sign In or Register to comment.