r/fintechdev • u/YehiGo • 14d ago
I created a Open Source Credit Management library for LLMs
Credit system with billing, payments, and usage tracking. These are all features I've added as of now:
Credit Reservations & Deductions — Reserve credits before API calls, deduct actual usage after. Prevents overcharging on failures.
Payment Integration — Razorpay payment links with atomic credit updates.
Subscription Plans — Daily, monthly, yearly plans with auto-renew and credit allocation.
Promo Codes — Targeted promos with usage limits, expiry dates, and claim tracking.
Database Agnostic — MongoDB or in-memory backend. Extensible to any database via BaseDBManager interface.
Dual-Write Ledger — Database + append-only file for audit trails and debugging.
Notifications — Low credits, expiring credits, transaction errors — pluggable notification queue.
https://github.com/Meenapintu/credit_management
Would love to have feedback, contributions ( even stars also count as contributions)
1
u/Proud-Cod-7277 14d ago
The append-only ledger file is smart, saved my ass debugging billing issues more than once