From da09a3f11f430673b2a99b228d0dbbd7468912ed Mon Sep 17 00:00:00 2001 From: nikolay Date: Tue, 26 Aug 2025 13:40:59 +0300 Subject: [PATCH 1/3] docs update for denomination --- .../2024-02-05/webhook/product.update.mdx | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/reference/2024-02-05/webhook/product.update.mdx b/reference/2024-02-05/webhook/product.update.mdx index 9641db8..1a8e9df 100644 --- a/reference/2024-02-05/webhook/product.update.mdx +++ b/reference/2024-02-05/webhook/product.update.mdx @@ -24,3 +24,54 @@ Use the `product_code` to identify the product that was updated, then refer to t You should store the `timestamp` and discard any events that are older than the last event you received. + +## 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": [] + } +} +``` + +When a product becomes non-orderable (`is_orderable: false`), the `denominations.available_list` will be empty for fixed denomination products. From a55a92f7ede4d64a1cf1d93617772793560c1b27 Mon Sep 17 00:00:00 2001 From: nikolay Date: Tue, 26 Aug 2025 14:22:23 +0300 Subject: [PATCH 2/3] fix denom list --- reference/2024-02-05/webhook/product.update.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/2024-02-05/webhook/product.update.mdx b/reference/2024-02-05/webhook/product.update.mdx index 1a8e9df..e89732c 100644 --- a/reference/2024-02-05/webhook/product.update.mdx +++ b/reference/2024-02-05/webhook/product.update.mdx @@ -69,9 +69,9 @@ The `denominations` object within both `old_state` and `new_state` represents th { "denominations": { "type": "fixed", - "available_list": [] + "available_list": ["10", "25", "50"] } } ``` -When a product becomes non-orderable (`is_orderable: false`), the `denominations.available_list` will be empty for fixed denomination products. +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. The denomination information is preserved regardless of the product's orderability status. From a712e7341cdee0210804d1bcfede845ea239c9c0 Mon Sep 17 00:00:00 2001 From: nikolay Date: Tue, 26 Aug 2025 14:24:05 +0300 Subject: [PATCH 3/3] more fixes --- reference/2024-02-05/webhook/product.update.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/2024-02-05/webhook/product.update.mdx b/reference/2024-02-05/webhook/product.update.mdx index e89732c..675638d 100644 --- a/reference/2024-02-05/webhook/product.update.mdx +++ b/reference/2024-02-05/webhook/product.update.mdx @@ -74,4 +74,4 @@ The `denominations` object within both `old_state` and `new_state` represents th } ``` -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. The denomination information is preserved regardless of the product's orderability status. +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.