# currency (https://docs.salla.dev/twilight/react/sdk/currency)



Use `Salla.currency` when the customer picks the currency prices are shown in. The `salla-localization-modal` web component lets them pick language and currency, and the engine's default header already includes it: see [`salla-localization-modal`](https://docs.salla.dev/twilight/react/web-components/salla-localization-modal).

```ts
await Salla.currency.change('USD');
window.location.reload(); // prices on the page are still in the old currency
```

## Methods [#methods]

| Method   | Parameters               | Does                                                          |
| -------- | ------------------------ | ------------------------------------------------------------- |
| `list`   | none                     | The store's currencies, each with `code`, `name` and `symbol` |
| `change` | `code` or `{ currency }` | Switches the customer to that currency                        |

`Salla.config.currencies()` gives the same list by code and loads it only once. See [Config](https://docs.salla.dev/twilight/react/sdk/config).

## After a change [#after-a-change]

`change` saves the choice and forgets the saved cart summary, so the next cart request comes back in the new currency.
It does not touch what is already on the page. Reload, as the localization modal does, so every loader runs again with the new currency.
This is the one case where a full reload is right: every price on the page changes at once.

To open the modal on its currency list from your own button, dispatch `Salla.event.dispatch('currency::open')`.

## Events [#events]

| Event                                             | Fires when | Arguments                        |
| ------------------------------------------------- | ---------- | -------------------------------- |
| `currency::changed` / `currency::failed`          | `change`   | response or error, currency code |
| `currency::fetched` / `currency::failed.to.fetch` | `list`     | response or error                |

## Gotchas [#gotchas]

* `change` with no code rejects at once with "Can't find currency code!".
* Show prices with [`useMoney`](https://docs.salla.dev/twilight/react/hooks/use-money), which formats in the customer's chosen currency.

## See also [#see-also]

* [Config](https://docs.salla.dev/twilight/react/sdk/config)
* [Helpers: money](https://docs.salla.dev/twilight/react/sdk/helpers#money)
