View Product Page

Coupons

The plugin allows you to create new types of coupons:

  • Subscription sign-up discount: discount on sign-up fee (if any). The coupon can either remove a fixed price or a percentage of the sign-up fee.
  • Subscription recurring discount: discount on the subscription periodic fee. The coupon can either remove a fixed price or a percentage of each periodic fee.

Coupons can be configured in Marketing > Coupons, as well as for any WooCommerce default coupon.

Subscription coupons

When creating a coupon for the periodic fee, a new field will show in which you can choose whether to apply the discount on All recurring payments or only the first x payments. When selecting the second option, you must enter a value to specify the number of recurring payments to which the discount will apply.

Set recurring limit per coupon

This option can be useful also in case you want to offer special pricing on your subscriptions.

Let’s make an example. We want to offer the user three levels of payments for a subscription until reaching the regular price:

  • €9,99 at the order creation
  • €19,99 for the first recurring payment
  • €29,99 for the following recurring fees

We have created a monthly subscription at €29,99/month, with a one-month trial and a sign-up fee of €9,99.

Example of subscription with coupon

Then we have created a recurring fixed coupon (€10) that will apply to one recurring payment.

Coupon example

When the user purchases the subscription, only the sign-up fee will be paid. The first month will be free due to the trial period and the first renewal will be discounted by €10. The regular price of €29,99 will be paid starting from the second renewal.

Cart with coupon sample

The discount applies directly during the purchase process. On the contrary, if the subscription includes a trial period or provides a synchronized payment date, the coupon will apply to the first renewal.

Apply coupons to an active subscription

If you want to offer a coupon to your customers with an active subscription, go to the subscription edit page and click on Apply coupon.

Apply coupons to active subscriptions

Enter the coupon code in the field as shown in the image above.

Click on OK and the discount will apply automatically to the next renewal(s), based on the coupon settings.

Coupon code applied to the active subscription

Please note – coupons can be applied to active subscriptions only if they are editable. For example, subscriptions paid with PayPal standard can’t be edited, hence, it isn’t possible to apply any coupon.

Upgrade and downgrade

The switch between one subscription and another, can only take place between variations of the same product.

There are 3 options with regards to a possible switch:

  • Never: Never upgrade nor downgrade.
  • Yes, only to a variation with a lower priority: When switching from a higher level to a lower one, from priority 2 to priority 1 is a downgrade.
  • Yes, without limits: When switching to any level.

When talking about levels, we refer to ‘variations priority‘.

upgrade downgrade switch

You decide within the specific variation if it is possible to upgrade/downgrade to this variation (not from).

You can decide to charge the full signup fee, only the difference or no sing up fee at all.

Charge signup fee

Finally, you can manage how to prorate the recurring payments by choosing one of the following options:

  • No, never
  • Yes, but only for upgrades
  • Yes, but only for downgrades
  • Yes, for all plan changes
Prorate options

For more details about Prorate please refer to → No prorate or → Prorate posts.

How does it look on the frontend?

If you enable the option and allow your customers to change plans (whether it is for an upgrade or a downgrade) they will be able to change the plan from the plan details in “My Account” page, as shown in the screenshot below.

Subscription switch

You can also customize the labels of these links from the Customization options, as explained here.

No Prorate

The payment date of the next payment of the old subscription remains unchanged.

Customer has credits

Customer is on credit when the amount of money paid for the ‘old’ subscription, is bigger than the amount that has to be paid for the ‘new’ subscription.

The switch takes place and the user will not get charged. The first payment of the ‘new’ subscription will take place when the ‘old’ subscription expires.

Customer in debt

Customer is in debt when the amount of money paid for the ‘old’ subscription, does not cover the amount of the ‘new’ subscription.

The switch takes place and the recurring payment of the ‘new’ subscription will take place when the ‘old’ one expires.

The customer will pay the difference between the two subscriptions calculated based on the payment due date.

Example

Monthly subscription purchased on June 2, € 20 / month (€ 0,67 / day).
On June 18 the user decides to switch to a weekly subscription of € 15 / week (2,14 / day).

The user did not use 14 days of the ‘old’ subscription and since the deadline cannot be changed, the customer will have to pay (based on days):
(2,14 – 0,66) * 14 days = € 20.72

The next recurring payment date will remain set for July 2nd and will continue weekly.

Prorate

The date for the next payment is based on if the customer has credits or is in debt.

Customer has credits

The customer is on credit when the amount of money paid for the ‘old’ subscription, is bigger than the amount that has to be paid for the ‘new’ subscription.

The switch takes place and the recurring payment of the ‘new’subscription will be extended. The number of days of extension is based on the credit value.

