
In simple English
When a customer's credit card fails on your subscription site, you need to ask them for a new card without annoying them. This tool looks at the failed charge and tells you when to try again. It also writes the email or message to send to the person. It does not send the email or charge the card for you. You can run it for free on your own computer without any paid subscriptions.
What it is
Recoup is a Python library and command-line helper that groups failed payments by type and creates a schedule of retry attempts. It uses rules by default, with an optional artificial intelligence model (a computer program that generates text) to make the messages sound more natural.
What it is good for
Solo builders who run subscription software and want to win back failed payments without paying a monthly fee for a specialized billing tool.
- Runs offline without needing any paid artificial intelligence keys.
- Works with multiple payment gateways as an input parser.
- Lets you customize the retry schedule and rules easily.
- Requires Python knowledge to integrate into your website.
- Does not actually send emails or move money.
- Relies on you to build the code that connects it to your database.
Manual checks of failed payment logs and writing dunning emails from scratch
Stripe
- stripe/stripe-python2.1k stars
The official library for Stripe, which handles charges and webhooks directly but lacks a built-in dunning planner.
- dj-stripe/dj-stripe1.8k stars
Syncs Stripe billing data into a Django database, whereas Recoup focuses purely on the retry and recovery decision logic.
- hledgerorg/hledger4.8k stars
Double-entry accounting over plain text files, with command-line, terminal, web and editor interfaces.
- akaunting/akaunting10k stars
Self-hosted invoicing and expense tracking, with the double-entry accounting sold separately as an add-on.
- ledger/ledger6.1k stars
Double-entry accounting from a plain text file, run from the command line, with no database of any kind.
git clone https://github.com/opensyndicate/recoup.git cd recoup python3 -m venv .venv && source .venv/bin/activate pip install -e . recoup demo