A comprehensive ERPNext app for integrating ICICI Bank's e-Collection services, enabling automated virtual account management, payment processing, and reconciliation.
- Virtual Account Management: Automatic creation of ICICI virtual accounts for Customers/Suppliers
- Real-time Payment Notifications: Webhook-based payment intimations from ICICI Bank
- Automated Payment Processing: Auto-creation of Payment Entries from bank notifications
- Transaction Reconciliation: Daily reconciliation between ICICI and ERPNext records
- RSA 4096-bit Encryption: Secure API communication with ICICI Bank
- IP Whitelisting: Webhook security with configurable IP restrictions
- Authentication: Basic auth support for webhook endpoints
- Comprehensive Dashboard: Monitor virtual accounts and payment processing
- Error Handling: Robust error logging and retry mechanisms
- Scheduled Tasks: Automated daily reconciliation and hourly sync
- Audit Trail: Complete transaction history and status tracking
-
Install the app:
bench get-app https://github.com/your-repo/bank_ecollection bench --site your-site install-app bank_ecollection
-
Run migrations:
bench --site your-site migrate
Navigate to ICICI Settings and configure:
- Environment: UAT or Production
- Client Code: Your ICICI client code
- API Key: ICICI provided API key
- Encryption Keys: RSA public/private key paths
- Webhook Credentials: Username/password for webhook authentication
- Default Accounts: Company, bank account, and cash account settings
# In ERPNext console
from bank_ecollection.api.encryption import generate_key_pair
result = generate_key_pair()
print(result)Configure your ICICI webhook URL as:
https://your-domain.com/api/icici/intimation
POST /api/icici/intimation- Receive payment notifications from ICICI
bank_ecollection.api.bene_upload.manual_upload_beneficiary- Manual virtual account creationbank_ecollection.api.enquiry.query_transaction_status- Query transaction statusbank_ecollection.api.encryption.test_encryption- Test encryption functionality
Central configuration for ICICI integration settings.
Manages virtual accounts linked to ERPNext Customers/Suppliers.
Records payment notifications received from ICICI Bank.
- Customer/Supplier Creation β Automatic virtual account creation via ICICI API
- Payment Made to Virtual Account β ICICI sends webhook notification
- Webhook Processing β Creates Payment Intimation record
- Auto Payment Processing β Creates Payment Entry in ERPNext
- Reconciliation β Daily sync ensures data consistency
from bank_ecollection.api.intimation_webhook import test_webhook_endpoint
result = test_webhook_endpoint()
print(result)from bank_ecollection.bank_e_collection.doctype.icici_settings.icici_settings import test_api_connection
result = test_api_connection()
print(result)- Daily Reconciliation: Compares ICICI and ERPNext transaction records
- Hourly Sync: Processes pending payment intimations
- Monthly Cleanup: Archives old records and generates reports
-
Virtual Account Creation Fails
- Check ICICI Settings configuration
- Verify API credentials and environment
- Check encryption key setup
-
Webhook Not Receiving Notifications
- Verify webhook URL configuration in ICICI portal
- Check IP whitelisting settings
- Validate webhook credentials
-
Payment Processing Errors
- Review Payment Intimation error messages
- Check default account configurations
- Verify party account mappings
- Check Error Log doctype for integration errors
- Monitor ICICI Payment Intimation status
- Review ICICI Virtual Account sync status
bank_ecollection/
βββ bank_e_collection/
β βββ doctype/
β β βββ icici_settings/
β β βββ icici_virtual_account/
β β βββ icici_payment_intimation/
βββ api/
β βββ bene_upload.py
β βββ intimation_webhook.py
β βββ enquiry.py
β βββ encryption.py
βββ utils/
β βββ virtual_account.py
β βββ payment_handler.py
βββ tasks/
βββ scheduled_tasks.py
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
MIT License - see LICENSE file for details.
For support and questions:
- Email: amit@ascratech.com
- Create an issue in the repository
Pre-commit is configured to use the following tools for checking and formatting your code:
- ruff
- eslint
- prettier
- pyupgrade
### CI
This app can use GitHub Actions for CI. The following workflows are configured:
- CI: Installs this app and runs unit tests on every push to `develop` branch.
- Linters: Runs [Frappe Semgrep Rules](https://github.com/frappe/semgrep-rules) and [pip-audit](https://pypi.org/project/pip-audit/) on every pull request.
### License
mit