Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions reference/2024-02-05/webhook/product.update.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,54 @@
You should store the `timestamp` and discard any events that are older than
the last event you received.
</Info>

## Denomination Structure

The `denominations` object within both `old_state` and `new_state` represents the available purchase amounts for a product. It has the following structure:

### Properties

- `type` - The denomination type, either:
- `"fixed"` - Product has predetermined fixed denominations
- `"open"` - Product accepts any amount within specified range

- `available_list` - Array of strings representing available denomination amounts (only for `"fixed"` type)

- `minimum_value` - String representing the minimum purchase amount (only for `"open"` type)

- `maximum_value` - String representing the maximum purchase amount (only for `"open"` type)

### Usage Examples

#### Fixed Denominations
```json
{
"denominations": {
"type": "fixed",
"available_list": ["10", "25", "50", "100"]
}
}
```

#### Open Denominations
```json
{
"denominations": {
"type": "open",
"minimum_value": "5",
"maximum_value": "500"
}
}
```

#### Product Becomes Non-Orderable
```json
{
"denominations": {
"type": "fixed",
"available_list": ["10", "25", "50"]
}
}
```

When a product becomes non-orderable (`is_orderable: false`), the `denominations.available_list` continues to contain the same denomination values that were available when the product was orderable.

Check warning on line 77 in reference/2024-02-05/webhook/product.update.mdx

View check run for this annotation

Mintlify / Mintlify Validation (runa) - vale-spellcheck

reference/2024-02-05/webhook/product.update.mdx#L77

Did you really mean 'orderable'?