Contents
On this page

Add Currency - Plugixa Multi Currency for WooCommerce

POST /plugixa-multi-currency/v1/currencies

Add a currency by its ISO code. Its symbol, symbol position, decimals, separators and flag are filled in from WooCommerce’s data for that currency; anything you send replaces them. It is added last, enabled and shown in the switchers. See Currencies.

Needs a user with the plugixa_multi_currency_manage_settings capability (signed in with an Application Password, or the login cookie with an X-WP-Nonce header). Administrators hold it; see Capabilities.

Note. A new currency starts with the rate 1 unless you send one. Send its rate, or run Update Rates Now straight after.

Request

POST https://your-store.example/wp-json/plugixa-multi-currency/v1/currencies

Request body

Content type: application/json

Field Type Required Description
code string Yes The ISO code, three letters, any case. It must be a currency WooCommerce supports: see List Supported Currencies.
enabled boolean No Whether shoppers can use it.
in_switcher boolean No Whether it is offered in the switchers.
symbol string No The symbol, up to 16 characters.
position string No left, right, left_space or right_space. Anything else saves left.
decimals integer No 0 to 4.
thousand_sep string No Up to 4 characters.
decimal_sep string No Up to 4 characters. Empty saves ..
flag string No Two-letter country code, for example JP.
rate string No More than 0, with a dot for decimals. Ignored for the store currency.
rate_source string No Defaults to manual.
rate_locked boolean No true keeps the rate out of automatic updates.
margin_pct string No Percent added to the rate, more than -100 and up to 1000.
margin_fixed string No Fixed amount added to each product price.
rounding object No Rules for price, shipping and fee, each { step, mode }. A context you leave out gets no rounding.
checkout_mode string No selected or base.
sort integer No Its place in the list. Use Reorder Currencies to move several at once.
{
  "code": "SEK",
  "rate": "10.32",
  "margin_pct": "1",
  "rounding": {
    "price": {
      "step": "1",
      "mode": "up"
    }
  }
}

Responses

201 Created. data is the new currency.

{
  "success": true,
  "data": {
    "id": 9,
    "code": "SEK",
    "enabled": true,
    "sort": 90,
    "symbol": "kr",
    "position": "right_space",
    "decimals": 2,
    "thousand_sep": " ",
    "decimal_sep": ",",
    "flag": "SE",
    "in_switcher": true,
    "rate": "10.32",
    "rate_source": "manual",
    "rate_locked": false,
    "margin_pct": "1",
    "margin_fixed": "0",
    "rounding": {
      "price": {
        "step": "1",
        "mode": "up"
      },
      "shipping": {
        "step": "0",
        "mode": "nearest"
      },
      "fee": {
        "step": "0",
        "mode": "nearest"
      }
    },
    "checkout_mode": "selected",
    "rate_updated_at": "2026-11-20 16:42:08",
    "created_at": "2026-11-20 16:42:08",
    "updated_at": "2026-11-20 16:42:08",
    "name": "Swedish krona",
    "is_base": false
  }
}

Fields as in List Currencies.

Errors

Status Code When
401 / 403 plugixa_multi_currency_forbidden The caller lacks the capability.
400 plugixa_multi_currency_unknown_currency WooCommerce does not know the code: WooCommerce does not support this currency code.
409 plugixa_multi_currency_duplicate_currency This currency is already in your list.
400 plugixa_multi_currency_invalid_number rate, margin_pct or margin_fixed is not a number: Enter numbers only, with a dot for decimals.
400 plugixa_multi_currency_invalid_rate The rate is 0 or less: The exchange rate must be more than zero.
400 plugixa_multi_currency_invalid_margin The margin must be between -100% and 1000%.

Plus the errors every endpoint can return.

Examples

curl -s -X POST "https://your-store.example/wp-json/plugixa-multi-currency/v1/currencies" \
  -u "$WP_USER:$WP_APP_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"code":"SEK","rate":"10.32","margin_pct":"1","rounding":{"price":{"step":"1","mode":"up"}}}'
<?php
$ch = curl_init('https://your-store.example/wp-json/plugixa-multi-currency/v1/currencies');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST  => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => getenv('WP_USER') . ':' . getenv('WP_APP_PASSWORD'),
    CURLOPT_HTTPHEADER     => ['Content-Type: application/json'],
    CURLOPT_POSTFIELDS     => json_encode([
        'code'       => 'SEK',
        'rate'       => '10.32',
        'margin_pct' => '1',
        'rounding'   => [
            'price' => [
                'step' => '1',
                'mode' => 'up',
            ],
        ],
    ]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-store.example/wp-json/plugixa-multi-currency/v1/currencies', {
  method: 'POST',
  headers: {
    'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ code: 'SEK', rate: '10.32', margin_pct: '1', rounding: { price: { step: '1', mode: 'up' } } }),
});
const { data } = await response.json();

Quick Links

Share