Skip to content

Billing

The billing module allows you to sell game server hosting plans directly through the panel. It includes product management, payment processing, invoicing, a credit system, and coupon support. The billing module is optional and must be enabled before use.

Enabling Billing

  1. Navigate to Admin > Settings > Features and enable the Billing Module toggle.
  2. Navigate to Admin > Billing > Settings to configure global billing options:
    • Currency -- The currency code and symbol (e.g., USD / $).
    • Tax -- Enable or disable tax, set the rate, and choose whether prices are tax-inclusive.
    • Auto-Activate Orders -- Automatically provision servers when payment is received.
    • Auto-Suspend Days -- Number of days after an unpaid invoice before the service is suspended.
    • Auto-Terminate Days -- Number of days after suspension before the service is terminated.

Stripe Setup

BadgerPanel uses Stripe for payment processing.

  1. Navigate to Admin > Billing > Settings > Payment Gateways.
  2. Enable Stripe and enter your Stripe Secret Key and Publishable Key.
  3. Configure the webhook endpoint in your Stripe dashboard to point to https://panel.example.com/api/billing/webhooks/stripe.
  4. Save. Stripe checkout is now available to customers.

PayPal is also supported as an alternative gateway.

Products and Pricing

Products define what customers can purchase. Each product maps to a server configuration.

Creating a Product

  1. Navigate to Admin > Billing > Products and click Create Product.
  2. Fill in the product details: name, slug, description, and category.
  3. Configure Resources: memory (MB), disk (MB), CPU (%), swap, I/O weight, database limit, backup limit, and allocation limit.
  4. Set Pricing for one or more billing cycles:
    • One-time, Monthly, Quarterly, Semi-Annual, Annual, Biennial.
    • Each cycle has a price and an optional setup fee.
  5. Select the Deployment Type (daemon or Kubernetes) and the target nodes or orchestrators.
  6. Select the Egg and optionally override the Docker image, startup command, and default variables.
  7. Set visibility, featured status, stock limits, and per-user limits.

Pricing Types

Products support multiple pricing strategies:

  • Fixed -- A flat price per billing cycle with predefined resources.
  • Per-GB Memory -- Price scales with the amount of RAM the customer selects.
  • Per-GB Disk -- Price scales with disk space.
  • Configurable -- Customers choose resources within a defined range (min/max), with per-unit pricing.

Coupons

Coupons provide discounts on orders. Navigate to Admin > Billing > Coupons to manage them. Each coupon has a code, discount type (percentage or fixed amount), usage limits, and expiration date.

Credit System

When credits are enabled, customers can add funds to their account balance. Credits are applied automatically at checkout, reducing the amount charged to the payment method. Administrators can manually adjust a user's credit balance from the user detail page.

Invoices

Invoices are generated when an order is placed or a service renews. Each invoice records the line items, subtotal, tax, discounts, and total. Invoices transition through statuses: draft, pending, paid, overdue, cancelled, refunded.

View all invoices under Admin > Billing > Invoices. Filter by status, user, or date range.

Service Lifecycle

A billing service represents an active subscription tied to a server. The lifecycle is:

  1. Order placed -- Customer selects a product and completes checkout.
  2. Payment received -- Invoice is marked as paid. If auto-activate is on, the server is provisioned.
  3. Active -- The service is running. The server is accessible to the customer.
  4. Renewal -- A new invoice is generated before the billing cycle ends.
  5. Overdue -- If renewal payment fails, the invoice becomes overdue.
  6. Suspended -- After the configured auto-suspend period, the service and server are suspended.
  7. Terminated -- After the configured auto-terminate period, the service is terminated and server files are deleted.

Order Management

View and manage orders under Admin > Billing > Orders. Administrators can manually approve pending orders, cancel orders, or create orders on behalf of users.

Billing Appearance

Customize the storefront appearance under Admin > Billing > Appearance. Configure the store page layout, product card styling, and category icons to match your brand.

BadgerPanel Documentation