Files
HexaHost-GameCloud/docs/billing/providers.md
smueller 4b20efe4bc
Some checks failed
CI / Node — lint, typecheck, test, build (push) Failing after 10s
CI / Go — node-agent tests (push) Failing after 8s
CI / Go — edge-gateway build (push) Successful in 17s
Implement WHMCS Addon Dashboard with API for stats and integrate billing provider logic
2026-06-26 15:11:29 +02:00

1.4 KiB

Billing providers

GameCloud supports three billing modes via BILLING_PROVIDER:

Provider Use case Credit wallet
internal Dev / free tier Required for start
whmcs Production default Bypassed — WHMCS bills customers
stripe Optional fallback without WHMCS Bypassed — extend webhook handler
BILLING_PROVIDER=whmcs
WHMCS_INTEGRATION_ID=your-integration-id
WHMCS_API_SECRET=your-secret

Commercial lifecycle (orders, invoices, suspend, usage metrics) runs entirely in WHMCS. GameCloud enforces billingSuspendedAt from WHMCS API calls.

Internal (development)

BILLING_PROVIDER=internal

Uses the credit wallet and usage metering from Phase 7. Suitable for local development and standalone free tier.

Stripe (optional fallback)

BILLING_PROVIDER=stripe
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...

Webhook endpoint: POST /api/v1/webhooks/stripe

When BILLING_PROVIDER is not stripe, webhooks return { received: true, mode: 'ignored' } without side effects.

The current implementation verifies signatures and logs events idempotently. Extend StripeWebhookService to map Stripe customers to GameCloud users if you deploy without WHMCS.

Do not enable Stripe and WHMCS billing simultaneously — choose one commercial system of record.