Subscription functionality can be used to monetize your app by charging your end users on a recurring basis. In this article, we will discuss how to set up this functionality and how to use it throughout your app.
To begin, you will need to enable Subscriptions for your Tadabase account, and you will also need a Stripe account.
Let's start with configuring your Stripe account with a product to link to your Tadabase app. You will also need to make at least one pricing plan for your product.
Then, you will need to retrieve the Publishable key and Secret key from your Stripe account.
These values will be placed in the Subscriptions Settings in your Tadabase app.
Once the API Details are saved, you will be able to view your plans in the Subscription Plans tab.
If you have set up your Stripe account and configured Subscription Settings in your app, you are ready to set up roles associated with each subscription plan that you would like to use. These roles will allow you create security rules based on whether the user is part of the specified role and is an active subscriber on the Stripe side.
Setting up roles for subscription plans is fairly similar to your typical role setup. In addition to enabling Stripe subscriptions to your role, you will need to select the corresponding plan.
Once you have set up your roles, the next step will be to add a Subscription Component. This is where you will set up the portion of your app where users can view plan details and subscribe.
Upon adding a new Subscription Component, you will see two areas to configure. Options is where you will add a name and description to your component. In addition, you can enable tabs and choose the number of columns for your plans to appear within. We will take a closer look at these two options as we continue to learn about the Subscription Component.
Plans is where you will perform your main configurations on how your plans will work. In the image below, you can see that two tabs have been configured as Monthly and Annual, and a new plan has just been added. Tabs can be added using the Add New Tab button and plans can be added to your tabs using the Add New Plan button.
Once you have added your tabs and plans, you can add lines to your plan to describe the features of your plan and show the price. Below is an example of a plan we configured.
Pictured below is the page view of the plan we configured. There are various formatting options available to be configured for each plan line so you can customize this component in a way that works best for your app.
With our Subscription Component set up, we can now add a My Subscription Component. This is where subscribed users can manage their plan and view/download their invoices. This component has no features to edit and can simply be placed on a page.
A good place for this component is on the Profile page. Pictured below is an example of a Profile page we configured with a My Subscription Component.
Watch how it's done! Watch our brief video tutorial for more step by step instructions on how to begin monetizing your app in minutes with Tadabase subscriptions!