billing-subscriptions

Implement multi-provider SaaS billing with Stripe and Polar.sh integrations.

3|Updated Jan 3, 2026
One-click install
npx skills add https://github.com/NextSpark-js/nextspark --skill billing-subscriptions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: billing-subscriptions
Source: https://github.com/NextSpark-js/nextspark/tree/main/.claude/skills/billing-subscriptions
Command: npx skills add https://github.com/NextSpark-js/nextspark --skill billing-subscriptions

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires stripe, @polar-sh/sdk, @polar-sh/nextjs, @polar-sh/better-auth, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a robust, multi-provider system for managing all aspects of SaaS billing, subscriptions, payments, and usage tracking, ensuring a seamless revenue stream for your application.

Core Features & Use Cases

  • Multi-Provider Support: Integrates with Stripe and Polar.sh, with a flexible Gateway Factory pattern for easy addition of new providers.
  • Subscription Management: Handles plan creation, upgrades, downgrades, cancellations, and renewals.
  • Payment Processing: Integrates with Stripe for secure payment collection and customer portal access.
  • Usage-Based Billing: Tracks and meters feature usage for flexible pricing models.
  • Webhook Handling: Securely processes events from payment providers to keep subscription status up-to-date.
  • Use Case: Implement a tiered subscription model where users can choose between a free, pro, or enterprise plan, with features and limits dynamically enforced based on their selected plan.

Quick Start

Use the billing-subscriptions skill to create a checkout session for the 'pro' plan with a monthly billing interval.

Frequently Asked Questions about billing-subscriptions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage SaaS subscriptions and billing across multiple payment gateways?

SaaS subscription management across multiple gateways is handled through a provider-agnostic Gateway Factory pattern, integrating Stripe and Polar.sh for secure payment collection, plan configuration, and customer portal access.

How do I implement usage-based billing and meter feature consumption?

Usage-based billing is implemented by tracking and metering feature usage within the subscription system, allowing flexible pricing models where limits are dynamically enforced based on the user's selected plan.

Can I use Stripe and Polar.sh together for checkout flows and webhook processing?

Yes, Stripe and Polar.sh can be used together for checkout flows. The system securely processes webhook events from both payment providers to keep subscription statuses up-to-date during renewals and cancellations.

What is the best way to handle plan upgrades and downgrades for a tiered SaaS model?

Handling plan upgrades and downgrades for a tiered SaaS model is managed natively by the billing system, dynamically enforcing feature limits and processing billing interval changes through integrated gateways like Stripe.

Does this billing system support secure customer portal access for subscription management?

Yes, secure customer portal access is supported natively. Users can independently manage their subscriptions, update payment methods, and modify plans through the integrated Stripe and Polar.sh provider interfaces.

Why do I need a provider-agnostic architecture for SaaS payments?

A provider-agnostic architecture ensures scalable revenue operations by decoupling billing logic from specific gateways, allowing easy addition of new payment providers while maintaining robust permission models and webhook handling.