Subscription-Based Products

This document is based on the PaaS 8.2 version. The subscription functionality introduced in the 8.1 release is not production-ready but just a beta (preview) of the feature. Be aware that subscriptions configured on the beta version won’t be migrated during the 8.2 upgrade.

The platform allows providing end-users with subscription-based solutions. The general idea is standard to the modern subscription services implementations – a client is charged once and gets a designated product for a specified period. The main target of such a pricing model is considered to be subscription-based WordPress packages. Still, the solution implementation is universal, allowing the adoption of other use cases as well.

The subscription products give customers a fix-priced alternative to the default usage-based model. Below, we’ll go step-by-step on how to configure subscriptions on the platform. To check how it works from the end-user perspective, go to the linked guide.

Note: The subscription functionality is not available for the platform resellers.

Configuring Subscriptions

The integration of the subscription-based solutions is done through the dedicated Products section in the cluster admins panel. Currently, only pre-packaged applications can be assigned, but the category can be extended in future releases (e.g. per account professional support services).

1. Go to the Billing > Products section of the admin panel and click Add at the tools panel to create a new product. The only mandatory parameter is Display Name, but you should check the linked guide for detailed information on all the available configuration options.

add new subscription product

2. Each product can have several variations (more resources, additional features, etc.), which are configured through the service plans. The main parameters are Display Name, Marketplace Package, and Subscription Tariff. If you want to implement support for migration between service plans, tick the “Allow moving to another service plan” option (additional changes to the packages may be required). Use the guide linked in the previous step for information on all the available configurations.

configuring service plans

Note: If working with the Stripe billing system, consider the following points before setting the subscription tariffs:

  • The minimum possible price must be at least the same as defined in the Stripe documentation for your currency.
  • Charges that must be converted into your account’s default settlement currency must meet the equivalent minimum of the settlement currency after conversion.
  • Tax specifics are managed via the external.billing.settings system setting, which stores the billing integration parameters in JSON format. For example, the default value of the setting specifies the following parameters:
    • auto.tax.calculation - enables/disables tax auto-calculation for subscriptions and Stripe billing integration
    • invoice.tax.include - configures tax type for subscription and POST user invoices (true – inclusive – tax is included in the price; false – exclusive – tax will be added on top of the price). It depends on the auto.tax.calculation setting and does not affect pre-paid user invoices
1
2
3
4
5
6
{
    "STRIPE": {
        "auto.tax.calculation": false,
        "invoice.tax.include": true
    }
}

When implementing the subscription model, be aware of the account deactivation (the user’s balance goes below the account.minbalance quota), as all environments will be stopped, including active subscriptions. Also, any “overuse” configured for the subscription will be charged from the account’s balance, which may lead to account deactivation.

Add as many service plans to your product as needed.

3. Ensure that the required product is Active. Otherwise, it won’t be shown in the user dashboard.

change product status

4. Configure the following quotas for the required groups (or specific users):

  • account.subscriptions.enabled - enables/disables access to the subscription-based solutions
  • account.subscriptions.resources.destroy.period - sets a period (in days) to keep environments suspended due to the unpaid subscription before destroying them

Tip: The flow for the subscription instances upon unpaid invoice is the following:

  1. After the invoice due date, the environments remain operable during the Grace Period.
  2. After the Grace Period, the environments are stopped but are preserved during the account.subscriptions.resources.destroy.period quota period.
  3. After the period defined in the quota, all the environments associated with the subscription are permanently removed (without the ability to restore data).
  • account.subscriptions.withdraw.type - defines the subscription invoices withdrawal type (1 – via account balance and bonuses, 2 – via external invoice)

Notes:

  • The external invoice withdrawal type is supported only with the WHMCS (with plugin 2.5 or above version) and Stripe billing systems.
  • Only the external invoice withdrawal type is available for the PaaS for WordPress edition.
  • Be aware that any additional fees and taxes charged by the external billing system will not be returned to the user balance upon refund. For example: If the subscription cost is 10$ with 20% exclusive VAT, the user will be charged 12$ for the subscription, but after an immediate refund, only 10$ will be returned to the user’s balance (i.e. without VAT).

subscription quotas

It is highly recommended to enable subscription to just your test user(s) first so that you can verify the process before providing it to actual customers.

5. Check the subscription-related emails and ensure you have localization for each custom language used on the platform. Verify the following email templates:

  • subscriptions_invoice_created – notification about a new invoice for a subscription
  • subscriptions_invoice_not_paid – notification about an unpaid invoice for a subscription
  • subscriptions_resources_going_be_destroyed – notification about an ended subscription
  • subscriptions_paid – notification about a subscription being paid for
  • subscriptions_not_renewed – notification about failed subscription renewal via the auto-pay feature

subscription email templates

6. Log in to the dashboard and verify the correct user experience for the subscriptions.

subscriptions at user dashboard

If satisfied with the result, you can make the solution available for all the users.

What’s next?