Returns an array of currencies. The array lists all currencies for which Wix supports conversion and their symbols.
This function requires elevated permissions and runs only on the backend and on dashboard pages.
function listCurrencies(): Promise<ListCurrenciesResponse>;
import { currencies } from "wix-ecom.v2";
currencies.listCurrencies().then((listOfAllCurrencies) => {
const firstCurrencyCode = listOfAllCurrencies[0].code;
const firstCurrencyCSymbol = listOfAllCurrencies[0].symbol;
});
/*
* Promise resolves to:
* {
* "currencies": [
* {"code": "EUR", "symbol": "€"},
* {"code": "USD", "symbol": "$"},
* {"code": "JPY", "symbol": "¥"}
* ]
* }
*/
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.