Cosmic Module

O

Qubits of DPK

March 23, 2026

Core Open Source
Layer: Layer 7 — Communication & Security

What This Module Is (Big Picture)

The SMS module manages text message notifications sent to customers.
Banks often send SMS messages to inform customers about financial events such as:
  • loan approval
  • loan disbursement
  • repayment reminders
  • savings account transactions
  • account alerts
This module allows the system to automatically generate and send SMS notifications when events occur.

Layman Example

A customer repays a loan installment.
Immediately after repayment, the system sends an SMS.
Example message:
plain text
QUBITS OF DPK
1Dear John,
2Your repayment of ₹1,000 has been received.
3Remaining loan balance: ₹9,000.
4Thank you.
The fineract-sms module sends this message automatically.

Where the Code Lives

Other modules trigger SMS notifications when specific events occur.

Key Package

org.apache.fineract.infrastructure.sms
Responsibilities include:
  • creating SMS messages
  • managing SMS templates
  • sending SMS notifications
  • integrating with SMS gateways

Core Domain Entity:

SmsMessage.java

Path
fineract-sms/src/main/java/org/apache/fineract/infrastructure/sms/domain/SmsMessage.java
This entity represents a message sent to a customer.

Key fields on

SmsMessage

SMS Templates

Messages can be generated using templates.
Example template
plain text
QUBITS OF DPK
1Dear {{clientName}},
2Your loan repayment of ₹{{amount}} has been received.
3Thank you.
During message generation, placeholders are replaced with real values.
Example generated SMS
plain text
QUBITS OF DPK
1Dear John,
2Your loan repayment of ₹1,000 has been received.
3Thank you.

Example SMS Generation Code

plain text
QUBITS OF DPK
1public String generateSms(String template, Map<String, String> values) {
2
3    String message = template;
4
5    for (Map.Entry<String, String> entry : values.entrySet()) {
6
7        String placeholder = "{{" + entry.getKey() + "}}";
8        message = message.replace(placeholder, entry.getValue());
9    }
10
11    return message;
12}
This replaces placeholders with actual values.

SMS Gateway Integration

After generating a message, it must be sent through an SMS gateway provider.
Examples of SMS providers:
  • Twilio
  • Nexmo
  • local telecom gateways
The SMS module integrates with these gateways to deliver messages.

API Layer

Main controller
SmsApiResource
Example endpoints
plain text
QUBITS OF DPK
1GET  /v1/sms
2POST /v1/sms
3GET  /v1/sms/{smsId}
These APIs allow administrators to:
  • view SMS messages
  • send SMS manually
  • check message delivery status

Read Services

Read services retrieve SMS information.
Examples include:
  • retrieving sent messages
  • retrieving delivery status
  • retrieving message history
These are used for monitoring communication with clients.

Write Services

Write services manage SMS operations.
Responsibilities include:
  • generating SMS messages
  • sending SMS through gateways
  • recording SMS delivery status

Repository Layer

Exceptions

These ensure SMS notifications are properly configured.

How It All Connects (Full Flow)

Example: Loan repayment notification
plain text
QUBITS OF DPK
1Loan Repayment
2    │ Repayment recorded
34SMS Notification Service
5    │ Generate SMS message
67SMS Gateway
8    │ Send message to phone
910Database (sms table)
11    │ Store delivery status

Why This Module Matters

SMS notifications help financial institutions:
  • communicate with customers instantly
  • send repayment reminders
  • notify customers of financial activity
This improves customer engagement and repayment compliance.

One-Sentence Summary

fineract-sms manages SMS notifications sent to customers for events such as loan repayments, account activity, and financial alerts.