FOX - WooCommerce Currency Switcher Professional

Payment Gateway Does Not Support the Currency in WooCommerce: Fixes

When a payment gateway does not support the currency a WooCommerce customer selected, the symptom depends on the gateway: an Invalid currency code error, a declined payment, a payment page that shows the base currency, an order charged in a currency nobody chose, or a checkout with no payment methods at all. The currency switcher is rarely the cause and cannot be the fix on its own, because FOX decides which currency reaches the checkout and the gateway decides what it can charge. Below is how the two fit together, how to read each symptom, and the settings that make every currency meet a gateway that accepts it.

Why a payment gateway does not support every currency you show

A WooCommerce order has one currency. With Is multiple allowed = Yes in the Advanced tab of the FOX settings (the default of a new installation), the checkout keeps the visitor's currency: WooCommerce reports it through get_woocommerce_currency(), saves it on the order, and the gateway receives the order total with that currency code. From that moment the gateway plugin and your merchant account are in charge. FOX does not touch the transaction.

So it is not possible to show 30 EUR on the checkout page and send the payment in the base currency instead: the gateway would receive the number 30, not the value. If a gateway must charge another currency, the checkout itself has to switch to that currency before the customer pays, so the amount on screen is the amount charged. Show prices in local currency, charge in base currency explains this rule and the setups built on it.

Read the symptom

What you seeWhat it usually means
Invalid currency code, Bad value: purchase_currency, unsupported currencyThe gateway refuses the code: the gateway or your account does not support that currency, or the code in FOX is not a valid ISO code
Payments declined only in non-base currenciesThe merchant account is not enabled for those currencies
The gateway page shows the base currency, or the same number with another symbol (3.12 EUR becomes 3.12 KWD)The gateway plugin reads the store's currency setting instead of the order currency
The order or the charge ends up in a currency the customer did not chooseA single-currency gateway converts or relabels the amount on its own
One gateway is missing, or Sorry, it seems that there are no available payment methodsThe gateway hid itself for this currency, or FOX payment rules hid it (see below)
PayPal button missing or a PayPal currency errorSee PayPal currency not supported, which covers PayPal in detail

Check what the gateway supports

Look up the gateway's list of supported currencies, and check what your own account is enabled for: the two often differ. Typical limits:

  • Square charges in the currency of the country the seller account belongs to.
  • PayFast processes payments in South African rand.
  • Buy-now-pay-later services such as Klarna and Afterpay work per market, each in that market's currency.
  • Razorpay accepts currencies other than INR only when international payments are enabled on the account, and not every currency even then.
  • Many local bank gateways accept only their own country's currency.

Then check the code itself. In the Currencies tab, every currency a gateway can see must use its ISO 4217 code: GBP, not UK; PKR, not Rs. The symbol goes into its own column. A code typed with a leading space or copied with an invisible character also counts as invalid; retype it. Non-ISO codes are fine for display-only currencies, as custom currency codes explains, but never let one reach a gateway.

Test with the gateway's sandbox: one order in each currency you accept. On the order screen, the FOX box shows the Order currency; it should match the currency and amount in the gateway's test dashboard.

Match every currency with a gateway that accepts it

FOX gives three tools. They can be combined.

Show each gateway only in its currencies: Payments rules

  1. In the Advanced tab switch Payments rules on and save. A Payments tab appears.
  2. In that tab, Payments behavior decides how the lists work for all gateways: Is hidden hides a gateway in the currencies you select for it, Is shown shows it only in the selected currencies.
  3. Every enabled gateway has its own currency list. A gateway whose list is empty is never filtered.

For example, with Is shown, select only UZS for a UZS-only gateway and USD and EUR for a card gateway; each visitor sees the gateways that can charge their currency. The rules apply on the checkout page and the order-pay page. More on this in how to hide a payment gateway by currency.

Charge in the base currency: Is multiple allowed = No

When the gateway's currency is your WooCommerce base currency, for example a ZAR shop with PayFast, set Is multiple allowed to No. Visitors still browse in their currency, but the checkout resets to the base currency and the gateway always receives it. This is the quickest fix for a store with one local gateway.

Switch to a supported currency on the checkout page

When the gateway accepts a currency that is not the base currency, or only some of your currencies, keep Is multiple allowed = Yes and switch the checkout to an accepted currency with a short snippet. A tested version that switches only unsupported currencies and gives visitors their currency back after checkout is in show local currency, charge in base currency, together with a variant that changes the currency when the customer picks a payment method. The one-line version is on the force a currency on the checkout page FAQ.

No available payment methods after switching currency

When checkout shows Sorry, it seems that there are no available payment methods, or a gateway that works in the base currency disappears in another one, one of these is the reason:

  • The gateway hid itself. Many gateways check get_woocommerce_currency() before they offer themselves, and FOX answers it with the visitor's currency. A ZAR-only gateway therefore disappears for a visitor in USD, and if it was the only gateway, nothing is left. This often appears right after activating FOX, because a new installation lets customers pay in their selected currency. Use Is multiple allowed = No or a forced checkout currency, as above.
  • Payments rules hide every gateway for that currency. Open the Payments tab and go through the currencies one by one: each must leave at least one gateway visible. With Is shown, a gateway that has some currencies selected disappears in all the others. To test, switch Payments rules off; if the gateways come back, the lists are the cause.
  • Checkout by GeoIP rules. This option in the Advanced tab sets the checkout currency from the visitor's country, and the visitor cannot change it on the checkout page. If the gateway is shown only in another currency, that visitor never sees it. The rules are read in order and the first currency that lists the country wins, so a country added to two currencies always gets the first one. Checkout currency based on customer country covers this option.
  • The gateway throws an error. Some gateway plugins fail with a PHP or JavaScript error in an unsupported currency, which can also remove the Proceed to checkout button from the cart. Look in the browser console and in wp-content/debug.log; the error names the plugin to report it to.

The gateway charges the wrong currency

If the order shows the right currency in the FOX box but the payment page or the bank shows another one, the problem is in how the gateway plugin builds the payment request:

  • It reads the store setting, not the order. FOX changes the currency that WooCommerce reports and saves on the order; it does not rewrite the base currency stored in the WooCommerce settings. A gateway that reads that setting directly sends the base currency code with the converted number. The fix belongs in the gateway plugin, which should use the order's currency ($order->get_currency()). Until its authors change it, show that gateway only in the base currency with Payments rules.
  • It supports one currency and converts by itself. Some single-currency gateways convert any order into their own currency at their own rate, or create the payment in it regardless of the order. Check the gateway's settings for a currency conversion option, and prefer letting customers see the real amount by forcing that currency at checkout.

Checklist

  • Every enabled currency uses a valid ISO code, retyped without spaces.
  • You know which currencies each gateway, and your account with it, can charge.
  • Each currency reaches at least one gateway that accepts it: through Payments rules, Is multiple allowed = No, or a forced checkout currency.
  • Checkout by GeoIP rules and the GeoIP country lists do not send visitors to a currency without a gateway.
  • A sandbox order in each currency shows the same currency and amount in the FOX order box and in the gateway dashboard.

If a gateway still fails in one currency after these checks, open a topic on the FOX support forum with the gateway name, the exact error text, your Is multiple allowed setting and the currencies involved, and we will look at it.