Overview
This page documents enum types and constant values used throughout the Komerza API.Order Enums
Delivery Item Type
File - Downloadable file delivered via secure link
Dynamic - Content generated via webhook. See Dynamic Delivery
Guide
License Key - Auto-assigned from pre-generated inventory
Plaintext - Static text content
Delivery Item Source
Static - Pre-defined content configured in product settings
Generated - System-generated (e.g., license key from inventory)
External - Retrieved from external webhook endpoint
Refund Reason
Suspected or confirmed fraudulent activity
Customer requested refund
Duplicate transaction or order
Reason not covered by other categories
Product Enums
Product Privacy
Visible on store page, searchable, and accessible to all visitors
Hidden from store page, only accessible via direct URL
Only visible to administrators, not purchasable
Stock Calculation Mode
Automatically calculated from inventory items. Decrements with each purchase.
Stock not tracked. Allows unlimited purchases.
Manually set to a specific number. Requires manual adjustment after sales.
Ticket Enums
Ticket Status
Customer submitted ticket, awaiting seller response
Ticket closed with issue resolved (final state)
Ticket closed without resolution (final state)
Seller responded, awaiting customer reply
Customer replied, awaiting seller response
Usage in Code
- JavaScript
- Python
- C#
Important Notes
Integer enums are zero-based: Privacy (0-2), StockMode (0-2), RefundReason
(0-3), TicketStatus (0-4)
Order Enums
Delivery Item Type
Defines the type of content delivered to customers after purchase.File Delivery - A downloadable file (software, documents, media, etc.)
Used when the product is delivered as a file download. The system provides a
secure download link to the customer.
Dynamic Delivery - Content generated via webhook The delivery content is
dynamically generated by your webhook endpoint. See Dynamic Delivery
Guide for implementation details.
License Key - Software license or activation key A license key or
activation code from your pre-generated inventory. The system automatically
assigns the next available key from your stock.
Plain Text - Simple text content Static text content displayed to the
customer. Useful for instructions, access codes, or simple information.
Usage Example
Delivery Item Source
Indicates how the delivery content was generated or obtained.Static Source - Pre-defined content The delivery content was statically
defined when configuring the product (e.g., a fixed download link or
pre-written text).
Generated Source - System-generated content The content was automatically
generated by the Komerza system (e.g., a license key from inventory).
External Source - Third-party webhook The content was obtained from an
external webhook endpoint (dynamic delivery).
Usage Example
Source by Type Matrix
| Delivery Type | Common Sources | Description |
|---|---|---|
file | static | Pre-uploaded file |
dynamic | external | Webhook-generated content |
license_key | generated | Auto-assigned from inventory |
plaintext | static | Pre-defined text |
Refund Reason
Specifies the reason for issuing a refund.Fraudulent Activity - Refund due to suspected or confirmed fraud Use when:
- Chargeback filed - Fraudulent payment detected - Stolen payment method used
- Identity theft suspected
Customer Request - Customer requested a refund Use when: - Customer
dissatisfied with product - Product didnât meet expectations - Customer
changed their mind - Accidental purchase
Duplicate Order - Duplicate transaction or order Use when: - Customer
accidentally ordered twice - Payment processed multiple times - System error
created duplicates
Other Reason - Reason not covered by other categories Use when: -
Technical issue with delivery - Product out of stock after purchase - Custom
business reason
API Usage
Product Enums
Product Privacy
Controls the visibility of products in your store.Public - Visible on store page The product is: - Displayed on your store
page - Searchable in your store - Indexed by search engines (if enabled) -
Visible to all visitors Use for: All regular products you want to sell
publicly
Unlisted - Hidden from store, accessible via direct link The product is: -
Not shown on your store page - Not included in search results - Only
accessible via direct URL - Not indexed by search engines Use for: -
Private deals or exclusive offers - Beta products - Limited-time offers -
Invitation-only products
Private - Only visible to administrators The product is: - Completely
hidden from customers - Only visible in dashboard - Not purchasable by
customers - Useful for drafts and testing Use for: - Draft products -
Testing configurations - Internal-only products - Archived products
API Usage
Privacy Level Comparison
| Feature | Public | Unlisted | Private |
|---|---|---|---|
| Store page | â Visible | â Hidden | â Hidden |
| Direct link | â Accessible | â Accessible | â Not accessible |
| Search | â Searchable | â Not searchable | â Not searchable |
| Purchasable | â Yes | â Yes | â No |
| Admin only | â No | â No | â Yes |
Stock Calculation Mode
Determines how product stock is calculated and displayed.Calculated - Stock based on individual items Stock is: - Automatically
calculated from inventory items - Decremented with each purchase - Based on
actual available items (license keys, serials, etc.) - Accurate real-time
count Use for: - License key delivery - Serial numbers - Digital codes -
Limited physical inventory Example: You have 50 license keys uploaded â
Stock shows 50
Ignored - Stock value not used Stock is: - Not displayed to customers -
Not tracked or enforced - Allows unlimited purchases - Never shows âout of
stockâ Use for: - Unlimited digital products - Services - Dynamically
generated content - Products with external inventory Example: Digital
course - unlimited enrollments possible
Fixed - Manually set stock value Stock is: - Set to a specific number
manually - Not automatically updated - Requires manual adjustment after sales
- Used for display purposes Use for: - Physical products tracked externally - Approximate stock levels - Marketing purposes (âOnly 10 left!â) Example: Set to 100 and manually update as needed
API Usage
Mode Selection Guide
Ticket Enums
Ticket Status
Represents the current state of a support ticket.Opened - Awaiting seller response - Customer submitted a new ticket -
Waiting for seller to respond - Highest priority for response - Shows as
âOpenâ in dashboard Transitions to:
Responded, ClosedResponded - Seller has responded - Seller replied to the ticket - Waiting
for customer reply - Shows seller is actively handling - Customer can respond
or close Transitions to:
CustomerResponded, Resolved, ClosedCustomer Responded - Customer replied - Customer sent a new message -
Waiting for seller response again - Indicates ongoing conversation - Requires
seller attention Transitions to:
Responded, Resolved, ClosedResolved - Closed and marked resolved - Ticket closed by customer -
Customer confirmed issue resolved - Positive outcome - Final state (success)
Transitions to: None (final state)
Closed - Closed without resolution - Ticket closed without resolution -
Could be by timeout, seller, or customer - Issue not necessarily resolved -
Final state (inconclusive) Transitions to: None (final state)
Status Flow
API Usage
Status Meaning by Actor
| Status | For Seller | For Customer |
|---|---|---|
Opened | đ´ Action required | âŗ Awaiting response |
Responded | âŗ Awaiting customer | đ´ Response received |
CustomerResponded | đ´ Action required | âŗ Awaiting response |
Resolved | â Successfully resolved | â Issue resolved |
Closed | âšī¸ Ticket closed | âšī¸ Ticket closed |
Best Practices
Using Enums in API Requests
- JavaScript/TypeScript
- Python
- C#
Validation
Always validate enum values before sending to API
Handle unknown enum values gracefully in responses
Use constants instead of magic numbers
Document enum usage in your integration
String vs Integer Enums
| Type | Examples | Notes |
|---|---|---|
| Integer | Privacy (0, 1, 2), RefundReason (0-3), TicketStatus (0-4), StockMode (0-2) | Use exact integer values |
| String | DeliveryItemType, DeliveryItemSource, PaymentMethod | Use exact string values |
Integer enums use zero-based indexing. Always use the exact integer value, not
the enum name.