Reading list Switch to dark mode

    Magento 2 Recurring Payments and Subscriptions

    Updated 25 September 2023

    Introduction

    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 – 

    CW4_mzvK640

    Check the plugin’s customer workflow part – 

    r5QRXswmsnc

    Recurring Payment for Magento 2 (Adobe Commerce) 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.
    • The admin can allow customers to cancel and hold the subscription.
    • The admin can manage the subscription labels.
    • The admin can send an Email notification for subscription status.
    • The admin can add subscription cancellation reasons for customers.
    • The admin can add the terms for the child products of the configurable product.
    • Admin can check the subscription reports: Subscription revenue, active subscriptions, new subscriptions, subscriptions average, and churn rate.

      Searching for an experienced
      Magento 2 Company ?
      Read More
    • Customers can choose the subscription cancellation reason to cancel the subscription.

    • Customers can check the recent transactions related to subscriptions.   

    Magento 2 Recurring Payment Installation

    Now, follow the below steps for installing the Magento 2 Recurring Payment extension –

    Step 1:

    first of all, Unzip the respective extension zip and then move the “app” folder (inside “src” folder) into the Magento (Adobe Commerce) root directory on the server.

    magento 2 recurring payments installation

    Step 2:

    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?

    PayPal Credentials

    Now, Log in to PayPal business account and navigate through “Payment Setup”->

    On your website”-> “continue” button.

    screencapture-paypal-activation

    Then, tap on “Option A” to select a third party e-commerce solution where the PayPal payment process is built-in.

    after that, in Option A tap on the “Get your API Credentials” link.

    paypal-activation-businessSetup2-2

    Post this, click on the “Manage API Credentials” button to see API Credentials.

    businessmanage-credentials-apiAccess

    Now here, you can see your API Username, API Password, and Signature.

    API-Signature-1

    Stripe Credentials

    To get the API Keys you can use the link- https://dashboard.stripe.com/login.

    You have to Log in/Sign up your account and you will get your API Keys.

    As you can see in the following screenshot the keys are there for the Test and live environmentsPublishable Key and the Secret Key.

    stripe acc

    Setting Up IPN Notifications on PayPal

    Setting Up IPN Notifications on PayPal

    The following method defines how to specify and activate the URL for your IPN listener in your PayPal profile.

    Your listener must be located at the URL that you specify in the profile.

    Before you activate your listener on PayPal, you should test the listener using the IPN simulator in the sandbox.

    The steps to set up your listener for Sandbox testing and to set up your listener for live operation on PayPal are the same.

    The only difference is that you log into the sandbox to set up your listener for Sandbox testing and you log into PayPal to set up your listener for live operation.

    Note: 

    Sandbox testing goes beyond simply using the IPN simulator. The IPN simulator only sends IPN messages to a listener; it does not perform the complete operation; for example, it does not complete a transaction.

    Sandbox testing involves performing the same actions in the sandbox as you expect to be performed when the listener goes live.

    Post that you log in, follow these instructions to set up your listener:

    1. Log in to your PayPal business account at www.paypal.com.
    2. Click the settings icon at the top of your PayPal account page and then click Account Settings.
    3. On the Notifications page, click the Update link for the Instant payment notifications item.
    4. Click Choose IPN Settings to specify your listener’s URL and activate the listener. The following page opens:
    5. Specify the URL for your listener in the Notification URL field.
    6. Click Receive IPN messages (Enabled) to enable your listener.
    7. Click Save. The following page opens:

    You can return to the Instant Payment Notification page to modify your notification URL, disable your listener, or turn off IPN.

    Note: 

    IPN Url to be set: [magento-url]/recurring/paypal/notify

    The IPN message is always sent to your notification URL unless you have disabled the preference to receive IPN messages.

    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

    webkul-magento2-recurring-subscription-login

    Step 2

    • ‘View Test Data'(as per your need), and
    • Tick on ‘Developers’ thence
    • Go on ‘Webhook’. 
    webkul-magento2-recurring-subscription-webhook

    Step 3

    Here, Add Endpoint.

    webkul-magento2-recurring-subscription-add-point

    Step 4:

    Fill the details as shown in the screenshot and save details.

    webkul-magento2-recurring-subscription-step-4

    Step 5:

    Go to the ‘Send Test Webhook’ to check the given URL is working or not.

    Magento2 Recurring Payment Subscription - Dashboard – Whosthechef – Stripe Test

    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.

    Magento2 Recurring Payment Subscription - Dashboard – Whosthechef – Stripe Test

    Magento 2 Recurring Payment Configuration – Admin

    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.

    General Settings

    Here, the admin will be able to –

    • Enable the functionality by selecting a Yes option 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.
    Screenshot-30-2

    Manage Customer Control Settings

    • Allow Customer to Cancel Subscription: Now the admin can allow their customer to cancel a subscription by enabling this feature.
    • Allow Customer to hold Subscription: The admin can allow their customer to hold subscriptions by enabling this.
    • Allow Customers to Subscribe multiple times for the same product: Now the admin can allow their customer to subscribe multiple times for the same products.
    Screenshot-31-2

    Manage Subscription Labels

    • Label for Without Subscription: The admin can type the name visible on the product page for purchasing without a Subscription.
    • Label for With Subscription: The admin can type the name visible on the product page for purchasing with Subscription.
    • Subscriptions Information Message: The admin can define information messages regarding the subscription.
    Screenshot-32-1

    User Email Reminder and Notification Settings

    • Send Email on Subscription Status: The admin can select subscription status and send an email notification to the customer.
    • Send Email Copy To: Here the admin can enter their preference email ID to send a copy of the mail.
    • Send Expiry and Renewal reminder mail days: The admin can set a reminder email days before to send expiry and renewal reminders.
    Screenshot-33

    Cancellation Reason for Customers

    • Add Cancellation Reasons for Customers: Here the admin can add and ask the reason for the cancellation subscription from the customer.

    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.

    Magento2 Recurring Payment Subscription_paypal_payment_configuration-1

    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.
    • Title
      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:

    Magento2 Recurring Payment Subscription_stripe_payment_configuration-1

    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. Merchant should have CRM Extension to retain customers.

    Screenshot-3-3

    Here the admin has three sub-sections to manage:

    Manage Duration Type

    • Here the admin can view and manage the duration type and add new duration by clicking on “Add Duration Type”.
    magento234.webkul.com_m2468_pub_admin_recurring_duration_index_key_8139a8edf86b4a2629bd5005ef7c46ef6a392fd4f6c365341dd64c4277e62d0d_

    After clicking “New Duration Type” here the admin needs to fill and select for creation of new duration type.

    • Status: Here the admin can enable or disable duration.
    • Duration Title: The admin can enter the duration title.
    • Duration Type: Here the admin can select the subscription duration type such as Day, Week, Month, and Year.
    • Duration (Billing Cycle): The number of duration after which a subscriber is billed. For example, if the duration type is DAY with a duration of 2, the subscription is billed once every two days.
    •  Sort Order: Here the admin can enter the sort order.
    • Initial Fees: Set “Yes” if you charge the initial fee to the customer. It will only deducted at the time of the first purchase of the subscription.
    Screenshot-8-5

    Manage Subscriptions

    • Under this section, the admin will find all the recurring subscriptions listed.
    Screenshot-6-4

    To view a subscription detail, tap the View link and you will be able to see the subscription information for that particular subscription.

    The admin can unsubscribe from the particular subscription by clicking the “Unsubscribe” button.

    Screenshot-7-5

    Under the Orders section, the admin can see the recurring payment details for the particular customer.

    Magento2 Recurring Payment Subscription - Orders for the recurring payment section

    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.

    Magento2 Recurring Payment Subscription - all-subscrition

    After this, the admin can see a pop-up for Unsubscribing the selected Subscription, click Ok to confirm.

    Magento2 Recurring Payment Subscription - unsubscribe

    After this, the admin will see a confirmation message for the same.

    Magento2 Recurring Payment Subscription - subscription unsubscribed success message

    Subscription Report

    Here the admin can check their subscription report in dashboard format, such as Subscription Revenue, Active Subscription, Average Subscription Value, and New Subscription.

    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.

    For Subscription Only Product: Set “Yes” if you want to make this product “Only” available for Subscription

    Screenshot-9-5

    This brings up the below section to choose the duration type for the product. Here, you need to check the subscription types to set for this product.

    The admin needs to choose any duration title such as weekly, monthly, and yearly. Then they need to enter initial fee and need to select discount types and the final the admin will enter subscriptions charge.

    Screenshot-10-4

    Lastly, click the Save button at the top to save the configuration settings.

    Screenshot-11-3

    Manage Subscription on Configurable Products

    Now the admin can manage subscription on configurable products the admin needs to click on “Catalog>Products>Need to click edit on configurable types of Products<Subscription Configuration>Edit Configuration”.

    Here the admin can choose configurable products and manage their subscription.

    Screenshot-13-3

    After clicking on “Edit Configuration” then admin needs to click on “Manage Subscription”.

    The admin must select a duration title, such as weekly, monthly, or yearly. Following that selection, they are required to input an initial fee and choose from various discount options. Finally, the admin will input the subscription charge.

    Screenshot-14-3

    Customer Workflow

    Magento 2 Recurring Payment Subscription advances the website front, the customer will see a Login to Continue button.

    Screenshot-16-2

    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.

    Then customer needs to click“Subscribe Now” the products after selecting thier plan, quantity and date.

    Screenshot-17-2

    Click the Proceed to Checkout button to proceed to the checkout.

    Screenshot-18-2

    Now, select your shipping address, shipping method and tap the Next button.

    Magento2 Recurring Payment Subscription_checkout_page-1

    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.

    Screenshot-19-

    Post the above step, the customer is redirected to the PayPal login. The customer has to login to his PayPal account.

    Screenshot-20-

    Post that, select Accept and Continue to complete the payment for this particular order.

    Magento2 Recurring Payment Subscription - paypal_make_payment_page

    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.

    Magento2 Recurring Payment Subscription - Stripe recurring payment method

    Tapping to Pay With New Card button, the customer is redirected to the Stripe login. The customer has to login to his Stripe account.

    Screenshot-21

    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.

    Screenshot-24-1

    Here, the customers need to click “My Subscription” then they can see the overview of the subscriptions they have subscribed to and can view/Unsubscribe the subscription as well.

    Screenshot-25

    To view the subscription, tap the view button and you can see the details of the particular subscription.

    Here the customer can hold and unsubscribe the subscription.

    Screenshot-26

    Now, The customers also have an option to unsubscribe to the opted subscriptions.

    Afterwards, to do so, the customer will tap on the Unsubscribe button that brings up a pop-up to select the reason for cancellation.

    Thereupon tap the OK button to confirm the unsubscribe.

    Screenshot-27

    Next tapping the OK button you can see that the subscription status is unsubscribed.

    Screenshot-29

    Support

    That’s all for the Recurring Payment Subscription for Magento 2 (Adobe Commerce) extension. If you have any queries or doubts get back to us at [email protected] or raise a ticket at webkul.uvdesk.com

    Explore the Adobe Commerce Cloud development service by Webkul. You may also browse other Magento 2 marketplace add-ons. Also our quality Magento 2 extensions.

    Current Product Version - 4.0.2

    Supported Framework Version - Magento 2.0.x, 2.1.x, 2.2.x,2.3.x, 2.4.x

    . . .
    Discuss on Helpdesk

    Leave a Comment

    Your email address will not be published. Required fields are marked*


    6 comments

  • Aishwarya Sharma
    Does it offer recurring billing failure follow up and retention automation?
    Recurring payment is there but need to check for follow up and retention.
    • Subhangi (Moderator)

      Hello Aishwarya,

      In the case of recurring failure, the subscription will get stopped. No retenstion//followup will be done.

      If you want to customize the module as per your business needs please write us at [email protected] with your detailed requirements.

      Thanks,

      Webkul Team.

  • Issa Fakhoury
    Dear Support Team,
    we have bought this extension and started to use it over Skype payment.
    We have an issue here is that we cant view the recurrence payments and their status on the admin panel, we only see the initial one.
    Where or how can we view these payments and their statuses to be able to take action on them.
    • Subhangi (Moderator)

      Hello There,

      If you are facing any issue realted to our module, then please email us at [email protected].

      Thanks,

      Webkul Team.

       

  • ali
    Hello,

    How to Follow up on paying subscriptions.

    Thanks

    • Subhangi (Moderator)

      Hello There,

      Please let us know your complete requirement in detail so that we can assist you accordingly.

      Currently, there is no option available for the follow-up but if you want it can be done through customization.

      Please mail us at [email protected] so that we can assist you accordingly.

      Thanks and Regards,

      Subhangi

  • Back to Top

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home

    Table of Content