Quickstart
Enable billing, configure a payment provider, create your first plan, and run a test purchase.
This guide walks you through getting billing fully operational on a fresh Struxa instance.
1. Enable billing
Navigate to Admin → Billing and open the Settings tab. Toggle Enable Billing on and set:
- Default currency — ISO 4217 code (e.g.
USD,EUR,PLN). All prices are stored in this currency. - Invoice prefix — a short string prepended to invoice numbers (e.g.
INV-). Optional. An invoice record is stored in the database for every purchase and renewal, but there's no invoice view or download for users yet.
Save the settings. The /billing route and the wallet are now visible to users.
2. Configure a payment provider
Go to Admin → Billing → Providers. Struxa ships with two built-in providers:
Stripe
| Field | Where to find it |
|---|---|
| Publishable key | Stripe Dashboard → Developers → API keys |
| Secret key | Stripe Dashboard → Developers → API keys |
| Webhook signing secret | Stripe Dashboard → Developers → Webhooks → your endpoint |
Set your webhook endpoint in Stripe to:
https://your-panel.example.com/api/billing/webhook/stripeSimPay
| Field | Where to find it |
|---|---|
| API password | SimPay merchant panel → API |
| Service ID | SimPay merchant panel → Services |
Set your webhook endpoint in SimPay to:
https://your-panel.example.com/api/billing/webhook/simpaySave the provider. Users now see it as a top-up option in their wallet.
3. Create a category and product
Categories group related hosting plans. Navigate to Admin → Billing → Catalog.
- Click New Category — give it a name, optional icon, banner image, and description.
- Inside the category, click New Product — give it a name, mark it featured if you want it highlighted, set its resource limits (CPU, RAM, disk, etc. — these apply to every duration of this product), and add one or more pricing tiers with a duration and price each.
Add more pricing tiers (7-day, 1-month, 3-month, 6-month, 1-year) to offer several billing periods for the same product — they'll all provision the same resource limits.
See Plans & Products for a full reference on resource limits and how categories are displayed.
4. Top up a wallet and make a purchase
- As a regular user, go to
/billing/walletand click Top Up. - Select a provider, choose an amount, complete the payment flow.
- Once the webhook fires, your balance updates automatically.
- Go to
/billing, open your category, and work through the 4-step purchase wizard. - On completion, a server is created and appears in your server list with the plan's resource limits applied.
For local testing, you can manually adjust a user's wallet balance from Admin → Users → [user] without going through a payment provider.
5. Verify the subscription
Navigate to that user's page at Admin → Users → [user] and confirm the new subscription shows status active with the correct start and end dates, linked to the right server. There is no cross-user subscription list yet — subscriptions are only visible per-user.