Example 1

On 6 July a user subscribes to a monthly subscription of € 20 / month (€ 0,67 / day). That same day he decides to switch to the weekly subscription of € 15 (€ 2,14 / day).

Dowgrade-upgrade

The user therefore did not take advantage of 29 days of the monthly subscription which was € 0,67 per day, meaning he has 29 days * € 0,67 = € 19,43 on credit.

subscription switch

Since the ‘new’ subscription costs € 15 / week, the user does not have to pay anything at the time of the switch, and the next payment date will be in 2 days  (19,43 – 15) / 2,14 ~ 2 days, on 8 July.

Example 2

A user subscribes to a monthly subscription of € 20 / month (€ 0,67 / day). After 15 days he decides to switch to the weekly subscription of € 15 / week (€ 2,14 / day).

The user did not take advantage of 15 days of the monthly subscription which costs € 0,66 per day, therefore the user has a credit of € 15 * € 0,67 = € 10,05.

The ‘new’ subscription costs € 15. At the time of the switch he will pay the sum of: € 15 – € 10,5 = € 4,95 and will renew at full price after a week.

Customer in debt

He will pay the difference in price and the ‘new’ recurring fee, on the expiration date of the new subscription.

User side

Subscription options for users on their My account page:

Endpoint

In the ‘My account’ page, users can find the complete list of their subscriptions. The plugin will automatically create a ‘Subscriptions’ endpoint.

Subscriptions endpoint

Click on the subscription name to see the details of a subscription.

Subscription details

Pause the plan

An active subscription can be paused if that option is enabled in either the general settings or product page. In order to pause, users need to access the detail page of the subscription and click on the “Pause” option.

pauze subscription

Users will be free to pause the subscription only if they have not reached the allowed number of times they can perform this operation. If users don’t reactivate the subscription manually, the subscription will reactivate automatically after the number of days set by the admin.  

Pause options

They will be warned about any restrictions when they click on the “Pause” button.

Then, when their plan is paused, they will be able to see a “Resume” button to resume the subscription.

Paused subscription

Cancel the plan

You can set the option for the users to allow them to cancel the subscription themselves. If that option is enabled in the product edit page.

Cancel options

The customer will see either a button or a dropdown to cancel the subscription, in their “My Account” page.

Cancel subscription

Pay the recurring amount

The detail page of the subscription shows the date in which the new payment of the subscription is due.

next billing

If users have chosen eg. PayPal or any of the other supported payment gateways, the payment will go through automatically. If they have chosen for another payment method, a new order will be created one day before payment due date.  Clicking on the “Pay” button the user can complete the payment.

my account pay button

Resubscribe to the plan

When the subscription is cancelled or expired, users can purchase the subscription again by clicking on the “Resubscribe” button. They will not have to pay the sign-up fee again and there will be no free trial period.

my account resubscribe button

Admin can decide if the resubscribe price will be the same as the old subscription price, or if the price will change to its current value. To change this go to YITH > Subscription > Customization > Subscription section in my account.

resubscribe option

Edit subscription billing and shipping address

If users need to update or simply change the billing or shipping address they can change it from the usual Addresses entry in My Account menu.

Yet, if they have more than one subscription, they can edit the address once and have it updated on all active subscriptions in one move. Checking the option Update this address also for my active subscriptions and saving will do the job.

Change billing

All future renewal orders will use the updated address.

Force payment manually

Whenever the first payment does not go through on the first payment attempt, your users might have to wait for a few days before the second attempt is made and their subscription can be re-activated.

Don’t make them get angry or nervous and allow them to force the payment right from My Account page.

If you are either using YITH Stripe Connect or YITH Account Funds for WooCommerce, your users will be able to see a button named Renew Now next to the suspended subscription plan.

my account renew now

To enable this feature, go to YITH > Subscription > Customization and check the option called Show the Renew Now button on My Account > Orders.

Renew option

Please, note: the button only appears after the first payment attempt fails and under My Account > Orders. Moreover, it is only available if you are either using YITH Stripe Connect or YITH Account Funds.

Emails

The plugin will automatically send an email to users and/or to the shop admin when certain conditions are met. Email settings can be managed from WooCommerce > Settings > Emails.

Besides the default emails, you will also find the emails generated by the plugin.

