Subscriptions and recurring payments

You can use the plugin to configure different subscription plans (weekly/monthly/quarterly, etc) at a product level. Your shoppers can then place orders by subscribing to the associated payment plans.

How to configure subscription and payment plans

Prerequisite: Ask Worldpay to activate recurring payments on your merchant code.

To configure subscriptions:

  1. Go to Stores/Configuration/Sales/Worldpay/Subscription Settings and set Subscriptions Enabled to Yes. The Subscription Settings screen appears:

    Subscription settings screen

  2. Go to Catalog/Products. Open a product and expand the Subscriptions section:

    Subscription settings screen

  3. Use the information in the table to set the Subscription options for this product.

ConfigurationDescription
EnabledIf set to Yes, subscription is enabled at product level.
Allow Selectable Start DateIf set to Yes, the shopper can set a start date for the subscription to begin.
Add Payment PlanClick to add payment plans for the shopper to subscribe to.
  1. Click Add Payment Plan to create a payment plan the shopper can subscribe to:

    Subscription settings screen

ConfigurationDescription
ActiveIf set to Yes, the subscription is enabled at product level.
CodeThe code retains the payment plan’s uniqueness. If the code entered is a monthly plan then the final sample code is Product ID_monthly-plan to maintain uniqueness.
DescriptionAn optional field to describe the payment plan.
Recurring CycleSelect a cycle (weekly / monthly / quarterly / semiannually / annually). Future orders and payment capture are executed based on the cycle.
Recurring AmountThe recurring amount overrides the product price if the shopper opts for subscriptions.
WebsiteThis payment plan is applicable to the whole website. (Default option.)
  1. After you create the payment plan, the plan appears in the Subscription section. To change the order of payment plans, use Magento's drag-and-drop feature.

    Subscription settings screen

Shopper journey

On the product-detail page, the shopper can select a payment plan. If the shopper selects Add a Payment Plan, all the active payment plans created under How to configure subscription and payment plans appear.

Product detail page

The product price is updated based on the selected plan and the shopper can set the subscription start date if this is enabled. The shopper can then complete the subscription after adding the product to their cart.

Plan selected

The shopper can see their subscription orders in My Account/My Subscriptions, where they can edit or cancel subscriptions and update their address.

My Subscriptions

Recurring orders

When a subscription order is placed using stored credentials/tokenization, all future orders and transactions related to that subscription are handled as recurring orders.

Shoppers cannot place a subscription order unless they select the Save Your Card option. This prompts Worldpay to create an authorization token. Magento saves this token for future recurring orders.

My Orders

To set up recurring orders:

  1. You must set up the cron job worldpay_recurring_transactions to run every 24 hours.

This cron job checks all the subscriptions whose start date or next order date are queued over the next five days. The job creates recurring orders for all the subscriptions.

Once Magento creates a recurring order, its sends an authorization request to Worldpay and, if successful, follow-up capture requests are triggered. After successful capturing/invoicing, recurring orders are fulfilled.