Magento 2 Recurring Payment Subscription: This module provides the functionality to manage subscription & recurring payment for the products of the admin.
Apart from that, it allows the customers to make a subscription for the allowed products on a daily, weekly, Monthly & Yearly basis.
Check the plugin’s configuration part –
Check the plugin’s customer workflow part –
Magento 2 Recurring Payment Features
- The merchant can enable/disable the Recurring Payment.
- The admin can manage PayPal Recurring payment.
- Also, the owner can view/unsubscribe customer subscriptions.
- Moreover, customers can view/unsubscribe to their subscriptions.
- Additionally, it supports online recurring payments with PayPal.
- Additionally, this module supports online Stripe recurring payments.
- Even it supports offline recurring payments too
- Further merchants can add more than one subscription product.
- As well as the owner can select the subscription price scope as global or website wise.
- Furthermore, the admin sets the subscription amount & subscription initial fee product-wise.
- This extension supports simple, configurable, virtual, and downloadable product types.
- Then, the merchant can manage the duration type.
Magento 2 Recurring Payment Installation
Now, follow the below steps for installing the Magento 2 Recurring Payment extension –
first of all, Unzip the respective extension zip and then move the “app” folder (inside “src” folder) into the Magento root directory on the server.
After that, run the below-mentioned commands in the Magento 2 root directory via terminal.
First command –composer require stripe/stripe-php:~7.40
Second Command -composer require paypal/rest-api-sdk-php:*
Third Command -php bin/magento setup:upgrade
Fourth Command – php bin/magento setup:di:compile
Fifth Command – php bin/magento setup:static-content:deploy
How to Get PayPal & Stripe Credentials?
Set Webhook in Stripe for Webkul Recurring Payments
In web development, a webhook is a method of altering the behavior of a web page, or web application, with custom callbacks.
Webhooks are basically user-defined HTTP callbacks that are triggered by specific events.
Now for setting up the Webhook in Stripe, follow the steps listed below-
Step1: Login to Stripe Account
Step 2 –
- ‘View Test Data'(as per your need), and
- Tick on ‘Developers’ thence
- Go on ‘Webhook’.
Step 3 –
Here, Add Endpoint.
Fill the details as shown in the screenshot and save details.
Go to the ‘Send Test Webhook’ to check the given URL is working or not.
Now you can easily send a test event to a webhook endpoint, by selecting the specific event type & by clicking on the Send test Webhook button.
Magento 2 Recurring Payment Configuration – Admin
Magento 2 Recurring Payment and Subscription
After the successful installation of the extension, the admin will configure the module settings. To do so, the admin will navigate through Stores->Configuration->Webkul->Subscription Configuration.
Here, the admin will be able to –
- Enable the functionality by selecting a Yes option else to select a NO for Disabling the functionality.
- Select the Subscription Price Scope – Select the scope for using the extension as Global or Website wise.
- Enable Discount on Subscriptions: Select a Yes to apply discounts on subscriptions, it is valid only on the first order else select a No.
- Allow Multiple Subscriptions in Cart: Select a Yes multiple subscription products can be added to the cart at a time. If their “Start Date and Duration types” are the same.
- Allowed Payment Methods to Buy Subscription: Here, choose the payment methods that will be available to customers for buying the subscription product.
Configuration – Recurring PayPal Payment Method
Thereafter, the admin needs to navigate through Stores->Configuration->Sales->Payment Methods->Webkul Recurring PayPal Express Checkout Payment Method.
Here, the admin will configure the settings for the payment method as shown below in the snapshot.
Here, the admin will –
- Enable this solution for making it available for use at the frontend.
- Sandbox Mode
Select Yes to enable the testing mode else select No to make use of the Live mode.
Set the Title for the Payment method which is visible to the customers at the checkout page.
- Merchant PayPal ID
Enter your Merchant PayPal Id within the space provided.
- PayPal API User Name
Enter your PayPal User Name.
- PayPal API Password
Enter your PayPal password.
- PayPal API Signature
Enter your PayPal Signature
- Payment Form Applicable Countries
Select All to allow payment from all the countries else selects Specific Countries.
- Payment From Specific Countries
Select the specific countries from where you want to receive the payments.
- Sort Order
Set the sort order for this payment method at the checkout time.
Configuration – Recurring Stripe Payment Method
The admin will be able to configure recurring stripe payment method by navigating through Stores->Configuration->Sales->Payment Methods->Webkul Recurring Stripe Payment Method likewise shown in the image below:
Here, the admin will-
Enable this Solution: Select Yes to enable this payment method else to select No to disable this payment method.
Title: Set the Title for the Payment method which is visible to the customers at the checkout page.
Sandbox Mode: Select Yes to enable the testing mode else select No to make use of the Live mode.
API Publishable Key: Enter your Stripe API publishable key.
API Secret Key: Enter your Stripe API secret key.
Set Name Display on Form: Set the Name for the Payment method which is visible to the customers at the form while entering the card details.
Payment from Applicable Countries: Select the specific countries from where you want to receive the payments
Minimum Order Total: Here, the admin needs to enter the minimum amount allowed by stripe.
Sort Order: Set the sort order for this payment method at the checkout time.
Recurring Payments – Admin
The admin will have the Recurring section in the admin backend panel thenceforward the successful installation of the Magento2 Recurring Payment Subscription extension. Merchnat should have CRM Extension to retain customers.
Here the admin has two sub-sections to manage:
Manage Duration Type
Under here, the admin will be able to create the subscription duration.
To create a new duration type, tap the Add Duration Type button. You can create the duration type as – daily, weekly, Monthly & Yearly basis.
Also, after you have created a subscription duration, no other same duration type can again be created. If you try creating one, you will get an error message as shown below in the snapshot.
- Manage Subscriptions
Under this section, the admin will find all the recurring subscriptions listed.
To view a subscription detail, tap the View link and you will be able to see the subscription information for that particular subscription.
Under the Orders section, the admin can see the recurring payment details for the particular customer.
Here, the admin can also cancel the customer subscriptions by selecting the subscription first and then from the Actions drop-down option select the Unsubscribe option as shown below in the snapshot.
After this, the admin can see a pop-up for Unsubscribing the selected Subscription, click Ok to confirm.
After this, the admin will see a confirmation message for the same.
How To Create a Subscription Product?
Note – This extension supports simple, configurable, virtual, and downloadable product types.
To create a subscription product you need to navigate to the Catalog section and open any already created or new product. After that, go to the Subscription Configuration section for the product.
Here, set the Subscription option to Yes. After that, you will have to click the Edit Configuration button to add the subscription duration to this product.
This brings up the below section to choose the duration type for the product. Here, you need to check the subscription duration types to set for this product, enter the Subscription Title, Description(for a visible understanding), set an Initial Fee, and the subscription Charges applicable for the different chosen duration types.
Lastly, click the Save button at the top to save the configuration settings.
Magento 2 Recurring Payment Subscription advances the website front, the customer will see a Login to Continue button.
After clicking the Login To Subscribe button, the user needs to login to his account on the website. And after which the customer can see the Subscribe button as shown below in the snapshot.
Tapping the Subscribe button will bring up the section to select any of the listed subscription plans. The customer can choose a plan that suits him best.
Here, the customer can see the details of the plan like – Name, description, Start Date, Initial Fee, Subscription Charges and a Subscribe Now button.
The customer has to select the start date for the subscription plan. Then click on the Subscribe Now button to proceed further.
This adds the product to the cart. You can also check the subscription details in the cart by scrolling.
Customers can add more than one subscription product.
Note: The date and duration type will be the same.
If the date and duration type will not be the same, it shows like the below image.
Click the Proceed to Checkout button to proceed to the checkout.
Now, select your shipping address, shipping method and tap the Next button.
Under the payment section, the customer can select to either to go with the Check/Money Order(offline method for purchasing the subscription).
Or PayPal Recurring Payment(Online Payment) method or Stripe Recurring Payment(Online Payment).
PayPal Recurring Payment:
Post this, click the Place Order button.
Post the above step, the customer is redirected to the PayPal login. The customer has to login to his PayPal account.
Post that, select Accept and Continue to complete the payment for this particular order.
Stripe Recurring Payment:
Now the customers can also able to view the Stripe Recurring Payment method under the payment section. Post this, click the Pay With New Card button.
Tapping to Pay With New Card button, the customer is redirected to the Stripe login. The customer has to login to his Stripe account.
And then, select Accept and Continue to complete the payment for this particular order.
Note: Stripe recurring payment method only shows over the payment page if the subscription is selected from the current date.
Lastly, the customer can see the placed order details. Hence for more details check the below given snapshot.
Forthwith, to check the subscription details, the customer can navigate to My Subscription section. This sections is under the account panel as shown below in the snapshot.
Here, the customers can see the overview of the subscriptions they have subscribed to and can view/Unsubscribe the subscription as well.
To view the subscription, tap the view button and you can see the details of the particular subscription.
Now, The customers also have an option to unsubscribe to the opted subscriptions.
Afterward to do so, the customer will tap on the Unsubscribe button and that brings up a pop-up confirmation for the same.
Thereupon tap the OK button to confirm the unsubscribe.
Next tapping the OK button you can see that the subscription is unsubscribed.
Current Product Version - 4.0.0
Supported Framework Version - Magento 2.0.x, 2.1.x, 2.2.x,2.3.x, 2.4.x