Subscriptions are powerful, but their true potential is unlocked with advanced features like tiered pricing, add-ons, and free trials. These capabilities allow you to cater to diverse customer needs, upsell additional services, and reduce friction during the signup process, ultimately driving customer acquisition and retention.
Tiered pricing is a fundamental strategy for subscription services. It allows you to offer different feature sets or usage limits at varying price points, appealing to a broader customer base. Stripe's Products and Prices API is ideal for this. You can define multiple Price objects for a single Product, each representing a different tier.
For example, a software service might have a 'Basic' tier with limited features, a 'Pro' tier with more advanced tools, and an 'Enterprise' tier with premium support and unlimited usage. Each of these would be represented as a distinct price associated with the same product.
const product = await stripe.products.create({
name: 'SaaS Product',
});
const basicPrice = await stripe.prices.create({
product: product.id,
unit_amount: 2000, // $20.00 in cents
currency: 'usd',
recurring: {
interval: 'month',
},
nickname: 'Basic',
});
const proPrice = await stripe.prices.create({
product: product.id,
unit_amount: 5000, // $50.00 in cents
currency: 'usd',
recurring: {
interval: 'month',
},
nickname: 'Pro',
});Add-ons are optional features or services that customers can purchase on top of their base subscription. This is a fantastic way to increase average revenue per user (ARPU) and provide flexibility. In Stripe, add-ons can be implemented as separate Product and Price objects, which can then be attached to an existing subscription.
Consider a streaming service offering a 'Premium Content Pack' or a project management tool offering 'Advanced Reporting' as add-ons. When a customer subscribes, they can then opt to include these additional services for an extra charge.
const reportingAddonProduct = await stripe.products.create({
name: 'Advanced Reporting',
});
const reportingAddonPrice = await stripe.prices.create({
product: reportingAddonProduct.id,
unit_amount: 1500, // $15.00 in cents
currency: 'usd',
recurring: {
interval: 'month',
},
nickname: 'Reporting Add-on',
});
// When updating a subscription:
await stripe.subscriptionItems.create({
subscription: subscriptionId,
price: reportingAddonPrice.id,
});Free trials are crucial for giving potential customers a risk-free way to experience your product. Stripe makes it easy to implement trials by specifying a trial_period_days when creating a Subscription.
During the trial period, the customer is not charged. Stripe automatically handles the transition at the end of the trial, either by converting the subscription to a paid one or canceling it if a payment method isn't provided or fails.
const subscription = await stripe.subscriptions.create({
customer: customerId,
items: [
{
price: priceId, // The ID of the price for the subscription tier
},
],
trial_period_days: 14, // Offer a 14-day free trial
payment_behavior: 'default_incomplete',
expand: ['latest_invoice.payment_intent'],
});It's important to configure payment_behavior appropriately. For trials, default_incomplete is often used, allowing the subscription to be created in an incomplete state until the customer provides payment details and the trial ends. You'll typically need to handle the checkout flow to collect payment information during or before the trial.
graph TD
A[Customer Signs Up] --> B{Trial Period?}
B -- Yes --> C[Create Subscription with Trial]
C --> D[Customer Uses Service (Free)]
D --> E{Trial Ends}
E -- Payment Provided --> F[Subscription Becomes Paid]
E -- No Payment / Cancelled --> G[Subscription Canceled]
By strategically combining tiers, add-ons, and trials, you can create a sophisticated and flexible subscription offering that meets the diverse needs of your users and drives sustainable revenue growth for your business.