Invoice Collector MCP
Pricing
Pay per event
Invoice Collector MCP
Automates invoice collection from Razorpay, PayPal, and Stripe. Generates PDF/JSON exports, emails reports automatically, and supports AI-ready MCP mode for agent workflows.
Pricing
Pay per event
Rating
0.0
(0)
Developer
lalithhh
Maintained by CommunityActor stats
0
Bookmarked
4
Total users
0
Monthly active users
8 months ago
Last modified
Categories
Share
🚀 InvoiceCollector MCP — Unified Invoice Automation for Razorpay, PayPal & Stripe
InvoiceCollector MCP is a production-grade automation tool designed for businesses, accountants, SaaS vendors, and AI agents who need a fully automated pipeline to fetch, organize, export, and deliver invoices from multiple payment platforms.
It works in two powerful modes:
- NORMAL MODE → Bulk-fetch invoices (PDF/JSON) from selected platforms
- MCP MODE → Runs as a WebSocket MCP server so AI agents (ChatGPT, Claude, LangChain, custom tools) can call it programmatically
Whether you're reconciling payments, filing GST, preparing financial reports, or integrating AI workflows — this Actor gives you a complete, automated invoice pipeline.
⭐ Why This Actor Exists
Modern businesses use multiple payment platforms.
But invoices are scattered, inconsistent, and hard to download in bulk.
🛑 Razorpay doesn’t provide unified bulk exports
🛑 Stripe splits charges, payments, and invoices across APIs
🛑 PayPal separates Invoicing API vs Reporting API
🛑 No single dashboard fetches everything
🛑 No AI-ready automation framework existed… until now
InvoiceCollector MCP solves this.
It provides:
- Unified fetch across platforms
- Bulk PDF download
- JSON summaries for missing PDFs
- Optional email delivery
- MCP server automation for AI tools
✨ Key Features
✅ 3-in-1 Platform Support
No scraping — 100% official API integrations.
| Platform | Fetch Type | PDF Support | Notes |
|---|---|---|---|
| Razorpay | Payments / Invoices | ✔ Yes | Fastest, stable |
| PayPal | Invoicing API + Reports | ✔ Yes | Thick records |
| Stripe | Charges + Hosted Invoices | ✔ Yes | Best metadata |
✅ Full Invoice Automation Pipeline
✔ Authenticate
✔ Fetch date-range transactions
✔ Download invoice PDFs
✔ Save JSON summaries when PDFs missing
✔ Upload results to KV store
✔ (Optional) Email all invoices
✔ Return unified flattened output
✅ AI Automation Ready (MCP Mode)
Run as a WebSocket MCP server the same way ChatGPT tools work:
listPlatformsvalidateCredentialscollectInvoices
Perfect for:
- Accounting bots
- ERP automations
- AI assistants
- Internal finance agents
✅ Zero UI Scraping → Fully Compliant
All integrations use official APIs, making it:
- Faster
- More reliable
- Safe for enterprise
- Allowed by payment providers
✅ Built for Pro Use
- Modular adapters
- Scalable architecture
- Clean SDK-based structure
- Extensible for future platforms
🧠 Who This Actor Is For
- Founders / Startups
- Fintech apps
- Accounting firms
- CAs & auditors
- No-code automation builders
- ERP developers
- AI agent engineers
- Automation enthusiasts
Anyone dealing with Razorpay, PayPal, or Stripe invoices — this is for you.
🔧 Quick Start (Normal Mode)
🟦 Example INPUT
{"mode": "normal","platforms": ["razorpay", "stripe"],"dateFrom": "2024-01-01","dateTo": "2024-12-31","emailTo": "yourname@example.com"}
🔐 Environment Variables (Required)
Set these in Apify → Actor Settings → Environment variables:
| Variable | Purpose |
|---|---|
RAZORPAY_API_KEY | Razorpay access key |
RAZORPAY_API_SECRET | Razorpay secret key |
PAYPAL_CLIENT_ID | PayPal REST API |
PAYLAY_SECRET | PayPal REST API |
STRIPE_API_KEY | Stripe secret key |
SMTP_USER | Gmail address / SMTP user |
SMTP_PASS | Gmail App Password / SMTP key |
SMTP_HOST | Optional — default smtp.gmail.com |
SMTP_PORT | Optional — default 587 |
📤 Output Example
{"mode": "normal","processedPlatforms": "razorpay, stripe","successCount": "2","errorCount": "0","totalInvoices": "14","pdfFiles": "inv001.pdf, inv002.pdf","jsonFiles": "invoice_summary_12.json","emailSent": "yes","emailTo": "yourname@example.com"}
📨 Email Delivery
If emailTo is provided and invoices were fetched:
✔ PDFs and JSON summaries are attached
✔ Message is delivered using SMTP/Gmail
✔ Skipped automatically if SMTP not configured
🤖 MCP Mode — For AI Agents
Turn the Actor into a WebSocket automation backend.
🟦 Example MCP Input
{"mode": "mcp","mcpPort": 8080}
Server launches at:
ws://localhost:8080
Supported Commands (MCP)
| Command | Description |
|---|---|
listPlatforms | Returns: razorpay, paypal, stripe |
validateCredentials | Ensures API keys work |
collectInvoices | Triggers normal invoice flow |
Perfect for:
- ChatGPT MCP tools
- Claude MCP tools
- LangChain tool wrappers
- Internal automation APIs
📦 Storage Usage
The Actor stores:
📁 Key-value store
- PDF invoices
- JSON summaries
- Error logs
📁 Dataset (UI preview)
- Flattened summary table of the run
⚙ Architecture Overview
main.js├── normal mode → orchestrator.js└── mcp mode → mcp/server.jsorchestrator.js├── connectorManager.js├── email/sendEmail.js└── adapters/├── razorpay├── paypal└── stripe
Adapters follow a strict format:
- connect(credentials)
- bulkDownload(connection, filters)
This ensures the Actor remains easy to extend.
🎯 Limitations
- Rate limits apply based on API providers
- Some transactions do not have PDFs
- Email requires valid SMTP / Gmail App Password
- MCP mode requires an MCP-enabled client
🏁 Final Notes
This Actor is built to be:
- Reliable in production
- Extensible for more payment gateways
- Fast and stable
- AI-automation-ready
- Useful for accounting + fintech workflows
If you'd like support for Cashfree, RazorpayX, Zoho Books, or Stripe Checkout logs — just ask!
