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

FieldWhere to find it
Publishable keyStripe Dashboard → Developers → API keys
Secret keyStripe Dashboard → Developers → API keys
Webhook signing secretStripe Dashboard → Developers → Webhooks → your endpoint

Set your webhook endpoint in Stripe to:

https://your-panel.example.com/api/billing/webhook/stripe

SimPay

FieldWhere to find it
API passwordSimPay merchant panel → API
Service IDSimPay merchant panel → Services

Set your webhook endpoint in SimPay to:

https://your-panel.example.com/api/billing/webhook/simpay

Save 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.

  1. Click New Category — give it a name, optional icon, banner image, and description.
  2. 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

  1. As a regular user, go to /billing/wallet and click Top Up.
  2. Select a provider, choose an amount, complete the payment flow.
  3. Once the webhook fires, your balance updates automatically.
  4. Go to /billing, open your category, and work through the 4-step purchase wizard.
  5. 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.

On this page