Search.../

listCurrencies( )

Developer Preview

Returns an array of currencies. The array lists all currencies for which Wix supports conversion and their symbols.

Description

This function is not a universal function and runs only on the backend.

Admin Method

This function requires elevated permissions to run. This function is not universal and runs only on the backend.

Syntax

function listCurrencies(): Promise<ListCurrenciesResponse>

listCurrencies Parameters

This function does not take any parameters.

Returns

Return Type:

Promise<
ListCurrenciesResponse
>
NAME
TYPE
DESCRIPTION
currencies
Array<
Currency
>

Supported currencies.

Was this helpful?

Get all supported currencies

Copy Code
1import { currencies } from 'wix-ecom.v2';
2
3currencies.listCurrencies()
4 .then((listOfAllCurrencies) => {
5 const firstCurrencyCode = listOfAllCurrencies[0].code;
6 const firstCurrencyCSymbol = listOfAllCurrencies[0].symbol;
7 });
8
9/*
10 * Promise resolves to:
11 * {
12 * "currencies": [
13 * {"code": "BIF", "symbol": "FBu"},
14 * {"code": "CVE", "symbol": "$"},
15 * {"code": "KMF", "symbol": "CF"}
16 * ]
17 * }
18 */