Multiple currencies with different pricing per currency

My client supports two currencies USD and AUD.
Purchasers based in Australia will be charged in AUD , and have tax added.
The rest of the world get the USD price - no taxes.

I have implemented this using geolocation and only enabling the pricing appropriate to the user’s presumed location. Everyone can see both sets of prices, but any one purchaser will only have one set enabled. (No snipcart button at all on the disabled set of prices)

Snipcart will see, for an AUD purchase,

  data-item-taxable="true" 
  data-item-tax-rate="0.1" 
  data-item-taxes="GST" 
  data-item-has-taxes-included="true" 
  data-item-price="{"aud":"1650.0"}

and for a USD purchase of the same item

  data-item-taxable="false" 
  data-item-has-taxes-included="false" 
  data-item-price="{"usd":"1500.0"}

On his first test of the live system, my client has had his purchase rejected with “An attempt to create an order with invalid products has been made.”.

I am concerned that this is a by-product of having two pricing systems. Any thoughts?

I loaded the products via the URL today, and they have loaded with their USD prices, so presumably the snipcart process ran with a non-australian ip.

If a user successfully purchases the product from Australia what will happen in the products table? Two copies of each product? Merged data showing both prices (fantastic).?

thanks,

Anita Graham
(I am waiting for him to confirm one or two other questions I have.)

Hi @Anita, thanks for reaching out!

Both products buttons are shown in the page HTML? Even if one is disabled?
If not, you could have dedicated product pricing pages and define for each button using data-item-url, like example.com/product1?cur=usd, or you can use the JSON crawler for the validation.

If you have more details about your implementation, please let me know.

Thanks.

Thanks for the suggestions. I am mulling over the options at the moment, and I’ve been rewriting this response each time I move on.

Restricting the Snipcart buttons to the appropriate currency using geolocation just isn’t going to work, as your web crawler will never see the au product ids or the au prices.

Step 1: I’ve now got both price tables displaying the item price but with the multicurrency prices in the button’s data-attribute.

Step 2: I’ve implemented a json response to the verification request . Works in localhost, but not in production. … see below

Step 2.5 Also implemented a json inventory, just to be able to test the json data flow. Now working.

I now have two price tables on the page, and I’m pleased to see that no matter which 'Add to Cart" button I click, I am allocated the correct price on checkout. I’ve been able to complete a purchase (in test mode).

Question: The price information contains info for two currencies, but there is only one set of taxation information.
How do you setup a button for multiple currencies with different tax requirements?

Thanks, Anita