The subscription management space is growing - brands have come to realise the importance of recurring revenue and want to understand ways in which they can grow subscriptions revenue - after all, acquisition is expensive and the cost of acquisition will only rise in the years to comeÂ
To grow a successful recurring revenue business, it is of utmost importance that you use a system that helps you scale up / offer a wide range of experiences to your customers.
Here are some of the levers that are offered by subscriptions apps to grow a healthy recurring revenue stream / provide a good experience to customers
APIs help automate the process of passing data between 2 systems / managing data - customized to fit your specific needs/business. The goal is to simplify subscription management and give advanced experiences to both merchants and their customers.
When you go about choosing the right API a few factors should take precedence in the decision-making process
With the help of intensive APIs - one can create more number of customizations and hence build a more robust customer experience
Categories are also a proxy for understanding how strong the APIs are - the stronger the APIs, the more the use cases it can solve.
Ex: Hello Bello makes use of Loop’s API base to create a strong Customer Portal + Admin Portal.
‍
‍
Hello Bello’s Customer Portal - Built by Loop APIs - Gamified the Subscription process by offering an incentive (ex: 10% waiver offered after x orders)
Find out more about Loop flows here
Loop APIs - how does Loop serve as a great alternative to recharge APIs
Loop and Recharge APIs are two prominent players in the subscriptons space, offering developers powerful tools to integrate subscription management, streamline operations, and enhance customer experiences. While both AP share common features and goals, they also exhibit distinct characteristics and functionalities that cater to different needs within the e-commerce landscape.
Let’s talk about a few use cases for Loop - brands that are leveraging Loop APIs to make unforgettable customer experiences.
Hello Bello is a leading premium baby diaper company - that offers various kinds of subscriptions
When Hello Bello joined Loop (from Recharge), they wanted to create their own Customer Portal. Goal : They wanted to include multiple pieces of information in one place - They also wanted one Customer portal for both one-time orders and subscriptions orders
Here are the things that they were able to achieve:
Quick pointers for Hello Bello
Using Loop, Hello Bello were able to build Storefront APIs: https://loop-storefront.readme.io/reference/flow-reward-banner
Cancellation flow has been personalized - segment benefits basis conditions set on customer portal
With Every, consumers can enjoy healthy eating without the hassle. Every offers delicious, sustainable solutions for a better you and a better planet. How does Every make use of Loop APIs
Every’s Headless Customer Portal
Rise Gardens offers indoor hydroponic garden options, enabling year-round growth of veggies, fruits, and leafy greens - their innovative features include seedless pods, pH balance solutions, and customizable garden setups for optimal nutrition and fresh flavors.
How did Rise Garden make use of Loop APIs?
Loop helped Rise create:Â
Dunatura is a health vitamins company whose goal is to create customized/tailored offerings for their users
Dunatura makes use of Loop’s Bundle APIs to achieve the following:
‍
‍
How do the top subscriptions providers build an API framework? Different subscription companies have approached APIs in different ways
Let’s start with Recharge APIs
The Recharge API primarily functions as a REST API*, supplemented by some RPC** endpoints to facilitate common operations.
It features predictable, resource-oriented URLs, accepts request bodies encoded in JSON***, returns responses in JSON format, and utilizes standard HTTP response codes, authentication methods, and HTTP methods.
REST API - is REpresentational State Transfer - it is basically a design for creating an API with the goal of efficient communication in between systems
An RPC** (Remote Procedure Call)l could be classified as a type of API (application programming interface) that allows for developers to run code that can be executed on servers remotely.
JSON*** stands for JavaScript Object Notation. JSON is a text format for storing and transporting data.
Recharge integrates with various e-commerce players - for a seamless process of data and recurring payments. Unique tags have been mapped to each player for differentiation.
To ensure compatibility across various platforms, some of Recharge's API resources and endpoints may be limited to certain platforms. In these instances, tags will be used to indicate the specific checkout/platform associations that are supported.Â
Recharge utilizes API keys for authenticating requests. Each API request should include an API token in the following header:
X-Recharge-Access-Token: store_api_token
Replace store_api_token with the actual API key. Additionally, all requests must be made over HTTPS.
FYI: Loop Subscriptions offers 2 APIs - admin and storefront APIs - here is the reference URL for each:
Admin API authentication
Storefront Api authenticationÂ
The goal is to provide a safe route for customers to log in to the subscriber portal. More on this later in this blog.
API Token Scopes
In Recharge, token scopes can be configured from the API token edit page to control the access level of an API token.
Loop API data can be fetched from the settings page and unique configurations can be created.
All requests will follow an account's API settings unless you specify a version using the X-Recharge-Version header. The same token can be used to make calls across all versions. If no version is specified, the request will default to the version set as the default for your store.
By default, Recharge's API calls return 50 results. This can be increased to 250 results using the limit parameter.
When there are more results than can fit on a single page, you can navigate through the results using the page parameter. To request a specific page, include “page” as a parameter in the URL.
For example:
https://api.rechargeapps.com/subscriptions?limit=250&page=1
Recharge's API supports sorting of results when using a GET request to retrieve a list. Sorting is accomplished using the sort_by query parameter in the request URL. The sort_by value specifies the parameter and sort direction (ascending or descending) for the results. Available sort_by values vary between resources
Source of information: https://developer.rechargepayments.com/2021-01/sortingthe F
Loop APIs are organized around REST and offer a powerful way to build subscription experiences.
Loop has 2 kinds of APIs
Let’s briefly talk about each.
Admin APIs are designed for managing various subscription tasks within a Shopify-based platform, with operations performed at the individual store level. Typical applications include:
These APIs are crucial for automating subscription processes and enhancing the functionality of Shopify stores through custom integrations.
To authenticate with the admin API, you'll need an apiToken from the Loop admin portal. Here's how to generate one:
You can create multiple API tokens for merchants, each with different permissions based on assigned scopes. These tokens can be viewed and managed in the "Manage API tokens" section.
Remember to treat these tokens like passwords - keep them confidential and securely stored on the server side, not exposed to the public. Unauthorized access to your token could allow someone to perform actions on your subscriptions allowed by the token's assigned scopes.
Loop employs conventional HTTP response codes to indicate the success or failure of an API request. Here's a breakdown:
Every API request is assigned a unique identifier. You can locate this value in the response headers, labeled as Request-Id. If you ever need to reach out to us regarding a particular request, providing the request identifier will help us expedite the resolution process.
Whenever there are backwards-incompatible changes to the API, we release a new version with a specific date. The current version is 2023-10. Check out our API upgrades guide to understand more about maintaining backwards compatibility. For all updates to the API, you can find details in our API changelog.
Storefront APIs are tailored to execute actions on subscriptions, such as resuming, reactivating, pausing, or cancelling, for a particular customer and subscription.
The storefront API within Loop utilizes JWT tokens (access tokens) for authentication purposes. Access tokens can be obtained using either the API key or a session token.
Generate refresh token and access token
refreshToken and accessToken are used to handle authentication on the customer portal. For details please refer to Authentication.
The access token, with a validity period of 4 days, necessitates rotation every 4 days. Further information can be found in the Authentication section.
API keys within Loop confer extensive privileges, so it's imperative to safeguard them. It's advised not to share secret API keys in publicly accessible platforms such as GitHub or client-side code.
Customers are directed to the portal using a session token, which they can acquire through various channels such as email notifications, magic link generation, or reactivation campaigns.
The diagram below illustrates how Loop utilizes the session token to grant portal access.
A session token enables obtaining a refresh token and access token in a single API call, thus saving one API call per new login. Subsequently, the refresh token facilitates access token rotation, generating a fresh access token.
The access token can be used as a bearer token in the headers for authentication.
--header 'Authorization: Bearer accessToken'
Every API request within Loop is assigned a unique identifier. This identifier can be found in the response headers under Request-Id. If there's a need to reach out about a particular request, providing the request identifier will ensure the quickest possible resolution.
Find more details about Loop APIs here
‍
‍
‍
While Loop and Recharge APIs share common goals of empowering brands to provide unforgettable experiences - the strength of the APIs can be seen by the functionalities that cater to different use cases and preferences (defined by the merchant). True success lies in being able to cater to the various needs of the merchants.
The choice between Loop and Recharge APIs depends on factors such as specific custom requirements, how many and what quality of experiences you want to give to customers, integration preferences, and compatibility with existing systems, ensuring that developers have the flexibility and resources to create tailored solutions that meet their unique business needs.
‍
Emma Johnson is celebrated for her strategic brilliance and innovative flair. By seamlessly blending creativity with data-driven insights, she has propelled Loop’s brand to new heights, establishing it as a formidable force in the Shopify Subscriptions space.