Time Packages
Time packages provide members with a prepaid minute balance. Instead of paying by the hour at the standard rate, a member can purchase a block of minutes upfront and use them across multiple sessions. The system tracks the remaining balance and deducts minutes automatically as the member uses PCs or consoles.
Time Credit System
Similar to the wallet system, time packages use a credit-based architecture. Each time balance addition creates a new time credit. Each credit is an independent record with its own minute balance, source, expiration, and device restrictions.
A member's total available minutes are the sum of all remaining minutes across their active time credits.
Time Credit Fields
Each time credit record contains:
| Field | Description |
|---|---|
| Total minutes | The original number of minutes loaded into this credit when it was created. |
| Remaining minutes | The current balance of unused minutes in this credit. Decreases as the member uses sessions. |
| Credit type | How this credit was created (see Credit Types below). |
| Device restriction | Which device types can consume from this credit (see Device Restriction below). |
| Status | The current lifecycle state of the credit. |
| Expires at | Optional expiration timestamp. After this date, remaining minutes can no longer be used. |
| Purchase ID | If this credit was created from a campaign package purchase, a reference to that purchase record. |
Credit Types
Each time credit tracks how it was created:
| Credit Type | Description |
|---|---|
| Paid | The member paid for these minutes, either through a direct purchase or as the base entitlement of a campaign package. |
| Bonus | Promotional minutes granted as a bonus with a package purchase. For example, "buy 120 minutes, get 30 bonus minutes free." |
| Manual | Minutes manually added by a cashier or administrator. Used for goodwill credits, compensation, or special arrangements. |
Credit Status
Each time credit progresses through these states:
- Active: The credit has remaining minutes and has not expired. Minutes can be consumed from this credit.
- Expired: The credit's expiration date has passed. Any remaining minutes are no longer usable, even if the balance is greater than zero.
- Consumed: The credit's remaining minutes have reached zero through normal usage.
- Cancelled: The credit was manually cancelled by an administrator, voiding any remaining minutes.
Device Restrictions
Each time credit has a device restriction that controls which types of devices can deduct from it:
| Restriction | Meaning |
|---|---|
| Client | Usable on client PCs. Also usable on consoles unless explicitly restricted. |
| Console | Usable on gaming consoles. Also usable on PCs unless explicitly restricted. |
| PCs only | Usable exclusively on client PCs. Console sessions cannot deduct from this credit. |
| Consoles only | Usable exclusively on gaming consoles. PC sessions cannot deduct from this credit. |
| Both | Usable on any device type with no restriction. This is the default. |
The device restriction is set when the credit is created and cannot be changed afterward. The restriction is typically inherited from the campaign package definition that generated the credit.
Consumption Tracking
Every time minutes are deducted from a time credit, the system creates a time consumption record:
| Field | Description |
|---|---|
| Minutes consumed | The number of minutes deducted in this consumption event. Always a positive integer. |
| Consumed at | The timestamp when the deduction occurred. |
| Context | What triggered the deduction (see below). |
| Reference | A reference to the specific session, credit, or adjustment that caused the deduction. |
Context Types
| Context | Description |
|---|---|
| Session usage | Minutes consumed to pay for an active session. The primary consumption path. |
| Expiration | Minutes removed when a credit expires or when remaining minutes are adjusted due to an expiration event. |
| Refund | Minutes returned to the credit as part of a refund process (recorded as a negative consumption or a new credit entry). |
Integration with Campaign Packages
Time credits are most commonly created through campaign package purchases:
- An owner creates a campaign with one or more packages with a package type of "minutes."
- A member selects and purchases a package (from the client-side Member Panel or through a cashier at the counter).
- The system creates the appropriate time credits:
- A paid credit for the base minutes entitlement (the base amount from the package).
- If the package defines a bonus type of "minutes" with a bonus amount greater than zero, a separate bonus credit is created for the bonus minutes.
- The credits inherit the package's device restriction setting.
- If the package has a validity period set, the credit's expiration date is calculated from the purchase date plus the number of valid days.
How Time Is Deducted During Sessions
When a member with available time minutes starts a session:
- The system checks for active time credits matching the session's device type.
- Credits are consumed in order of expiration date (earliest-expiring first) to minimize waste from credits that are about to expire.
- As the session runs, minutes are periodically deducted from the eligible credits.
- Each deduction creates a consumption record as a "Session usage" entry.
- If all time credits are exhausted before the session ends, the session continues and the remaining time is billed at the standard hourly rate (paid at session close).
This means a member's time balance and wallet balance can work together. Time credits cover as many minutes as available and any overage falls through to wallet balance or cash payment.