---
url: >-
  https://game-engine-io.github.io/enginex-frontend-sdk/reference/api/@getenginex/sdk/extension/functions/currencyCode.md
---
[Reference](../../../../index.md) / [@getenginex/sdk/extension](../index.md) / currencyCode

# currencyCode()

> **currencyCode**(`options?`): `ZodMiniType`<`string`>

ISO 4217 currency code in uppercase (`BRL`); with `{ allowEmpty: true }`, also `''`. Strict
even in `'warn'` mode. For SDK packages (via `@getenginex/sdk/extension`), not for apps.

## Parameters

### options?

[`CurrencyCodeOptions`](../interfaces/CurrencyCodeOptions.md) = `{}`

## Returns

`ZodMiniType`<`string`>

## Example

```ts
wire({ currency: currencyCode() }) // 'brl' or '' reject the response
wire({ currency: z._default(currencyCode({ allowEmpty: true }), '') }) // '' and missing become ''
```

## Throws

Nothing: the schema does not throw; the failure becomes `VALIDATION_ERROR` in the transport.
