> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: sitePay.convertAmounts(options: ConvertAmountsOptions) # Method Link: https://dev.wix.com/docs/sdk/frontend-modules/pay/currencies/currency-converter/convert-amounts.md # Method Description: Converts an array of amounts from one currency to another. Use the `convertAmounts()` function to convert an array of one or more amounts between two currencies. The `convertAmounts()` function returns a Promise that resolves to a `ConvertedAmounts` object which contains an array of converted amounts and the timestamp for the conversion rate used. > **Note:** The currency codes used must exist in the array returned by the [`getAllCurrencies()`](pay/Currencies/get-All-Currencies) function. # Method Permissions: # Method Permissions Scopes IDs: undefined # Method Code Examples: ## Convert an array of amounts from one currency to another. ```javascript import {currencyConverter} from '@wix/site-pay'; const conversionOptions = { "amounts": [1.0, 2.5, 5.3], "from": "USD", "to": "GBP" }; currencyConverter.convertAmounts(conversionOptions) .then((convertedAmounts) => { const firstConvertedAmount = convertedAmounts.amounts[0]; const timestamp = convertedAmounts.timestamp; }); /* Promise resolves to: * { * "amounts":[0.8149261982, 2.0373154955, 4.31910885046], * "timestamp": "2020-03-15T21:00:00.277Z * } */ ```