Docs
How to install Peg, run Peg Pro, choose a markup on the daily rates, and call the Peg API.
Get started
Peg is free. It adds one extra currency to your WooCommerce store, at an exchange rate you set. Visitors get it by country, or pick it with a switcher. Peg needs WooCommerce.
Install Peg
- Download Peg from pegfx.fyi/free. The WordPress.org listing is waiting for review.
- In your WordPress admin, go to Plugins > Add New Plugin and click Upload Plugin. Choose the ZIP, click Install Now, then Activate Plugin.
- Open WooCommerce > Settings > Currencies.
- Choose the extra currency, tick Enabled, enter its exchange rate, and list the countries that should see it. Then click Save changes. The rate is how much of that currency 1 unit of your store currency buys.
- Add the Peg currency switcher block to your header or shop, or use the
[peg_currency_switcher]shortcode.
Where to convert
Choose one under Where to convert, on the same settings page.
- Whole shop
- Prices, cart and checkout are in the visitor's currency, and they pay in it. Orders keep that currency. Check that your payment gateway accepts it.
- Checkout only
- Prices, the cart and the payment stay in your currency. The cart and checkout add the total in the visitor's currency, with the rate, as an estimate. Their bank or card converts the payment. The switcher stays hidden.
Peg Pro
Peg Pro is a paid add-on to Peg. It adds any number of currencies, daily rates from central banks with a markup or discount per currency, and price rounding such as .99 endings. It needs free Peg.
Try it free for 7 days
- Install free Peg first.
- Download the Peg Pro ZIP, upload it under Plugins > Add New Plugin, and activate it.
- The trial starts on its own. It needs no card and no key.
After 7 days, Pro switches off unless you enter a licence key.
Buy a licence key
Pick a plan under Pricing and click Buy for the number of sites you need. After checkout, your licence key arrives by email. Each plan is a yearly licence and includes a year of updates and support.
| Plan | Price | Trial |
|---|---|---|
| 1 site | €120 per year + VAT | 7-day free trial |
| 5 sites | €240 per year + VAT | |
| 25 sites | €400 per year + VAT |
Enter your key
Open WooCommerce > Settings > Currencies. Under Peg Pro licence, paste the key and click Activate licence. Each site you activate uses one of the plan's sites. To move the key to another site, click Deactivate licence on the old one first. If the old site is gone, email support and we free its place.
When a licence ends
If the trial ends or you stop renewing, Pro switches off. Your store keeps running on free Peg, with your first currency at its fixed rate and no rounding. Your settings stay saved. Give that first currency a fixed rate, so it keeps working.
Rates and markup
Where the rates come from
Peg Pro uses the daily reference rates that central banks publish. Today's rates combine 92 central banks and official sources:
- Autoridade Monetária de Macau, Macao SAR China
- Banca d'Italia, Italy
- Banca Națională a României, Romania
- Banco Central de Bolivia, Bolivia
- Banco Central de Chile, Chile
- Banco Central de Costa Rica, Costa Rica
- Banco Central de Cuba, Cuba
- Banco Central de la República Argentina, Argentina
- Banco Central de Venezuela, Venezuela
- Banco Central del Paraguay, Paraguay
- Banco Central del Uruguay, Uruguay
- Banco Central do Brasil, Brazil
- Banco de la República, Colombia
- Banco de México, Mexico
- Banco de Mocambique, Mozambique
- Banco Nacional de Angola, Angola
- Bangko Sentral ng Pilipinas, Philippines
- Bank Al-Maghrib, Morocco
- Bank Indonesia, Indonesia
- Bank Negara Malaysia, Malaysia
- Bank of Botswana, Botswana
- Bank of Canada, Canada
- Bank of England, United Kingdom
- Bank of Israel, Israel
- Bank of Jamaica, Jamaica
- Bank of Japan, Japan
- Bank of Mauritius, Mauritius
- Bank of Tanzania, Tanzania
- Bank of Thailand, Thailand
- Bank of Zambia, Zambia
- Banky Foiben'i Madagasikara, Madagascar
- Banque Centrale de Tunisie, Tunisia
- Banque Centrale des Etats de l'Afrique de l'Ouest
- Banque Centrale du Congo, Congo - Kinshasa
- Banque de la Republique du Burundi, Burundi
- Banque du Liban, Lebanon
- Banque Nationale du Rwanda, Rwanda
- Central Bank of Armenia, Armenia
- Central Bank of Bosnia and Herzegovina, Bosnia & Herzegovina
- Central Bank of Egypt, Egypt
- Central Bank of Iraq, Iraq
- Central Bank of Kenya, Kenya
- Central Bank of Kuwait, Kuwait
- Central Bank of Liberia, Liberia
- Central Bank of Myanmar, Myanmar (Burma)
- Central Bank of Nigeria, Nigeria
- Central Bank of Oman, Oman
- Central Bank of Russia, Russia
- Central Bank of Samoa, Samoa
- Central Bank of Seychelles, Seychelles
- Central Bank of Sri Lanka, Sri Lanka
- Central Bank of The Gambia, Gambia
- Central Bank of the Republic of Azerbaijan, Azerbaijan
- Central Bank of Trinidad and Tobago, Trinidad & Tobago
- Central Bank of Uzbekistan, Uzbekistan
- Centrale Bank van Suriname, Suriname
- China Foreign Exchange Trade System, China
- Czech National Bank, Czechia
- Da Afghanistan Bank, Afghanistan
- Danmarks Nationalbank, Denmark
- European Central Bank, European Union
- Financial Benchmarks India, India
- Hrvatska Narodna Banka, Croatia
- International Monetary Fund
- Lietuvos Bankas, Lithuania
- Magyar Nemzeti Bank, Hungary
- Maldives Monetary Authority, Maldives
- Monetary Authority of Singapore, Singapore
- Narodna Banka na Republika Severna Makedonija, North Macedonia
- Narodna banka Srbije, Serbia
- Narodowy Bank Polski, Poland
- National Bank of Cambodia, Cambodia
- National Bank of Ethiopia, Ethiopia
- National Bank of Georgia, Georgia
- National Bank of Kazakhstan, Kazakhstan
- National Bank of Moldova, Moldova
- National Bank of Tajikistan, Tajikistan
- National Bank of the Kyrgyz Republic, Kyrgyzstan
- National Reserve Bank of Tonga, Tonga
- Natsionalnyi Bank Ukrainy, Ukraine
- Natsyyanalny Bank Respubliki Belarus, Belarus
- Nepal Rastra Bank, Nepal
- Norges Bank, Norway
- Palestine Monetary Authority, Palestinian Territories
- Reserve Bank of Australia, Australia
- Reserve Bank of Fiji, Fiji
- Reserve Bank of Malawi, Malawi
- Reserve Bank of Vanuatu, Vanuatu
- Seðlabanki Íslands, Iceland
- South African Reserve Bank, South Africa
- Sveriges Riksbank, Sweden
- Türkiye Cumhuriyet Merkez Bankası, Türkiye
These are reference rates, before your markup or discount. Sources that publish only weekly or monthly are left out. A currency pegged to another one follows its peg.
How often they update
Central banks publish on their working days. Peg Pro checks for new rates every 6 hours, so your prices follow each day's rates. On weekends and bank holidays, prices keep the last published rate.
If a check fails, Pro keeps the last good rates. When they are more than 4 days old, Pro shows a notice and emails you once. You can change the number of days.
Each currency in Pro uses the daily rate or a fixed rate you set. With the daily rate, Pro falls back to the fixed rate when no daily rate is available. Free Peg makes no outside requests, so you set its rate by hand.
Choosing a markup
The markup is a percentage on top of the daily rate, set per currency in the Live adjust % column. A negative number is a discount. Pro accepts any number from −99 to 1000, and the Peg API and the Medusa plugin accept −50 to 50. The field suggests common values. These are starting points, so check what your own payment provider charges.
- 0%
- The central-bank rate exactly. Your shop absorbs any conversion fee.
- About +2%
- Covers a typical card processor's conversion fee.
- +3 to +4%
- Covers a PayPal-style spread of about 3%, plus a buffer for daily moves.
- Below 0%
- A discount, for example to stay competitive in one market.
For card fees, Stripe charges 2% to convert a payment, and Shopify Payments 1.5 to 2%.
An example
A $50.00 product, with a daily rate of 0.9000 euros per dollar:
| Markup | Rate | Price |
|---|---|---|
| 0% | 0.9000 | €45.00 |
| +2% | 0.9180 | €45.90 |
| +4% | 0.9360 | €46.80 |
| −10% | 0.8100 | €40.50 |
Rounding comes after the markup. With .99 endings, €45.90 becomes €45.99.
Peg API
The Peg API gives a site that isn't on WooCommerce the same rates, markup and rounding as Peg Pro. It is included with every Peg Pro licence. It has no trial.
Each site that calls it uses one of your licence's sites. Call it from your server, never
from a browser. Your licence key is a secret, and the API sends no CORS headers. Requests
and answers are JSON, at https://api.pegfx.fyi. If a call fails, see Errors.
Activate your site once
Send your licence key and your site's address. Keep the activation_id from the answer. Activating the same site again returns the same activation, so it uses no extra
site.
curl -X POST https://api.pegfx.fyi/v1/license/activate \
-H 'content-type: application/json' \
-d '{"license_key": "PEG-XXXX-XXXX", "site_url": "https://shop.example.com"}'{
"activation_id": "a4d3…",
"site_url": "https://shop.example.com",
"limit": 5,
"usage": 2,
"reused": false
}limit is how many sites the licence allows, and usage how many it uses now.
Convert prices
Send the key, the activation, your store currency and the currencies you want. Add a markup, rounding and prices if you need them.
curl -X POST https://api.pegfx.fyi/v1/rates/convert \
-H 'content-type: application/json' \
-d '{
"license_key": "PEG-XXXX-XXXX",
"activation_id": "a4d3…",
"base": "USD",
"currencies": ["EUR", "GBP"],
"adjust_percent": 2,
"rounding": { "step": 1, "mode": "up", "ending": 0.99 },
"prices": [20, 122.3]
}'{
"base": "USD",
"date": "2026-10-16",
"adjust_percent": 2,
"rounding": { "step": 1, "mode": "up", "ending": 0.99 },
"rates": {
"EUR": { "rate": 0.88865, "adjusted_rate": 0.9064230000000001, "decimals": 2 },
"GBP": { "rate": 0.74989, "adjusted_rate": 0.7648878, "decimals": 2 }
},
"prices": { "EUR": [18.99, 110.99], "GBP": [15.99, 93.99] },
"license_status": "valid"
}What you can send:
base- Your store's currency, as a three-letter code in capitals. Required.
currencies- 1 to 50 currency codes to quote, none equal to
base. Required. adjust_percent- Your markup, from −50 to 50. A negative number is a discount. Default 0.
roundingstepis 0, 0.01, 0.05, 0.1, 0.5, 1, 5 or 10.modeisupornearest.endingisnull, 0.99, 0.95, 0.90 or 0.00. Other values are refused. No rounding by default.prices- Up to 1,000 prices in the base currency. Optional.
What comes back:
date- The day the rates were published.
rate- How much of the currency 1 unit of
basebuys, before your markup. adjusted_rate- The rate with your markup or discount, not rounded.
decimals- How many decimals the currency is charged in.
prices- Your prices, converted and rounded, in the order you sent them. Only when you sent prices.
Limits
- 300 requests an hour per licence key, in bursts of up to 60.
- 60 requests an hour per site, in bursts of up to 20.
- 300 requests an hour per address.
The API refreshes its rates every 6 hours. Cache the answer on your server instead of calling on every page view.
Move to another site
Deactivate the old site to free its place, then activate the new one. Deactivating a site that is already gone also succeeds. If you no longer have the old activation id, email support and we free its place.
curl -X POST https://api.pegfx.fyi/v1/license/deactivate \
-H 'content-type: application/json' \
-d '{"license_key": "PEG-XXXX-XXXX", "activation_id": "a4d3…"}'Errors
An error answers with an HTTP status and a JSON body that names the error.
{
"error": "rate_limited",
"message": "…"
}bad_request400- A field is missing or malformed. The message says which.
missing_license401- Send both
license_keyandactivation_id. invalid_key404- The licence key does not exist.
expiredrevoked403- The licence has expired or was revoked. Renew it to continue.
limit_reached403- The licence is active on all its sites. Deactivate one first.
license_inactive403- The licence does not cover this site.
license_statussays why. Foractivation_not_found, activate the site again. activation_in_progress409- Another request is activating this site. Retry after the seconds in
Retry-After. rate_limited429- Too many requests. Retry after the seconds in
Retry-After. unavailable503- Rates or the licence check are not available right now. Retry after the seconds in
Retry-After.
Medusa
Peg for Medusa is included with every Peg Pro licence. Once a day it converts each product variant's price in your default currency into the currencies you choose, with your markup or discount and rounding. It is built for Medusa 2.21.2.
Install it
In your Medusa project, install the package from pegfx.fyi:
npm install https://pegfx.fyi/downloads/peg-medusa-0.1.0.tgz
Add it to the plugins in medusa-config.ts:
module.exports = defineConfig({
// ...
plugins: [
{
resolve: "peg-medusa",
options: {
// Your store's public backend URL, sent when the licence is activated.
storeUrl: "https://api.your-store.example.com",
},
},
],
})Run npx medusa db:migrate, then open Settings > Peg in the admin. Enter your licence key, choose your currencies,
markup and rounding, and save. Saving activates the licence for this store, which uses one of
your licence's sites.
It only writes the plain price in each currency you choose. It never changes your default currency's price, price lists, or prices with rules or quantity tiers.
Questions
Does Peg change my saved product prices?
No. Your products keep the prices you entered in your store currency. Peg converts them only when it shows them, and orders keep the currency they were placed in.
Which payment gateways work?
Any gateway that accepts the order's currency. Peg sets the currency on the order, and the gateway charges the shopper in it. In checkout-only mode the payment stays in your store currency.
Does Peg work with page caching?
Yes. Pages in another currency are never cached, and Peg corrects prices on cached pages in your store currency in the browser. Cart and checkout are never cached.
Something else? See the questions on the home page.