Atomia Billing Server

Product Grace period

1 views 0

How to configure Grace period for products in Atomia Billing.

Overview

Atomia Billing Workflow has the option to handle products with the grace period. A grace period is a trial time at the beginning of the first subscription cycle. During grace period customer can terminate subscription without needing to pay for that subscription.

It is possible to activate this feature from Atomia Admin Panel plugin configuration page (Select > Plugin configuration). The grace period can be configured:

  • globally for all products, or
  • per product category (which overrides global setting), or
  • per specific product (which overrides global and per-category setting).

The only configuration option that is available for all three levels above is GracePeriod. All other configuration options are global configuration options.

Keep in mind

The GracePeriod option is configured for specific product (which overrides global and per-category setting) by adding custom attribute for that product (Products > Products, Actions > Edit, section Other Data). Custom attribute name is the value of the GracePeriodProductCustomAttributeKey global configuration option and the value is a number. If you set 0 as value for grace period offset, it will disable grace period for that product.

Plug-in configuration

Namespace: Atomia.Billing.Plugins.GenericWorkflowPlugin.EventHandlers.SubscriptionTerminationGracePeriodHandler

Example configuration:

{
    "Enable":true,
    "SkipDelayedTermination":true,
    "PrepaidCreditArticleNumber":"CRD-PREPAID",
    "GracePeriodProductCustomAttributeKey":"AddGracePeriod",
    "DefaultProductCategory":"Default",
    "PaidOptions":{
        "Enable":true,
        "KeepInvoiceDate":true,
        "PayReissueInvoiceWithPrepaid":true,
        "KeepInvoiceDueDate":false
    },
    "NotPaidOptions":{
        "Enable":true,
        "KeepInvoiceDate":true,
        "KeepInvoiceDueDate":false
    },
    "SubscriptionReactivationOptions":{
        "KeepInvoiceDate":true,
        "KeepInvoiceDueDate":false
    },
    "Categories":[
        {
            "CategoryName":"Default",
            "GracePeriod":10
        },
        {
            "CategoryName":"Domain", 
            "GracePeriod":5
        }
    ]
}

Configuration options are specified by JSON structure with the following entries:

  • Enable Enable grace period.
  • SkipDelayedTermination Skip delayed termination of the product when it is terminated in the grace period.
  • PrepaidCreditArticleNumber Article number of Atomia prepaid credit product.
  • GracePeriodProductCustomAttributeKey Custom attribute name for configuring grace period for the specific product.
  • DefaultProductCategory Name of default product category which applies to all categories with no configuration of their own.
  • PaidOptions[] Represents configuring of grace period when the invoice is paid.
  • PaidOptions[].Enable Credit paid invoice to remove invoice line(s) for deleted subscription(s). A new invoice will be reissued in case there are invoice lines left within the invoice.
  • PaidOptions[].KeepInvoiceDate In case a new invoice is reissued, keep the same invoice date as in the credited invoice.
  • PaidOptions[].KeepInvoiceDueDate In case a new invoice is reissued, keep the same invoice due date as in the credited invoice.
  • PaidOptions[].PayReissueInvoiceWithPrepaid In case a new invoice is reissued, use Atomia prepaid credits from customer balance to pay it.
  • NotPaidOptions[] Represents configuring of grace period when the invoice is not paid.
  • NotPaidOptions[].Enable Credit not paid invoice to remove invoice line(s) for deleted subscription(s). A new invoice will be reissued in case there are invoice lines left within the invoice.
  • NotPaidOptions[].KeepInvoiceDate In case a new invoice is reissued, keep the same invoice date as in the credited invoice.
  • NotPaidOptions[].KeepInvoiceDueDate In case a new invoice is reissued, keep the same invoice due date as in the credited invoice.
  • SubscriptionReactivationOptions[] Options to set for reactivation of subscriptions which are in grace period.
  • SubscriptionReactivationOptions[].KeepInvoiceDate In case a new invoice is reissued, keep the same invoice date as in the credited invoice.
  • SubscriptionReactivationOptions[].KeepInvoiceDueDate In case a new invoice is reissued, keep the same invoice due date as in the credited invoice.
  • Categories[] Represents the number of days for grace period specified by product category.
  • Categories[].CategoryName Name of the category this configuration applies to.
  • Categories[].GracePeriod Number of days from subscription start date. Place 0 (zero) to disable grace period for the product category.

Schedule task configuration

Namespace: Atomia.Billing.Plugins.GenericWorkflowPlugin.ScheduledTasks.InvoiceGracePeriodScheduledEventHandler

Example configuration:

{
    "ApprovedItemsCount":100,
    "RunCountLimitter":{
        "RunCountLimitNumber":20,
        "AdminEmail":"[email protected]"
    }
}

Configuration options are specified by JSON structure with the following entries:

  • ApprovedItemsCount Limit the number of invoices to be processed during one run. Zero means no.
  • RunCountLimitter[] Run count limit options for processing one invoice. Run count limit options means how many times will scheduled task try to process one task before marking the task as FAILED and sending a notification to Admin email.
  • RunCountLimitter[].RunCountLimitNumber Number of times which will schedule task run before it notifies Admin.
  • RunCountLimitter[].AdminEmail Set Admin email for notifying. Empty means it will use Reseller email.

Was this helpful?