Credit
A Credit is the platform's internal currency used by makers to pay for services like game creation, game code generation, and feature unlocks.
Properties
| Property | Type | Description |
|---|---|---|
Id | int | Primary key |
UserId | int | FK → AppUser |
InvoiceId | int? | FK → Invoice that granted this credit |
ExpiresAtUtc | DateTime | When the credit expires |
ExhaustedAtUtc | DateTime? | When the credit was consumed |
ExhaustionType | string? | What consumed it (see below) |
ExhaustionReference | string? | ID of the consuming entity |
Exhaustion Types
| Type | Cost | Description |
|---|---|---|
GameCreation | 100 | Creating a new game |
OrderFulfilled | — | Earned when an order is fulfilled |
InvoiceFeature | — | Purchased via invoice |
VatExemption | — | Granted for VAT-exempt purchases |
AnonymousSale | — | Cost for enabling anonymous sales |
GameCodeGeneration | 1 each | Generating game codes |
LightningPayment | — | Lightning payment processing |
LightningWebhookSetup | — | Setting up Lightning webhook |
Credit Balance
The user's CreditBalance field on AppUser is the running total of unexpired, unexhausted credits. When a service is used, credits are consumed (exhausted) in FIFO order.