RecurringStack Dunning Rule API
The Dunning Rule API provides a powerful way to automate the process of managing delinquent customer subscriptions. Dunning rules allow you to define specific actions that RecurringStack should take when a subscription's invoice becomes overdue, helping to reduce churn and recover revenue. Each dunning rule is associated with a specific product_group. A rule is triggered when an invoice linked to a subscription within that group meets the defined criteria for both the number of days it is overdue (overdue_days) and its outstanding balance (overdue_amount). When the conditions are met, a predefined enforcement_action is automatically executed. Key Features & Concepts Rule Triggers: A rule is activated only when an invoice's overdue status is an exact match for the overdue_days value and the unpaid balance meets or exceeds the specified overdue_amount. Scoped to Product Groups: All rules must be linked to a product_group, ensuring they only apply to subscriptions for products within that group. This allows for different dunning strategies for different product offerings. Multiple Simultaneous Rules: A single product group can have multiple dunning rules. If the conditions for several rules are met simultaneously (e.g., a 'REMIND' and a 'POST' rule for the same number of overdue days), all corresponding actions will be executed. Automated Enforcement Actions: You can configure one of several actions to be taken when a rule is matched: SUSPEND: Suspends the associated subscription. DELETE: Cancels/deletes the associated subscription. REMIND: Sends the standard 'Invoice Reminder' notification to the customer. POST: Sends a POST request with invoice and customer details to a specified URL (post_url) for custom integration or workflow automation. Note: Dunning rules only apply to invoices that are automatically generated for active subscriptions. They do not affect manually created invoices or invoices that are not linked to a subscription.