Commerce License Billing provides advanced (prepaid, postpaid, prorated, plan-based, metered) recurring billing for licenses.

Dependencies: Commerce License, Advanced queue, Views Megarow.

Important: You need Entity API 1.3 or newer.

Getting started

  1. Go to admin/commerce/config/license/billing-cycle-types and add a billing cycle type.
  2. Create a product, select a license type, then below select your billing cycle type and billing type (prepaid or postpaid).
  3. Checkout the product. If you selected postpaid as the billing type, your product will be free.
  4. A billing cycle has now been opened (with the current start date, and the end date depending on your billing cycle type settings), along with a matching recurring order.
  5. When the billing cycle expires, the recurring order will be closed and charged for using Commerce Card on File, and a new billing cycle & order will be opened.

Relationship to Commerce License

Any license type can be used for recurring billing without changes.
A license is considered billable if its product has a billing cycle type
selected.

If the license type wants to have metered billing, it must implement the
CommerceLicenseBillingUsageInterface interface.

Prepaid billing

Prepaid products are paid up front.

That means that if a customer registers on April 1st, he will immediately pay the
monthly fee for April. On the first day of May, he will be charged for the
april usage (if any), and the monthly fee for May. If on May 15h he cancels
his subscription, on the first day of June he will only pay the usage for May.

The other half of the May monthly fee will not be refunded, since that is
not currently implemented (a common strategy being to award the customer
points to be used for discounting future purchases).

Postpaid billing

Postpaid products are paid at the end of the billing cycle.

That means that if the customer registers on April 1st, his order is free and he pays
nothing. On the first day of May, he will be charged for the April monthly fee,
and the april usage (if any). If on May 15th he cancels his subscription, on the
first day of June he will pay the prorated montly fee for May, and the usage
for May.

Cancellations and plan changes can also be postponed to the end of the billing cycle
to avoid prorating (optional for postpaid, always enabled for prepaid).

Prorated payments

A prorated payment is a payment proportional to the duration of the usage.
So, if the billing cycle is two weeks, but the plan was used for one week,
only half of the plan's price will be set on the line item.

For information on plan-based and metered billing, as well as other technical details, see the documentation page.

Project Information

Downloads