- 1 What Subscriptions module does
- 2 Roles in Subscriptions module management
- 3 Enabling and Configuring 'Subscriptions'
- 4 Adjusting Setup Fees and Recurring Billing Plans
- 5 Managing Subscriptions
- 6 Running admin/pay_subscriptions.php
What Subscriptions module does
Subscriptions is an X-Cart module that allows you to use recurring billing. If your store has to deal with regularly scheduled payments (such as membership dues or installment payments), this module can take a load of work off the shoulders of the staff involved with processing them.
With Subscriptions, your customers' accounts can be charged automatically. You specify, which products in your store should be available by subscription, and set up a recurring billing plan for each of these products. A recurring billing plan includes information about the amount and frequency to be charged to a customer's credit card.
When customers order a subscription product, they consent to allow your store take payments from their account at regular periods of time. Then, a special script, which can be launched either manually or automatically, uses the billing information contained in the customers' profiles to charge an appropriate amount to their credit cards. An optional email can be sent to the orders department of your store every time a customer's account is charged to help you monitor your recurring billing transactions.
In any case, using the module reduces processing time and administrative hassle, reduces risk of human error from manual processing and provides you better control over your cash flow.
Roles in Subscriptions module management
If you are an X-Cart GOLD administrator/provider or an X-Cart PRO administrator:
- You can enable/disable Subscriptions module and adjust its configuration settings (Check out #Enabling and Configuring 'Subscriptions').
- You can perform all operations regarding subscription management in your store: search for existing subscriptions, view the details of subscription orders, change future pay dates, activate/disable/cancel subscriptions, etc (Study #Managing Subscriptions).
- You can manually charge accounts of customers signed up for a recurring billing plan or set up an external application that will charge these accounts automatically (See #Running admin/pay_subscriptions.php).
If you are an X-Cart PRO provider:
- You can specify, which products you would like to be paid for on a recurring basis and set up recurring billing plans for these products (See #Adjusting Setup Fees and Recurring Billing Plans).
Enabling and Configuring 'Subscriptions'
To begin using the module:
1. Open the file config.php in a text editor. Set the values of the $store_cc and $store_cvv2 variables to 'true'. Save the file.
2. Enable Subscriptions module (Administration menu->Modules).
- When the module is enabled, you can see:
- Subscriptions item in the Management menu;
- Subscriptions link in the 'Product Management' section menu (when a product is opened for editing);
- Subscriptions options section in General settings/Modules options.
3. Adjust the module settings via General settings/Modules options->Subscriptions options.
- a) If you are going to run the admin/pay_subscriptions.php script from the command line or to automate recurring billing using a scheduling program (like cron), set a secret key for your Subscriptions module. A secret key must consist of alpha-numeric symbols and can have up to 64 symbols.
- b) Specify if you want notifications to be sent to the orders department after billing has been performed.
- c) Click the Save button.
To be able to process subscription payments automatically you need to set up Subscriptions processor. See the #'Payment methods' section for more information.
Adjusting Setup Fees and Recurring Billing Plans
If you want to sell products using subscription, you need to define a subscription setup fee and a recurring billing plan for each of these products.
To define a subscription setup fee for a product:
- Find the product for which you want to set up a recurring billing plan. Open this product for modification in the 'Product Management' section.
- Enter the desired setup fee into the 'Price' filed.
To set up a recurring billing plan for a product:
1. Find the product for which you want to set up a recurring billing plan. Open this product for modification in the 'Product Management' section.
2. Click the Subscriptions link in the 'Product Management' section menu. 'Subscription' dialog box will be opened.
3. Complete the fields of the 'Subscription' dialog box:
- a) Specify the frequency at which a customer's account should be charged:
- select Annually, Quarterly, Monthly or Weekly from the 'PAY PERIOD' drop-down box, or
- select By period from the 'PAY PERIOD' drop-down box and enter your own period into the field below. The period must be specified in days.
- b) Specify a period fee - an amount that will be charged to a customer's account per period. For example, if a monthly payment must be $20, you should enter 20.00 into the 'PERIOD FEE' field.
- c) Use the 'COST OF ONE DAY' field to specify how much it will cost to use the product for one day.
- d) Use the 'DAYS SAME PERIOD' field to specify the number of days in the period specified in the 'PAY PERIOD' field.
- You would like to set up a recurring billing plan for a certain product so that regular payments of $20 are taken from the accounts of customers who purchase this product monthly (say, on the 10th day of the month). You set the ‘PAY PERIOD’ field to Monthly and the 'PERIOD FEE' field to 20.00. Assuming the product's setup fee is set to 0.00, a customer who signs up for the recurring billing plan on May 10th will be supposed to pay $20 at once, then another $20 on June 10th, then $20 on July 10th and so on.
- Now think of a situation where a customer comes to your store on May 1st and signs up for the recurring billing plan. How much is this customer supposed to pay? It does not seem fair to charge him the full period fee amount of $20 on May 1st, as he will be supposed to pay $20 again in just 10 days. Subscriptions module helps you handle this situation using the values of 'COST OF ONE DAY' and 'DAYS SAME PERIOD' fields. As his first payment, the customer who signs up for the recurring billing plan 10 days before the established pay date will only be charged for the time he uses the product in the current period (10 days). To find out how much money the customer is supposed to pay for 10 days, Subscriptions module will multiply the cost of one day of using the product (the value of the 'COST OF ONE DAY' field) by the number of days before the next pay period (the value of the 'DAYS SAME PERIOD' field). In our example, the cost of one day is $20.00 (period fee) / 30 days (the average number of days in a month) = $0.666667; the number of days before the next pay period is 10. This means that the cost of using the product for 10 days before the next period is approximately $6.67
- The sum that will be charged to your customer's account on May 1st will be calculated according to the formula 'setup fee + cost of using the product for 10 days' ($0.00 + $6.67) and will equal $6.67.
4. Click the Apply button. Pay dates button will appear.
5. Click the Pay dates button. Use the calendar to select the dates on which payments will need to be taken.
- You might want to accept the dates offered by the program or select different dates. All the selected dates can be unselected with one click (use the Reset to empty button). To select a pay date, click on the appropriate date in the calendar. The date will be highlighted. To unselect a date, click on it once again. You will be able to return to the first variant offered by the program at any time by clicking on Reset to... (your pay period) button. As soon as you are satisfied with your payment schedule, click the Update button.
To delete a recurring billing plan:
- Find the product whose recurring billing plan you want to delete. Open this product for modification in the 'Product Management' section.
- Click the Subscriptions link in the 'Product Management' section menu. 'Subscription' dialog box will be opened.
- Click the Delete button at the bottom of the 'Subscription' dialog box. The dialog box fields should be cleared.