Emails
  • Subscription status: Sent to admin to inform about a status change in subscriptions (user paused/resumed etc).
  • Subscription cancelled: Sent to users when a subscription is cancelled.
  • Subscription suspended: Sent to users when subscription switches to ‘suspended’.
  • Subscription expired: Sent to users when the subscription is expired.
  • Subscription is going to expire: Sent to users 1 day before subscription expires.
  • Subscription paused: Sent to users when a subscription is paused.
  • Subscription resumed: Sent to users when a subscription is resumed.
  • Subscription payment request: Sent to users when payment has not been received within periodic payment expiration date.
  • Subscription renew reminder: Sent as a reminder for the next payment a certain number of days before the due date (default 15 days).
  • Subscription payment made: Sent to users when shop admin receives payment.
  • Subscription payment failed: Sent to users whenever a payment attempt fails.
  • Subscription Delivery Schedules: sent to users whenever a scheduled delivery is set to shipped.

The admin can decide if he wants to receive a copy of each email. Click on the email you wish to receive a copy of, and enable ‘Send to admin?’.

copy email admin

REST API

From version 2.4, YITH Subscription supports REST API.

Requirements

It is essential to enable WordPress permalinks in Settings > Permalinks.

How to generate API keys

The WooCommerce REST API works on a key system to control access. These keys are linked to WordPress users on your website.

REST API key

To create or manage keys for a specific WordPress user:

  1. Go to: WooCommerce > Settings > Advanced > REST API.
  2. Select Add Key. You will be redirected to the Key Details screen.
API key details

3. Add a Description.
4. Select the User you would like to generate a key for in the dropdown.
5. Select a level of access for this API key — Read access, Write access or Read/Write access.
6. Select Generate API Key, and WooCommerce will create API keys for that user.
 

Now that keys have been generated, you should see Consumer Key and Consumer Secret, a QRCode, and a Revoke API Key button.

REST API key generated

The Consumer Key and Consumer Secret may be entered in the application using the WooCommerce API, and the app should also request your URL.

You can find the REST API documentation at https://docs.yithemes.com/yith-woocommerce-subscription-rest-api/

Webhook

A Webhook is an event notification sent to an URL of your choice. Users can configure them to trigger events on one site to invoke behavior on another.

Webhooks are useful for integrations with third-party services and other external APIs that support them.

How to create webhooks

To create a new webhook:
1. go to WooCommerce > Settings > Advanced > Webhooks.

Note: Webhooks were formerly found under WooCommerce > Settings > API before WooCommerce 3.4.

2. Select Create a new webhook (first incident) or Add webhook. The Webhook Databox will show.

WooCommerce webhooks

3. Set the following:

  • Name: The name is auto-generated as “Webhook created on [date and time of creation]” as a standard to simplify its creation. Change the name to something else.
  • Status: Set to Active (delivers payload), Paused (does not deliver), or Disabled (does not deliver due to delivery failures).
  • Topic: Choose when the webhook should be triggered from

– subscription created
– subscription updated
– subscription deleted
– subscription restored

Webhook topic

  • Delivery URL: URL where the webhook payload is delivered.
  • Secret: The Secret Key generates a hash of the delivered webhook and is provided in the request headers. This defaults to the current API user’s consumer secret if nothing is entered.

4. Save Webhook.

Blocks

The plugin is ready to use with the block editor. With one click, you can add the YITH block to your page.

Gutenberg block

You can customize it the way you want to by using the many options it offers.

edit gutenberg fields

Change colors, add shadows, links, images, CSS etc.

Gutenberg frontend view

YITH WooCommerce Account Funds

The integration with  YITH WooCommerce Account Funds, lets the customers pay with their Funds, also renew orders can be payed with Funds. After the installation the payment method YITH Funds must be enabled from WooCommerce > Settings > Payments.

Integration with YITH Account Funds

You will be able to perform the following actions on your subscriptions:

  • cancel: both the admin and the customers can cancel a subscription.
  • pause: both the admin and the customers can pause a subscription.
  • add multiple subscriptions to the same cart: any user will be able to add more than one subscription to the same cart and pay with credit card.
  • edit details of ongoing subscriptions: billing cycle, price, billing date, expiry date, subscription recurring amount.
Edit subscription details

You will be able to edit the following subscription information:

Recurring period: you can change the duration of the billing cycle and change it to a given number of days, weeks, months or years.

Start date: you can change the start date of the subscription. A note in the subscription details will keep track of this action. You will see a note with the following text: The start date has been changed from xx/xx/xxxx to xx/xx/xxxx.

Payment due date: change here the date of the next payment. The customer will automatically be charged on the new date you’ve set. A note in the subscription details will keep track of this action.

Expired date: you can change here the subscription expiry date here. Remove the date if you want the subscription to NEVER expire.
Please, note that if the subscription is already expired, changing the expiry date here will not re-activate the subscription, you will have to change it from the subscription Actions box on the right. Read more about this here.

You will also be able to edit the price of the recurring fee:

Edit subscription price