> ## Documentation Index
> Fetch the complete documentation index at: https://docs.penbox.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Currency Field

> Monetary values with currency formatting for financial amounts

The Currency field captures monetary values — amounts with two decimal places and optional prefix/suffix for currency symbols. Currency fields are purpose-built for financial data, ensuring consistent formatting and validation for prices, costs, revenues, and claims.

Use Currency fields whenever you need to store monetary amounts. They enforce two-decimal precision and support min/max validation, making them ideal for any financial data point.

## When to Use

**Use Currency fields for:**

* Prices and costs
* Revenue and income
* Claim amounts
* Loan amounts
* Insurance premiums
* Fees and charges
* Any monetary value

**Consider alternatives:**

* Use **Number** for non-monetary numeric values (quantities, scores, measurements)
* Use **Text** for formatted financial references (invoice numbers, account IDs)

## Configuration Options

| Option        | Description                     | Type    | Default          | Example                      |
| ------------- | ------------------------------- | ------- | ---------------- | ---------------------------- |
| `key`         | Unique identifier               | String  | Required         | `claim_amount`               |
| `name`        | Display label                   | String  | Required         | "Claim Amount"               |
| `description` | Help text for users             | String  | Optional         | "Total claim value in euros" |
| `min`         | Minimum allowed value           | Number  | None             | `0`                          |
| `max`         | Maximum allowed value           | Number  | None             | `1000000`                    |
| `prefix`      | Text displayed before the value | String  | None             | `EUR`                        |
| `suffix`      | Text displayed after the value  | String  | None             | `EUR`                        |
| `clearable`   | Allow clearing the field        | Boolean | `true`           | `false`                      |
| `visibility`  | Display setting                 | String  | `always-visible` | `hide-when-empty`            |
| `section`     | Section this field belongs to   | String  | None             | Section UUID                 |

## Examples

### Basic Currency Amount

Collect a monetary value:

```json theme={null}
{
  "key": "claim_amount",
  "type": "currency",
  "name": "Claim Amount",
  "description": "Total claim value in euros",
  "suffix": "EUR",
  "min": 0,
  "max": 1000000
}
```

### Annual Revenue

Collect revenue with prefix:

```json theme={null}
{
  "key": "annual_revenue",
  "type": "currency",
  "name": "Annual Revenue",
  "description": "Company revenue for last fiscal year",
  "prefix": "EUR",
  "min": 0
}
```

### Insurance Premium

Collect premium amount:

```json theme={null}
{
  "key": "gross_premium",
  "type": "currency",
  "name": "Gross Premium",
  "description": "Total gross premium amount",
  "suffix": "EUR",
  "min": 0
}
```

## Validation

Currency fields enforce monetary validation automatically:

### Type Validation

* Only numeric values accepted
* Maximum two decimal places (cents precision)
* Non-numeric input rejected

### Range Validation

* `min` - Minimum allowed value (inclusive)
* `max` - Maximum allowed value (inclusive)
* User cannot enter values outside range

<Info>
  Currency fields always enforce a maximum of 2 decimal places, ensuring
  consistent monetary precision.
</Info>

## Best Practices

**Always use Currency for monetary data:**

* Don't use Number for financial amounts
* Currency enforces two-decimal precision automatically
* Ensures consistent formatting across the platform

**Use prefix or suffix for currency indication:**

* Add `prefix: "EUR"` or `suffix: "EUR"` to indicate the currency
* Helps users understand the expected currency
* Be consistent across all currency fields in a case

**Set appropriate min/max:**

* Use `min: 0` to prevent negative amounts (when appropriate)
* Set realistic max values based on business context
* Catches data entry errors early

**Be explicit in field names:**

* Include currency in the name when relevant: "Amount (EUR)"
* Distinguish between gross and net amounts
* Clarify the time period: "Annual Revenue" vs "Monthly Revenue"

***

## Related Field Types

<CardGroup cols={2}>
  <Card title="Number" icon="hashtag" href="/cases/data_schema/number">
    Use for non-monetary numeric values
  </Card>

  <Card title="Text" icon="text" href="/cases/data_schema/text">
    Use for financial reference numbers and IDs
  </Card>

  <Card title="Data Schema Overview" icon="sitemap" href="/cases/data_schema">
    Back to Data Schema overview
  </Card>
</CardGroup>
