Stripe Dunning
Automated Stripe payment recovery with multi-stage personalized dunning emails. Tracks customer history and escalates from friendly reminders to pause notices.
connic init my-project --templates=stripe-dunningOverview
Handles Stripe webhook events for failed payments and subscription changes. The payment analyzer looks up customer history from the database, decides the appropriate dunning stage, and uses trigger_agent to dispatch the recovery composer. Middleware filters irrelevant Stripe events with StopProcessing and extracts customer metadata into context. Supports multi-stage dunning from friendly reminders to service pause notifications.
Use cases
Failed payment recovery
Automatically send escalating recovery emails when subscription payments fail, personalized by dunning stage.
Subscription lifecycle
React to subscription status changes (past_due, cancelled) with appropriate customer communications.
Win-back campaigns
Trigger personalized win-back emails when customers cancel, tailored to their usage history.
Architecture
Main template files
Install these files with connic init my-project --templates=stripe-dunning. The CLI places agent definitions in a folder named after the template under agents/.
stripe-dunning/
agents/
payment-analyzer.yaml
recovery-composer.yaml
dunning-pipeline.yaml
tools/
payment_tools.py
middleware/
payment-analyzer.py
schemas/
payment-analysis.json
recovery-email.json
requirements.txt
README.mdGet started
Install the template, create a Connic project, and deploy through a connected Git repository or the CLI.
Prerequisites
- Python 3.10+
- A Connic account (create a project first)
- Project credit for a connic/* model, or credentials for a BYOK provider
Install and scaffold
Install the SDK and create a project from this template.
terminalpip install connic-composer-sdk connic init my-project --templates=stripe-dunningThen cd my-project
Deploy
Choose a deployment method. A connected Git repository deploys on push; use the CLI for projects without a connected Git repository.
Git integration
In Connic: Project Settings → Git & Environments, connect the GitHub repository
On the same page, map a branch (e.g. main) to the Production environment
Push the scaffolded project to that repository
terminalgit add . git commit -m "Add Stripe Dunning template" git push origin mainCLI deploy
In Connic: Project Settings → API Keys & MCP Auth, create an API key and copy project ID
Run connic login in the project folder
Use connic dev to try with hot-reload, connic test to run suites, or connic deploy for production
terminalconnic login connic dev # Ephemeral dev env with hot-reload connic test # Run declarative test suites connic deploy # Deploy to productionConnect and configure
Add a Stripe connector, copy the webhook URL to the Stripe Dashboard, then paste the signing secret back. Add an Email outbound connector for recovery emails. Use a connic/* model, or add BYOK credentials under Project Settings → LLM Provider.
Template source
Browse the full template, contribute improvements, or fork it for another use case.
connic-org/connic-awesome-agents/tree/main/stripe-dunningInformation
- Publisher
- By Connic
- Category
- Agent Templates
- Difficulty
- Intermediate
- Works with
- Stripe, Email
- Source
- GitHub
More agent templates
Browse the marketplaceResearch Assistant
Break complex research questions into sub-tasks, dispatch specialist agents in parallel, and synthesize web and internal data into structured, scored reports.
Customer Support
AI ticket triage with sentiment analysis and RAG-powered response drafting. Classifies by priority, blocks spam, and stores new solutions.
Telegram Personal Assistant
Multimodal Telegram assistant that processes text, images, voice, video, and documents. Searches the web, saves notes and knowledge, and schedules follow-up reminders with persistent sessions.
Compliance Auditor
Scheduled compliance scanning combining web search for regulatory updates, MCP docs, and retrieval history. Produces scored summaries.
Kafka Fraud Detector
Score transactions for fraud in real-time on Kafka streams. Uses velocity analysis, geo-anomaly detection, and pattern matching per customer.
Browser Automation Demo
Ask for a Connic email, password, and project title, then sign in and create the project through the dashboard.