Files
HexaHost-GameCloud/docs/integrations/whmcs/addons.md

57 lines
1.9 KiB
Markdown

# WHMCS addon products
Bill optional GameCloud features as WHMCS addon products linked to the main Minecraft service.
## Supported addon types
| WHMCS addon | GameCloud feature | Module action |
|-------------|-------------------|---------------|
| Extra backup retention | Extended backup slots | Usage / plan metadata sync |
| Dedicated IP (future) | Reserved port/IP on node | Manual / Phase 10 |
| Priority support | No technical change | Billing only |
Technical addons call GameCloud APIs during `CreateAccount` / `TerminateAccount` on the addon service or via usage records — see [usage billing](../usage-billing.md).
## Setup
**Setup → Products/Services → Product Addons → Create New Addon**
1. Assign to Minecraft parent products
2. Module: **HexaHost GameCloud** (if addon provisioning implemented) or **None** for pure billing markers
3. Map addon ID in GameCloud addon module **Mappings** (addon tab) when available
## Linking to parent service
GameCloud correlates via:
- `externalServiceId` — parent WHMCS service ID
- `externalAddonId` — addon service ID (usage export)
Ensure parent service is provisioned before addon activation.
## Lifecycle
| WHMCS event | Expected behavior |
|-------------|-------------------|
| Addon ordered | Enable feature flag on server |
| Addon suspended | Disable feature; do not delete data |
| Addon terminated | Revert limits; purge addon-specific data |
## Metered addons
For usage-based billing (playtime, storage overage):
1. GameCloud worker aggregates usage
2. WHMCS polls via addon module or server module metric export
3. WHMCS generates invoices — [usage billing](../usage-billing.md)
## Reconciliation
Orphaned addons (parent terminated, addon active) appear in **Reconciliation** dashboard. Run dry-run before live fix.
## Related
- [Products](products.md)
- [Usage billing](../usage-billing.md)
- [Reconciliation](../reconciliation.md)