billing-automation

Automate subscription billing, invoicing, and dunning with Python classes.

38.6k|4.1k|Updated Jul 24, 2025
One-click install
npx skills add https://github.com/wshobson/agents --skill billing-automation-wshobson
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: billing-automation
Source: https://github.com/wshobson/agents/tree/main/plugins/payment-processing/skills/billing-automation
Command: npx skills add https://github.com/wshobson/agents --skill billing-automation-wshobson

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the complexities of managing recurring payments, generating invoices, handling subscription lifecycles, and recovering failed payments, reducing manual overhead and improving cash flow.

Core Features & Use Cases

  • Subscription Management: Manages trial periods, active subscriptions, past-due states, and cancellations.
  • Automated Invoicing: Generates invoices for billing cycles, including prorated charges and taxes.
  • Dunning Management: Implements automated retry schedules and customer notifications for failed payments.
  • Usage-Based Billing: Tracks and bills for metered usage based on defined pricing models.
  • Use Case: Implement a SaaS platform's billing system, ensuring customers are accurately charged for their subscriptions, invoices are sent on time, and failed payments are handled gracefully.

Quick Start

Use the billing-automation skill to create a new monthly subscription for customer 'cus_123' on plan 'plan_pro_monthly' with a 14-day trial.

Frequently Asked Questions about billing-automation

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

FAQPage Schema
How do I automate recurring payments and subscription lifecycle management for SaaS?

Automate recurring payments and subscription lifecycle management by using Python classes like Subscription and BillingEngine to handle trial periods, active states, past-due statuses, and cancellations. This reduces manual billing overhead and improves cash flow.

What is dunning management and how does it handle failed payments?

Dunning management handles failed payments by implementing automated retry schedules and customer notifications. The DunningManager class orchestrates these retries to recover failed charges gracefully without manual intervention.

How do I calculate prorated charges and taxes for automated invoicing?

Calculate prorated charges and taxes using the ProrationCalculator and TaxCalculator classes. These components generate accurate invoices for billing cycles, ensuring customers are billed correctly for partial subscription periods and applicable taxes.

Can I track and bill metered usage based on defined pricing models?

Yes, you can track and bill metered usage based on defined pricing models. The Skill supports usage-based billing, allowing you to monitor consumption and automatically generate invoices according to your specific metered pricing structure.

How do I create a new monthly subscription with a trial period?

Create a new monthly subscription with a trial period by instantiating the Subscription class with the customer ID, plan ID, and trial duration parameters. The BillingEngine then manages the transition from trial to active billing automatically.

What are the limitations of automating SaaS billing cycles with this approach?

The approach automates SaaS billing cycles including invoicing, proration, tax calculation, and dunning, but relies entirely on Python class implementations without external dependencies. Complex custom pricing tiers may require extending the core classes directly.