Billing Service
The main objective of the billing module is to generate the bill for all revenue-based business services. To serve the bill, the Billing-Service requires demand. Demands will be prepared by the revenue modules and stored by billing based on which it generates the Bill.
- Prior Knowledge of Java/J2EE.
- Prior Knowledge of Spring Boot.
- Prior Knowledge of KAFKA
- Prior Knowledge of REST APIs and related concepts like path parameters, headers, JSON, etc.
- Prior knowledge of demand-based systems.
- The following services should be up and running:
- user
- MDMS
- Id-Gen
- URL-Shortening
- notification-sms
- eGov billing service creates and maintains demands.
- Generates bills based on demands.
- Updates the demands from payment when the collection service takes a payment.
- Deploy the latest image of the billing service available.
In the MDMS data configuration, the following master data is needed for the functionality of the billing.
MDMS
Business Service JSON
{
"tenantId": "pb",
"moduleName": "BillingService",
"BusinessService": [
{
"businessService": "PropertyTax",
"code": "PT",
"isBillAmendmentEnabled":"true",
"collectionModesNotAllowed": [
"DD","OFFLINE_NEFT","OFFLINE_RTGS","POSTAL_ORDER"
],
"partPaymentAllowed": true,
"minAmountPayable":100,
"isAdvanceAllowed": false,
"demandUpdateTime": 86400000,
"isVoucherCreationEnabled": true,
"billGineiURL" : "egov-searcher/bill-genie/billswithaddranduser/_get"
},
{
"businessService": "WaterCharges",
"code": "WC",
"isBillAmendmentEnabled":"true",
"collectionModesNotAllowed": [
"DD","OFFLINE_NEFT","OFFLINE_RTGS","POSTAL_ORDER"
],
"partPaymentAllowed": false,
"isAdvanceAllowed": true,
"demandUpdateTime": 86400000,
"isVoucherCreationEnabled": false
},
{
"businessService": "TradeLicense",
"code": "TL",
"collectionModesNotAllowed": [
"DD","OFFLINE_NEFT","OFFLINE_RTGS","POSTAL_ORDER"
],
"partPaymentAllowed": false,
"isAdvanceAllowed": false,
"demandUpdateTime": 604800000,
"isVoucherCreationEnabled": true
}
]
}
TAX-Head JSON
{
"tenantId": "pb",
"moduleName": "BillingService",
"TaxHeadMaster": [
{
"category": "ADVANCE_COLLECTION",
"service": "PT",
"name": "Pt advance carry forward",
"code": "PT_ADVANCE_CARRYFORWARD",
"isDebit": true,
"isActualDemand": false,
"order": "0",
"isRequired": false
},
{
"category": "TAX",
"service": "PT",
"name": "Pt owner exemption",
"code": "PT_OWNER_EXEMPTION",
"isDebit": true,
"isActualDemand": true,
"order": "5",
"isRequired": false
},
{
"category": "TAX",
"service": "PT",
"name": "Pt time rebate",
"code": "PT_TIME_REBATE",
"isDebit": true,
"isActualDemand": true,
"order": "2",
"isRequired": false
},
{
"category": "TAX",
"service": "PT",
"name": "Pt unit usage excemption",
"code": "PT_UNIT_USAGE_EXEMPTION",
"isDebit": true,
"isActualDemand": true,
"order": "6",
"isRequired": false
},
{
"category": "TAX",
"service": "PT",
"name": "Pt adhoc penalty",
"code": "PT_ADHOC_PENALTY",
"isDebit": false,
"isActualDemand": false,
"order": "1",
"isRequired": false
},
{
"category": "TAX",
"service": "PT",
"name": "propertytax",
"code": "PT_TAX",
"isDebit": false,
"isActualDemand": true,
"order": "0",
"isRequired": false
},
{
"category": "TAX",
"service": "PT",
"name": "Pt fire cess",
"code": "PT_FIRE_CESS",
"isDebit": false,
"isActualDemand": true,
"order": "7",
"isRequired": false
}
]
}
Tax-Period JSON
{
"tenantId": "pb",
"moduleName": "BillingService",
"TaxPeriod": [
{
"fromDate": 1554076799000,
"toDate": 1585679399000,
"periodCycle": "ANNUAL",
"service": "PT",
"code": "PTAN2019",
"financialYear": "2019-20"
},
{
"fromDate": 1522540800000,
"toDate": 1554076799000,
"periodCycle": "ANNUAL",
"service": "PT",
"code": "PTAN2018",
"financialYear": "2018-19"
},
{
"fromDate": 1491004800000,
"toDate": 1522540798000,
"periodCycle": "ANNUAL",
"service": "PT",
"code": "PTAN2017",
"financialYear": "2017-18"
},
{
"fromDate": 1459468800000,
"toDate": 1491004799000,
"periodCycle": "ANNUAL",
"service": "PT",
"code": "PTAN2016",
"financialYear": "2016-17"
},
{
"fromDate": 1522540800000,
"toDate": 1554076799000,
"periodCycle": "ANNUAL",
"service": "TL",
"code": "TLAN2018",
"financialYear": "2018-19"
}
]
}
Variable | Path | Description |
---|---|---|
bs.businesscode.demand.updateurl | { | Each module’s application calculator should provide its own update URL. if not present then a new bill will be generated without making any changes to the demand. |
bs.bill.billnumber.format | BILLNO-{module}-[SEQ_egbs_billnumber{tenantid}] | IdGen format for the bill number |
bs.amendment.idbs.bill.billnumber.format | BILLNO-{module}-[SEQ_egbs_billnumber{tenantid}] | ​ |
is.amendment.workflow.enabled | true/false | enable disable workflow of bill amendment |
Billing service can be integrated with any organization or system that wants a demand-based payment system.
- Easy to create and simple process of generating bills from demands
- The amalgamation of bills period-wise for a single entity like PT or Water connection.
- Amendment of bills in case of legal requirements.
- 1.Customers can create a demand using the /demand/_create
- 2.Organizations or Systems can search the demand using /demand/_searchendpoint
- 3.Once the demand is raised the system can call /demand/_update endpoint to update the demand as per need.
- 4.Bills can be generated using, which is a self-managing API that generates a new bill only when the old one expires /bill/_fetchbill.
- 5.Bills can be searched using /bill/_search.
- 6.Amendment facility can be used in case of a legal issue to add values to existing demands using /amendment/_create and /amendment/_update can be used to cancel the created ones or update workflow if configured.
Interaction Diagram V1.1:

Doc Links
Description | Link |
---|---|
Id-Gen service | **** |
url-shortening | ​ |
MDMS | ​ |
API List
Description | Link |
---|---|
/demand/_create, _update, _search |