Billing
Pricing Plans
Setting Up Billing for Storage Subscription Plan
For setting up your billing for storage subscription plan at first you will need to create your suscription based pricing from stripe.
Step 1: Log in to Stripe Dashboard
Log in to your Stripe Dashboard using your credentials.
Step 2: Navigate to Products and Prices
Navigate to the "Products" section in your Stripe Dashboard and then click on "Prices".
Step 3: Create Subscription Plans
- Click on the "Create Price" button.
- Enter the necessary details for your subscription plan, including the name, description, and pricing.
- Specify the recurrence interval.
- Set up any trial periods if applicable.
- Click on "Save" to create the subscription plan.
Step 4: Set Up Free and Paid Plans
Create both free and paid subscription plans based on your business model. For example, you may offer a free plan with limited features and storage capacity, as well as paid plans with additional features and higher storage limits.
Step 5: Obtain Price IDs
Make note of the Price IDs generated by Stripe for each subscription plan. These Price IDs will be used in your application code to identify the subscription plans.
Step 6: Integrate Stripe API
Integrate the Stripe API into your application backend to handle subscription creation, management, and billing. You can refer to the Stripe API documentation for detailed instructions on how to implement subscription billing.
Step 7: Test Subscription Flow
Before going live, thoroughly test your subscription flow to ensure that users can sign up for plans, upgrade/downgrade their subscriptions, and manage their billing details seamlessly.
Step 8: Deploy Changes
Once everything is set up and tested successfully, deploy the changes to your production environment and start offering subscription plans to your users.
By following these steps and integrating Stripe's subscription pricing, you can effectively set up billing for your storage subscription plan and manage recurring payments from your customers.
After creating your pricing in stripe copy the price id and paste the price id according to your planId in the plan.ts file.
You can customize your plan from plan.ts
file.But you can not skip the planId it must match with your stipe pricing id .Other wise you will not be able to accept billing from FileKit.Make sure your are assigning the storage capasity
in your plans.
N:B- Make sure you are assinging your storage plan exactly like then give format.
export const FREE_INDIVIDUAL_PLAN_ID = 'price_1Or66lFIspl80woNSIg_your_stripe_price_id';
export const FREE_TEAM_PLAN_ID = 'price_1Or66lFIspl80woNSIg_your_stripe_price_id';
export const FREE_PLAN_USER = {
slug: 'FREE_USER', //add you custom text here
name: 'Free', //add you custom text here
description: 'Free forever, with basic features.',//add you custom text here
features: {
included: ['Basic Features', '300MB Storage'],//add you custom text here
notIncluded: ['Premium Features', '24/7 Chat Support', 'Unlimited Access'],//add you custom text here
},
plans: [
{
name: '',//add you custom text here
description: '',//add you custom text here
price: '$0/month',//add you custom text here
planId: 'price_1Or66lFIspl80woNSIg_your_stripe_price_id',
trial: '',
storage:'300MB' //STORAGE NEED TO ASSIGNED EXACTLY LIKE THIS
},
],
};
export const USER_PRICING = [
FREE_PLAN_USER,
{
slug: 'PREMIUM_USER', //add you custom text here
name: 'Premium', //add you custom text here
description: 'For premium users, with premium features.', //add you custom text here
features: {
included: [
'Basic Features',
'Email Support',
'Premium Features',
'24/7 Chat Support',
'1GB Storage'
],
notIncluded: ['Unlimited Access'],
},
plans: [
{
name: 'Monthly',
description: 'The monthly premium plan',
price: '$99/month',
planId: 'price_1Or66lFIspl80woNSIg_your_stripe_price_id', // This is the id that will be used to identify the plan in the payment gateway
trial: '1 Day',
storage:'1GB' //STORAGE NEED TO ASSIGNED EXACTLY LIKE THIS e.g:1GB,200MB,5TB etc
},
],
},
{
slug: 'EXCLUSIVE_USER', //add you custom text here
name: 'Exclusive', //add you custom text here
description: 'For exclusive users, with exclusive features.', //add you custom text here
features: {
included: [
'Basic Features',
'Email Support',
'Premium Features',
'24/7 Chat Support',
'10GB Storage',
'Unlimited Access',
],
notIncluded: [],
},
plans: [
{
name: 'Monthly',
description: 'The monthly exclusive plan',
price: '$199/month',
planId: 'price_1Or66lFIspl80woNSIg_your_stripe_price_id', // This is the id that will be used to identify the plan in the payment gateway
trial: '1 Day',
storage:'10GB' //STORAGE NEED TO ASSIGNED EXACTLY LIKE THIS
},
],
},
];
export const FREE_PLAN_TEAM = {
slug: 'FREE_TEAM',
name: 'Free',
description: 'Free forever, with basic features.',
features: {
included: ['Basic Features', 'Email Support','600MB Storage'],
notIncluded: ['Premium Features', '24/7 Chat Support', 'Unlimited Access'],
},
plans: [
{
name: '',
description: '',
price: '$0',
planId: 'price_1Or66lFIspl80woNSIg_your_stripe_price_id',
trial: '',
},
],
};
export const TEAM_PRICING = [
FREE_PLAN_TEAM,
{
slug: 'BASIC_TEAM',
name: 'Basic',
description: 'For basic users, with basic features.',
features: {
included: ['Basic Features', 'Email Support', '24/7 Chat Support','100GB Storage'],
notIncluded: ['Premium Features', 'Unlimited Access'],
},
plans: [
{
name: 'Monthly',
description: 'The monthly premium plan',
price: '$300',
planId: 'price_1Or66lFIspl80woNSIg_your_stripe_price_id', // This is the id that will be used to identify the plan in the payment gateway
trial: '1 Day',
},
],
},
{
slug: 'PREMIUM_TEAM',
name: 'Premium',
description: 'For premium users, with premium features.',
features: {
included: [
'Basic Features',
'Email Support',
'Premium Features',
'24/7 Chat Support',
'Unlimited Access',
'500GB Storage'
],
notIncluded: [],
},
plans: [
{
name: 'Monthly',
description: 'The monthly premium plan',
price: '$999',
planId: 'price_1Or66lFIspl80woNSIg_your_stripe_price_id', // This is the id that will be used to identify the plan in the payment gateway
trial: '1 Day',
},
],
},
];
Free Individual Plan
Plan Details
- Name: Free
- Description: Free forever, with basic features.
- Features:
- Included: Basic Features, 300MB Storage
- Not Included: Premium Features, 24/7 Chat Support, Unlimited Access
- Plans:
- Monthly: $0/month
- Plan ID: price_1Or66lFIspl80woNSIg_your_stripe_price_id
- Monthly: $0/month
User Pricing
Free Plan User
- Name: Free
- Description: Free forever, with basic features.
- Features:
- Included: Basic Features, Email Support, Premium Features, 24/7 Chat Support, 1GB Storage
- Not Included: Unlimited Access
- Plans:
- Monthly: $99/month
- Plan ID: price_1Or66lFIspl80woNSIg_your_stripe_price_id
- Trial: 1 Day
- Monthly: $99/month
Premium Plan User
- Name: Premium
- Description: For premium users, with premium features.
- Features:
- Included: Basic Features, Email Support, Premium Features, 24/7 Chat Support, 1GB Storage
- Not Included: Unlimited Access
- Plans:
- Monthly: $99/month
- Plan ID: price_1Or66lFIspl80woNSIg_your_stripe_price_id
- Trial: 1 Day
- Monthly: $99/month
Exclusive Plan User
- Name: Exclusive
- Description: For exclusive users, with exclusive features.
- Features:
- Included: Basic Features, Email Support, Premium Features, 24/7 Chat Support, 10GB Storage, Unlimited Access
- Not Included: None
- Plans:
- Monthly: $199/month
- Plan ID: price_1Or66lFIspl80woNSIg_your_stripe_price_id
- Trial: 1 Day
- Monthly: $199/month
Free Team Plan
Plan Details
- Name: Free
- Description: Free forever, with basic features.
- Features:
- Included: Basic Features, Email Support, 600MB Storage
- Not Included: Premium Features, 24/7 Chat Support, Unlimited Access
- Plans:
- Monthly: $0
- Plan ID: price_1Or66lFIspl80woNSIg_your_stripe_price_id
- Monthly: $0
Team Pricing
Free Plan Team
- Name: Free
- Description: Free forever, with basic features.
- Features:
- Included: Basic Features, Email Support, 600MB Storage
- Not Included: Premium Features, 24/7 Chat Support, Unlimited Access
- Plans:
- Monthly: $0
- Plan ID: price_1Or66lFIspl80woNSIg_your_stripe_price_id
- Monthly: $0
Basic Plan Team
- Name: Basic
- Description: For basic users, with basic features.
- Features:
- Included: Basic Features, Email Support, 24/7 Chat Support, 100GB Storage
- Not Included: Premium Features, Unlimited Access
- Plans:
- Monthly: $300
- Plan ID: price_1Or66lFIspl80woNSIg_your_stripe_price_id
- Trial: 1 Day
- Monthly: $300
Premium Plan Team
- Name: Premium
- Description: For premium users, with premium features.
- Features:
- Included: Basic Features, Email Support, Premium Features, 24/7 Chat Support, Unlimited Access, 500GB Storage
- Not Included: None
- Plans:
- Monthly: $999
- Plan ID: price_1Or66lFIspl80woNSIg_your_stripe_price_id
- Trial: 1 Day
- Monthly: $999