Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Overview:

  • Product Managers

  • Developers

  • Testers

  • Co-creation partners

  • Implementation Team

  • Third-Party(TP) integrators

Background:

The main objective of the billing module is to serve the Bill for all revenue Business services.
To serve the Bill, Billing-Service needs requires demand. Demands will be generated prepared by Business Service Revenue modules and stored by billing based on demand, which it will generate the Bill.

Functionality:

Billing-Service mainly works with two types of functionality as follows:

  • Demand

  • Bill

Objective:

The main objective of the Billing module is to serve the Bill for all revenue Business services based on criteria.

Feature List:

  • Create Demand

  • Search Demand

  • Update Demand

  • Fetch Bill

  • Search Bill

Current Masters :

  • Business Service

  • Tax Periods

  • Tax Heads

Requirements:

Pre-requisites:

  • 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 the demand-based systems.

...

MDMS service, id Gen, eGov-user of eGov core applications.

  • Following services should be up and running:

    • user

    • MDMS

    • Id-Gen

    • URL-Shortening

    • notification-sms

Key Functionality: 

  • eGov billing service creates and maintains demands

...

  • .

  • Generates bills

...

  • based on

...

Feature List: 

  1. Master data search
    APIs to provide master data fetched from MDMS service

  2. Demand
    Create and update for storing demand in the system, provides search for other application to access the demand.

  3. Bill 
    Generate bill to provide new bills on the requirement, fetch bill API to provide a valid bill but not necessarily a new one.

SETUP AND USAGE:

The Application is present in the billing services folder available in the Business-services git repository.  The spring boot application but needs Lombok* extension added in your ide to load it. Once the application is up and running API requests can be posted to the URL and ids can be generated. 

  • *in the case of IntelliJ the plugin can be installed directly, for eclipse the Lombok jar location has to be added in the eclipse.ini file in this format

  • javaagent:lombok.jar

.

For the API information please refer to the swagger YAML 

GOTO: https://editor.swagger.io/ and click on file -> import URL, then add the raw URL of the API doc in the pop-up. 

https://raw.githubusercontent.com/egovernments/business-services/master/Docs/billingservice/V-2.0.yml

In case the URL is unavailable, please go to the docs folder of the Business services repo and find the YAML for billing service.

ACCESS:

Please make use of the following postman collection to access the apis

https://github.com/egovernments/business-services/tree/master/Docs

Configs to be updated in the Application properties

  • user service

user.service.hostname = http://egov-user:8080/

  • id gen

egov.idgen.hostname = http://egov-idgen:8080

  • mdms

egov.mdms.host=http://egov-mdms-service:8080/

  • fetch bill API internal calculate API’s provided by respective modules

...

  • demands.

  • Updates the demands from payment when the collection service takes a payment.

Deployment Details:

  • Deploy the latest image of the billing service available.

Configuration Details:

In the MDMS data configuration, the following master data is needed for the functionality of billing

MDMS:

Business Service JSON

Code Block
{
  "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

Code Block
{
  "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

Code Block
{
  "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"
    }
  ]
}

...

Each module’s application calculator should provide its own update URL. if not present then 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 bill number

bs.amendment.idbs.bill.billnumber.format

...

BILLNO-{module}-[SEQ_egbs_billnumber{tenantid}]

...

Flow diagram V1:

...

Flow diagram V1.1

...

is.amendment.workflow.enabled

true/false

enable disable workflow of bill amendment

Integration

Integration Scope

Billing service can be integrated with any organization or system that wants a demand-based payment system.

Integration Benefits

  • 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.

Steps to Integration

  1. Customer can create a demand using the /demand/_create

  2. Organization or System 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 used to cancel the created ones or update workflow if configured.

Interaction Diagram

Interaction Diagram V1.1:

...

Reference Docs

Doc Links

Title 

Link

 Id-Gen service

 

url-shortening

 

 MDMS

 

API List


Apportioning :

What is apportioning?

...