# Billing Automation > Build automated billing systems for recurring payments, invoicing, subscription lifecycle, and dunning management. Use when implementing subscription billing, automating invoicing, or managing recurring payment systems. Source: https://skillsagentes.com/skills/wshobson/agents/billing-automation Repository: https://github.com/wshobson/agents Author: wshobson License: MIT Updated: hace 2 meses Context cost: 55 tok installed, 475 tok once triggered, 4.3k tok with every bundled file Bundle: 2 files, 17 KB Permissions requested: none declared ## Install ```bash npx -y skills add wshobson/agents --skill billing-automation --agent claude-code ``` ## What it does - Implementa sistemas de facturación recurrente con ciclos de suscripción, generación de facturas y cobro - Automatiza la gestión de dunning para recuperar pagos fallidos con reintentos y notificaciones - Calcula cargos prorrateados por cambios de plan, asientos o frecuencia de facturación - Gestiona impuestos como IVA, GST y sales tax en el proceso de facturación ## Use it when - Implementar facturación de suscripciones SaaS - Automatizar la generación y entrega de facturas - Gestionar recuperación de pagos fallidos (dunning) - Calcular cargos prorrateados o procesar facturación por uso ## What triggers it - "Necesito automatizar el ciclo de facturación de mi SaaS" - "Ayúdame a implementar dunning para pagos fallidos" - "Cómo calculo el prorrateo al cambiar de plan a mitad de ciclo" ## Files - SKILL.md — 2 KB - references/details.md — 15 KB ## SKILL.md Reproduced verbatim from wshobson/agents under MIT. This section is the upstream document and is in English. # Billing Automation Master automated billing systems including recurring billing, invoice generation, dunning management, proration, and tax calculation. ## When to Use This Skill - Implementing SaaS subscription billing - Automating invoice generation and delivery - Managing failed payment recovery (dunning) - Calculating prorated charges for plan changes - Handling sales tax, VAT, and GST - Processing usage-based billing - Managing billing cycles and renewals ## Core Concepts ### 1. Billing Cycles **Common Intervals:** - Monthly (most common for SaaS) - Annual (discounted long-term) - Quarterly - Weekly - Custom (usage-based, per-seat) ### 2. Subscription States ``` trial → active → past_due → canceled → paused → resumed ``` ### 3. Dunning Management Automated process to recover failed payments through: - Retry schedules - Customer notifications - Grace periods - Account restrictions ### 4. Proration Adjusting charges when: - Upgrading/downgrading mid-cycle - Adding/removing seats - Changing billing frequency ## Quick Start ```python from billing import BillingEngine, Subscription # Initialize billing engine billing = BillingEngine() # Create subscription subscription = billing.create_subscription( customer_id="cus_123", plan_id="plan_pro_monthly", billing_cycle_anchor=datetime.now(), trial_days=14 ) # Process billing cycle billing.process_billing_cycle(subscription.id) ``` ## Detailed patterns and worked examples Detailed pattern documentation lives in `references/details.md`. Read that file when the navigation tier above is insufficient. --- Skills Agentes — https://skillsagentes.com/skills/wshobson/agents/billing-automation