Luminance RED, a leading provider of LED light therapy medical devices, decided to implement a subscription model that allows customers to use their devices without any upfront costs. Instead, customers subscribe to the products, which ensures steady revenue for the company and continuous support for customers during their treatment process.
Table of contents
Subscriptions in Shopify
As Shopify continues to evolve, store owners are seeking innovative ways to enhance customer value, loyalty, and regular revenue streams.
If you own a store, you might see the potential in a similar approach. Introducing a subscription model not only allows for better revenue forecasting but also helps in building deeper and long-lasting relationships with customers. With this solution, customers do not make a one-time purchase; instead, they engage in a relationship that ensures regular interactions and greater brand loyalty.
Although implementing subscriptions in Shopify might seem challenging, it can actually be done in a way that is convenient for both you and your customers.
Project objective
The primary objective of our project was to implement a scalable and reliable subscription model in Shopify that would be easy for customers to use and manageable for Luminance RED. A key component of this project was enhancing the subscription cancellation functionality and integrating with the Recharge platform, which enables automatic processing of subscription payments.
Key Achievements:
- Enhancement of Recharge System: We expanded the Recharge system to include subscription cancellation functionality based on specific requirements.
- Real-Time Notification System: Implemented a real-time notification system that informs customers about potential charges for early subscription termination.
- Automation of Subscription Management: Automated the process of managing subscriptions and fees using middleware that intercepted payment data and customer requests.
Enhancement of Subscription Cancellation Functionality in Shopify
As part of the project, we extended Shopify’s subscription functionality with a custom solution that allows for the imposition of additional fees on customers for early subscription cancellations. To achieve this, we developed middleware between Shopify and Recharge.
Scope of work – Middleware and integration with Recharge
The core tool of our project was middleware that acted as an intermediary between the Shopify subscription platform and the Recharge payment system. The main tasks of the middleware included:
- Capturing webhooks from the Recharge system to monitor payment statuses.
- Handling customer requests—including subscription cancellations and order modifications.
- Transmitting secure data to Recharge for processing payments and applying any early termination fees for subscriptions.
Integration with the Recharge API enabled automatic payment processing and provided customers with real-time information about their subscription status and potential costs.
Subscription cancellation – process illustration
The subscription cancellation process in the solution developed for Luminance RED was designed to ensure transparency and ease of understanding for customers, as well as maximum automation for store administrators.
The general process leading to a subscription cancellation can be outlined as follows:
- The customer decides to cancel their subscription.
- They log into their customer account to initiate the cancellation.
- The customer clicks on “Cancel Subscription.”
- A request is sent to our middleware to check if the customer can cancel without an additional fee.
- A popup appears, informing the customer that an additional fee will be charged if they proceed with the cancellation.
- The customer accepts the additional fee, and the fee is then processed.
By integrating this seamless process, we’ve ensured that customers are fully informed about any potential charges associated with canceling their subscriptions, while also automating the administrative tasks for the store.
Detailed subscription cancellation process
Submitting a subscription cancellation request in Shopify
The customer initiates the subscription cancellation process via the order details in their customer account. After clicking the “Cancel Subscription” button, an additional popup appears requesting the reason for canceling the subscription.
Notifying the customer about cancellation fees
After clicking the “Next” button, a new message appears informing the customer about potential fees for early termination of the subscription. These fees depend on the number of completed payment cycles.
This is an optional but recommended step that ensures full transparency and allows the customer to make an informed decision.
Processing the cancellation
If the customer decides to proceed with the cancellation, the middleware processes this request on the server to ensure security and consistency of operations. Cancellation information is automatically sent to the Recharge system via a webhook.
The middleware not only manages the cancellation process itself but also processes all operations on the server, ensuring full data security and proper synchronization between platforms.
Calculating the additional fee for early subscription cancellation
The middleware automatically calculates the appropriate fee for early termination of the subscription based on the number of completed cycles.
If the customer cancels before completing six cycles, fees are applied according to the following schedule:
- $249 if cancellation occurs after fewer than two cycles.
- $199 if cancellation occurs after fewer than four cycles.
- $149 if cancellation occurs after fewer than six cycles.
Additionally, customers had the option to return the device within 30 days of purchase, which involved a restocking fee of $49. This model allowed Luminance RED to ensure business continuity while maintaining flexibility for customers.
Transferring the fee to Recharge
After calculating the fee, the middleware automatically transfers the data to the Recharge system, which charges the fee directly from the customer’s account. This is a key step in automating the cancellation process, eliminating the need for manual payment management.
Additional technical requirements
- Access to the Recharge application environment to test all cancellation scenarios.
- API keys from the Recharge system, enabling request authorization and webhook configuration.
- A fully configured test environment that allows verifying the system’s operation, especially in the context of calculating fees for early subscription termination.
Technologies and resources
Building the subscription solution for Luminance RED was based on several key technologies and resources that ensured the system’s stability, flexibility, and scalability. Below is a more detailed description of each element that played a crucial role in the project.
Choosing a server for the Middleware
Selecting the infrastructure on which the middleware was hosted was significant because we needed to ensure both reliability and system flexibility. We opted for cloud solutions like Google Cloud, which offered several key advantages:
- Scalability: Enabling easy scaling of the system as the number of subscribers grows. As the customer base expands, the infrastructure can dynamically adjust resources, eliminating the risk of downtime and performance limitations.
- Flexibility: The ability to quickly implement changes and adapt to new business requirements. It’s easy to extend or modify the configuration without interfering with physical servers.
- Security: Assurance of advanced data protection measures, which is crucial when processing sensitive data like customer payments and subscriptions.
As a result, the middleware could operate efficiently and uninterrupted, providing the ability to grow as demand for Luminance RED’s services increased.
PHP as the primary programming language for the Middleware
The middleware solution was built using PHP, providing smooth integration with the Recharge API and efficient system processing of subscriptions. Choosing PHP had several key advantages:
- API Integration: PHP is well-suited for working with various APIs, allowing for easy and effective integration with the Recharge API in our case. This enabled the middleware to seamlessly communicate with the payment system, transmit payment data, handle cancellations, and manage webhooks.
- Processing Speed: PHP allows for fast processing of customer requests, which is crucial when managing subscriptions in real-time. Customers had immediate access to information about their subscriptions, and the system responded instantly to any changes.
- Community and Support: As a popular programming language, PHP boasts a large community and broad technical support. This made it easier to find ready-made solutions and tools that accelerated the middleware’s implementation.
Recharge API Documentation
The Recharge API documentation was a key element in the integration process. We used it to thoroughly understand how the subscription payment system works and how we could automate subscription management processes and fee calculations. Key aspects of the integration included:
Recharge webhooks
The Recharge API provided webhooks that automatically notified the middleware about events related to subscriptions (such as payments, cancellations, or subscription changes). This was foundational for automating the entire system and eliminating manual operations.
Secure transmission of transaction data
Using the Recharge API documentation, we ensured that all data was transmitted securely and followed best practices in financial data security.
Fee structure
Integration with Recharge enabled automatic calculation of fees for early subscription cancellation. Based on the number of completed payment cycles, the middleware automatically calculated the due fees and transferred them to Recharge, simplifying the process for both the company and the customers.
Thanks to these technologies, we created a solution that operated reliably, automating subscription management in Shopify and ensuring full transparency for Luminance RED’s customers. This approach allowed for scaling the solution as the company grew, minimizing the risk of errors and reducing the time needed for manual subscription management.
Key takeaways
By implementing this solution for Luminance RED, we demonstrated that the subscription process can be simplified while ensuring full flexibility and automation.
Automation of key processes
Middleware integrated with a payment system like Recharge significantly simplified the customer’s process of managing subscriptions and extended functionality with custom integration related to charging additional fees for early cancellations, providing full control over payments and cancellations.
Transaction transparency and customer trust
Implementing notifications and automatic calculations of fees for subscription cancellation ensures that customers always know what to expect, building trust.
Creating a subscription model for Luminance RED allowed us to showcase that these processes can be simple, effective, and beneficial for both the business and its customers. By leveraging modern technologies, we managed to create a system that operates smoothly and is easy to manage while providing the company with stable and recurring revenue.
Benefits of implementing a subscription model in your Shopify store
Implementing a solution based on integration with middleware and the Recharge system offers:
- Automation of subscription processes and elimination of human errors.
- Recurring revenue and financial stability.
- Scalability of the system, which can grow with your business.
- Building customer loyalty through transparency and simplicity in managing subscriptions.
- Reducing administrative workload and the need for manual management of cancellations and fees.
This solution combines technological advantages with customer needs while supporting the long-term growth of your business.