We use tracking cookies to understand how you use the product and help us improve it. For more information on how we store cookies, read our  privacy policy.

Create Stripe Subscription

Learn how to set up recurring subscription billing with Stripe

Learn how to create subscription products with recurring billing in Stripe.

Prerequisites

  • Stripe account set up
  • Basic understanding of Stripe products
  • Access to Stripe Dashboard

Steps

Create Subscription Product

Navigate to Stripe Dashboard:

https://dashboard.stripe.com/products

Click "Add product" and configure:

Product Details:

  • Name: Subscription plan name (e.g., "Pro Monthly", "Enterprise Annual")
  • Description: What's included in the subscription
  • Image: Optional product image

Pricing:

  • Pricing model: Standard pricing
  • Price: Monthly or annual amount
  • Billing period: Select "Recurring"
  • Billing interval: Choose frequency:
    • Monthly
    • Every 3 months
    • Every 6 months
    • Yearly

Create separate products for monthly and annual plans to offer both options to customers.

Configure Billing Settings

Trial Period (Optional):

  • Set trial days if offering a free trial
  • Example: 14 days, 30 days

Usage Type:

  • Licensed: Fixed price per billing period (most common)
  • Metered: Pay based on usage

Add Marketing Features

Marketing features are displayed as bullet points on your pricing cards. Add them in the Stripe Dashboard:

  1. Scroll to "Marketing features" section
  2. Click "Add feature"
  3. Add feature descriptions for your subscription plan:
Unlimited projects
Priority support
Advanced analytics
Custom integrations
Team collaboration

These features will automatically appear on your pricing page as checkmark bullet points.

Highlight the most valuable features first. Keep each feature concise (3-5 words) and focus on customer benefits.

Test Subscription Flow

Start your development server:

npm run dev

Navigate to your pricing page and test the subscription:

  1. Click "Get Started" on your subscription product
  2. Complete checkout with test card: 4242 4242 4242 4242
  3. Verify subscription is created in Stripe Dashboard

Use Stripe test mode for development. Test card numbers are available in Stripe's testing documentation.

Subscription Management

Subscriptions are automatically managed through Stripe webhooks. The app handles:

  • Subscription created: User gains access
  • Subscription updated: Plan changes reflected
  • Subscription canceled: Access revoked
  • Payment failed: User notified

Webhook handler location:

app/api/stripe/webhook/route.ts

Common Issues

Subscription Not Creating

  • Verify webhook endpoint is configured in Stripe Dashboard
  • Check that webhook secret is set in .env
  • Ensure the product has an active recurring price
  • Check browser console and server logs for errors

Customer Not Charged

  • Confirm the subscription is active in Stripe Dashboard
  • Verify payment method is valid
  • Check for failed payment events in Stripe Dashboard
  • Review webhook logs for payment failures

Trial Not Working

  • Ensure trial period is set on the price in Stripe Dashboard
  • Verify the subscription was created with trial settings
  • Check that the trial end date is correct in Stripe

Best Practices

Pricing Strategy:

  • Offer both monthly and annual options
  • Provide 15-20% discount for annual plans
  • Consider a free trial to reduce friction

Communication:

  • Send email confirmations for new subscriptions
  • Notify users before trial ends
  • Alert customers about failed payments

Cancellation:

  • Make cancellation easy to build trust
  • Offer pause or downgrade options
  • Collect feedback on why users cancel

Next Steps

How is this guide ?

Last updated on