← Blesta integration

Customer billing · Setup guide

Set up Blesta

Install the module, add a module row and configure packages or selectable profile quantities.

Ask for the matching package →
Package
vpn_dashboard_blesta.zip
Install in
components/modules/vpn_dashboard
Provider key
blesta

01

Install the files

  1. Obtain the package matched to your dashboard version before installing.
  2. Extract it and copy the vpn_dashboard directory into components/modules in your Blesta installation.
  3. In Blesta, open Settings, Company, Modules and install VPN Dashboard.

The package and dashboard must support the same billing and customer sign-in contract.

02

Add the dashboard connection

  1. In VPN Dashboard, open Settings → Billing integrations, save a connection for blesta, then generate its API token and SSO secret. Use a separate webhook signing secret.
  2. Add a module row and enter the HTTPS address of your dashboard.
  3. Enter the billing API token, SSO signing secret and webhook signing secret from the matching billing connection in VPN Dashboard.
  4. Set the provider key to blesta, run Test connection and add the Blesta server public IP to the billing API allow-list.

Use blesta for the module, billing connection and customer sign-in settings.

03

Configure the VPN product

  1. Create or edit a package, open the Module tab and select the VPN Dashboard module row.
  2. Set the minimum, default and maximum profile quantities, the name shown in VPN Dashboard and the server access type.
  3. To let customers choose the number of profiles, create a package option under Packages, Options and use profile_limit, vpn_dashboard_profile_limit, vpn_profiles, profiles or profile_count as its field name.

04

Add customer sign-in

The Blesta service page can open the customer VPN area through a signed link that expires after five minutes. The link can be used once. The customer must already have a provisioned billing account and an active service; no separate dashboard password is issued.

Keep the SSO signing secret private. Change it in both systems if it is ever exposed.

Connection and product settings

Connection settings apply to the module. Product settings apply to each plan.

Connection settings5 fields
Dashboard URLRequired HTTPS address
The address of your VPN Dashboard installation, without an API path.
Billing API tokenRequired secret
Copy the token from the matching billing connection in VPN Dashboard.
SSO signing secretRequired, at least 32 characters
Signs the short-lived link that takes a customer from their billing account to the VPN area.
Webhook signing secretBlank or at least 32 characters
Signs write requests from the module. Leave it blank only when the billing server IP is enforced through the API allow-list.
Provider keyblesta
Must match the provider key on the billing connection and customer sign-in settings.
Product settings6 fields
Minimum profiles50 by default
The lowest profile quantity accepted for this package.
Default profiles50 by default
Used for new services when no recognised package configurable option supplies a quantity.
Maximum profiles10,000 by default
The highest profile quantity accepted for this package.
Product name sent to VPN DashboardVPN profiles by default
The plan name stored with the service in VPN Dashboard.
Server accessShared or dedicated; shared by default
Dedicated services wait for dedicated VPN server capacity.
Configurable profile quantityBetween the package minimum and maximum
A recognised package configurable option sets the profile allowance during ordering or a service change.

Separate: installation licence sales

The vpn_panel_licence module manages VPN Dashboard business licences. It is separate from the Blesta VPN customer provisioning module above.

  1. The licence issuer creates a named tier with a profile allowance in multiples of 100.
  2. An active Blesta service provides the business with a licence ID and activation key.
  3. Activation ties the signed entitlement to the dashboard installation, hostname and environment.
  4. Renewal checks the Blesta service status, package and paid-through date. Suspended or cancelled services produce a revoked entitlement.
  • The module requires Blesta 6.0.3 or later and a separately configured licence issuer.
  • Licence capacity counts every profile not marked deleted, including pending and suspended profiles.
  • This module is for the software licence seller. VPN operators connect their own customers using the provisioning module above.

Where the settings are stored

Blesta and the dashboard keep separate responsibilities.

Package
Defines the price and default number of profiles. Its Module settings are used when an order does not contain a recognised package option.
Package option
Lets the customer choose the number of profiles while ordering. The selected value replaces Default profiles but must remain inside the package minimum and maximum.
Service
Represents one customer subscription. The module saves its VPN Dashboard service ID and profile_limit so later changes continue to update the same VPN service.

What Blesta does automatically

When the service changes in Blesta, the module makes the same change in VPN Dashboard.

Add service
Creates the VPN Dashboard service when Blesta activates the service through the module.
Edit service
Updates the existing service, including a changed profile limit, instead of creating a second one.
Suspend or unsuspend service
Suspends or restores VPN access when Blesta runs that module action.
Cancel service
Cancels VPN access when Blesta processes the service cancellation. Scheduled cancellations depend on the Blesta cron reaching their cancellation date.

Test a Blesta order before launch

Test the exact platform version and product settings you intend to use.

  1. Place a test order with the package default and confirm the Blesta service becomes active.
  2. Place another order using a package option and confirm its selected quantity replaces Default profiles.
  3. Change the service’s configurable option quantity and confirm the existing VPN Dashboard service changes without a duplicate appearing.
  4. Run suspend and unsuspend from Blesta, then confirm the customer link still opens the same service after restoration.
  5. Schedule a cancellation, run the Blesta cron after the due time and confirm access is cancelled.
  6. Open a fresh customer sign-in link and verify that it reaches the correct account after activation.

When an account change does not reach VPN Dashboard

Start with the order or service that should have sent the change.

Service remains pending
Check the package automation and whether Blesta called addService with use_module enabled. Then read the service error shown by the module.
Wrong profile limit
Check the package option field name and selected value. A recognised option replaces the default or stored quantity; without one, an existing service keeps its stored quantity.
Scheduled cancellation does nothing
Confirm the Blesta cron is running and the cancellation date has passed; the module is called when Blesta processes the cancellation.

Blesta notes

  • PHP cURL must be available to Blesta.
  • A separate incoming webhook is not required.
  • The profile quantity is stored as profile_limit for service emails and display; the legacy vpn_dashboard_profile_limit field is also populated.
  • Credentials belong to this provider connection. Do not reuse another platform’s API token or signing secrets.