{
  "openapi": "3.1.1",
  "info": {
    "title": "Ecg.Api | v1",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "http://footbridge-uat.masloc.gov.gh/billpayments/ecg/v1"
    }
  ],
  "paths": {
    "/prepaid/card/inquiry": {
      "post": {
        "tags": [
          "ECG Bill Payments"
        ],
        "summary": "Retrieves customer and meter information for an offline prepaid meter.",
        "operationId": "EcgPrepaidInquiry",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ECollectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ECollectInquiryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "502": {
            "description": "Bad Gateway"
          }
        }
      }
    },
    "/prepaid/card/charge": {
      "post": {
        "tags": [
          "ECG Bill Payments"
        ],
        "summary": "Charges an offline prepaid meter and returns the new card buffer.",
        "operationId": "EcgPrepaidCharge",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ECollectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ECollectChargeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "502": {
            "description": "Bad Gateway"
          }
        }
      }
    },
    "/prepaid/card/charge/repair": {
      "post": {
        "tags": [
          "ECG Bill Payments"
        ],
        "summary": "Repairs a prepaid offline charge by returning a fresh card buffer.",
        "operationId": "EcgPrepaidRepair",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ECollectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ECollectChargeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "502": {
            "description": "Bad Gateway"
          }
        }
      }
    },
    "/prepaid/online/inquiry": {
      "post": {
        "tags": [
          "ECG Bill Payments"
        ],
        "summary": "Retrieves customer and meter information for an online prepaid meter.",
        "operationId": "EcgPrepaidOnlineInquiry",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ECollectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ECollectOnlineInquiryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "502": {
            "description": "Bad Gateway"
          }
        }
      }
    },
    "/prepaid/online/charge": {
      "post": {
        "tags": [
          "ECG Bill Payments"
        ],
        "summary": "Charges an online prepaid meter.",
        "operationId": "EcgPrepaidOnlineCharge",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ECollectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ECollectChargeResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "502": {
            "description": "Bad Gateway"
          }
        }
      }
    },
    "/prepaid/online/charge/checkStatus": {
      "post": {
        "tags": [
          "ECG Bill Payments"
        ],
        "summary": "Checks the status of an online prepaid charge.",
        "operationId": "EcgPrepaidOnlineCheckChargeStatus",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ECollectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ECollectChargeStatus"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "502": {
            "description": "Bad Gateway"
          }
        }
      }
    },
    "/postpaid/inquiry": {
      "post": {
        "tags": [
          "ECG Bill Payments"
        ],
        "summary": "Retrieves customer and bill information for a postpaid meter.",
        "operationId": "EcgPostpaidInquiry",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ECollectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ECollectOnlineInquiryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "502": {
            "description": "Bad Gateway"
          }
        }
      }
    },
    "/postpaid/payBill": {
      "post": {
        "tags": [
          "ECG Bill Payments"
        ],
        "summary": "Pays a postpaid electricity bill.",
        "operationId": "EcgPostpaidPayBill",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ECollectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ECollectChargeResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "502": {
            "description": "Bad Gateway"
          }
        }
      }
    },
    "/postpaid/payBill/checkStatus": {
      "post": {
        "tags": [
          "ECG Bill Payments"
        ],
        "summary": "Checks the status of a postpaid bill payment.",
        "operationId": "EcgPostpaidCheckStatus",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ECollectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ECollectChargeStatus"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "502": {
            "description": "Bad Gateway"
          }
        }
      }
    },
    "/prepaid/getLastCharge": {
      "post": {
        "tags": [
          "ECG Bill Payments"
        ],
        "summary": "Returns the value of the last successful charge or pay bill for a meter.",
        "operationId": "EcgPrepaidGetLastCharge",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ECollectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ECollectLastChargeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "502": {
            "description": "Bad Gateway"
          }
        }
      }
    },
    "/transaction/status": {
      "post": {
        "tags": [
          "ECG Bill Payments"
        ],
        "summary": "Returns the eCollect status of a payment transaction by asyncRequestId.",
        "operationId": "EcgGetTransactionStatus",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ECollectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ECollectTransactionStatusResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "502": {
            "description": "Bad Gateway"
          }
        }
      }
    },
    "/cms/meter/info": {
      "post": {
        "tags": [
          "ECG Bill Payments"
        ],
        "summary": "Retrieves CMS information for a meter by customer phone number.",
        "operationId": "EcgCmsGetMeterInfo",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ECollectCmsMeterRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ECollectCmsMeterResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "502": {
            "description": "Bad Gateway"
          }
        }
      }
    },
    "/cms/meter/delete": {
      "post": {
        "tags": [
          "ECG Bill Payments"
        ],
        "summary": "Deletes a meter from the ECG CMS.",
        "operationId": "EcgCmsDeleteMeter",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ECollectCmsDeleteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ECollectCmsDeleteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "502": {
            "description": "Bad Gateway"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ECollectBill": {
        "type": "object",
        "properties": {
          "referenceId": {
            "type": [
              "null",
              "string"
            ]
          },
          "meterSerial": {
            "type": [
              "null",
              "string"
            ]
          },
          "meterProvider": {
            "type": [
              "null",
              "string"
            ]
          },
          "meterModel": {
            "type": [
              "null",
              "string"
            ]
          },
          "mobileNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "accountNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "regionId": {
            "type": [
              "null",
              "string"
            ]
          },
          "districtId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ECollectCard": {
        "type": "object",
        "properties": {
          "cardId": {
            "type": [
              "null",
              "string"
            ]
          },
          "cardBuffer": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "ECollectCharge": {
        "type": "object",
        "properties": {
          "chargeValue": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "callbackURL": {
            "type": [
              "null",
              "string"
            ]
          },
          "paymentReference": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ECollectChargeResponse": {
        "type": "object",
        "properties": {
          "customer": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ECollectCustomer"
              }
            ]
          },
          "receipt": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ECollectReceipt"
              }
            ]
          },
          "card": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ECollectCard"
              }
            ]
          },
          "meterSerial": {
            "type": [
              "null",
              "string"
            ]
          },
          "meterProvider": {
            "type": [
              "null",
              "string"
            ]
          },
          "meterModel": {
            "type": [
              "null",
              "string"
            ]
          },
          "vendingStation": {
            "type": [
              "null",
              "string"
            ]
          },
          "regionId": {
            "type": [
              "null",
              "string"
            ]
          },
          "districtId": {
            "type": [
              "null",
              "string"
            ]
          },
          "receiptNo": {
            "type": [
              "null",
              "string"
            ]
          },
          "chargeValue": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "chargeNetValue": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "availableCredit": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "totalCreditAdjustment": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "totalDebitAdjustment": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "totalPenalties": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "paidInstallmentsCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "totalInstallmentsAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "remainingInstallmentCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "remainingInstallmentsAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "lastMonthKwh": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "lastMonthMoney": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "gCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "spn": {
            "type": [
              "null",
              "string"
            ]
          },
          "districtName": {
            "type": [
              "null",
              "string"
            ]
          },
          "daysFromLastCharge": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tariffClass": {
            "type": [
              "null",
              "string"
            ]
          },
          "currentMonthTotalCharge": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "currentMonthTotalMoney": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "currentMonthEstimate": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "responseDate": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ECollectStatus"
              }
            ]
          }
        }
      },
      "ECollectChargeResult": {
        "type": "object",
        "properties": {
          "meterSerial": {
            "type": [
              "null",
              "string"
            ]
          },
          "transactionId": {
            "type": [
              "null",
              "string"
            ]
          },
          "paymentReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "ghanaGovInvoiceNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "responseDate": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ECollectStatus"
              }
            ]
          }
        }
      },
      "ECollectChargeStatus": {
        "type": "object",
        "properties": {
          "customerPhone": {
            "type": [
              "null",
              "string"
            ]
          },
          "meterId": {
            "type": [
              "null",
              "string"
            ]
          },
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "transactionId": {
            "type": [
              "null",
              "string"
            ]
          },
          "paymentReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "externalTransactionId": {
            "type": [
              "null",
              "string"
            ]
          },
          "rechargeToken": {
            "type": [
              "null",
              "string"
            ]
          },
          "rechargeMode": {
            "type": [
              "null",
              "string"
            ]
          },
          "utilityStatus": {
            "type": [
              "null",
              "string"
            ]
          },
          "utilityStatusDescription": {
            "type": [
              "null",
              "string"
            ]
          },
          "responseDate": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ECollectStatus"
              }
            ]
          }
        }
      },
      "ECollectCmsDeleteRequest": {
        "type": "object",
        "properties": {
          "MeterID": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ECollectCmsDeleteResponse": {
        "type": "object",
        "properties": {
          "StatusCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "Message": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ECollectCmsMeterDetails": {
        "type": "object",
        "properties": {
          "MeterId": {
            "type": [
              "null",
              "string"
            ]
          },
          "MeterNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "AccountNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "SPN": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "MeterProvider": {
            "type": [
              "null",
              "string"
            ]
          },
          "RegionId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "DistrictId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "CardType": {
            "type": [
              "null",
              "string"
            ]
          },
          "MeterType": {
            "type": [
              "null",
              "string"
            ]
          },
          "MeterBrand": {
            "type": [
              "null",
              "string"
            ]
          },
          "MeteringSystem": {
            "type": [
              "null",
              "string"
            ]
          },
          "SystemCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "DistrictCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "CmsRegionDistrict": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "FullMeterCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "CustomerName": {
            "type": [
              "null",
              "string"
            ]
          },
          "CustomerAddress": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ECollectCmsMeterRequest": {
        "type": "object",
        "properties": {
          "PhoneNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "MeterNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "MeterCategory": {
            "type": [
              "null",
              "string"
            ]
          },
          "Alias": {
            "type": [
              "null",
              "string"
            ]
          },
          "AccountNumber": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ECollectCmsMeterResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": [
              "null",
              "string"
            ]
          },
          "code": {
            "type": [
              "null",
              "string"
            ]
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "details": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ECollectCmsMeterDetails"
              }
            ]
          }
        }
      },
      "ECollectCredit": {
        "type": "object",
        "properties": {
          "chargeMinimumAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "chargeMaxAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "lastChargeDate": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastChargeValue": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "availableCredit": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "totalCreditAdjustment": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "totalDebitAdjustment": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "totalPenalties": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "lastMonthKwh": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "lastMonthMoney": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "paidInstallmentsCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "totalInstallmentsAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "remainingInstallmentCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "remainingInstallmentsAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "gCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "spn": {
            "type": [
              "null",
              "string"
            ]
          },
          "districtName": {
            "type": [
              "null",
              "string"
            ]
          },
          "daysFromLastCharge": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tariffClass": {
            "type": [
              "null",
              "string"
            ]
          },
          "currentMonthTotalCharge": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "currentMonthTotalMoney": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "currentMonthEstimate": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "ECollectCustomer": {
        "type": "object",
        "properties": {
          "customerCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "customerName": {
            "type": [
              "null",
              "string"
            ]
          },
          "address": {
            "type": [
              "null",
              "string"
            ]
          },
          "activityName": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ECollectInquiryResponse": {
        "type": "object",
        "properties": {
          "customer": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ECollectCustomer"
              }
            ]
          },
          "meter": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ECollectMeterInfo"
              }
            ]
          },
          "credit": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ECollectCredit"
              }
            ]
          },
          "responseDate": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ECollectStatus"
              }
            ]
          }
        }
      },
      "ECollectLastChargeResponse": {
        "type": "object",
        "properties": {
          "lastChargeValue": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "asyncRequestId": {
            "type": [
              "null",
              "string"
            ]
          },
          "responseDate": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ECollectStatus"
              }
            ]
          }
        }
      },
      "ECollectMeter": {
        "type": "object",
        "properties": {
          "referenceId": {
            "type": [
              "null",
              "string"
            ]
          },
          "meterSerial": {
            "type": [
              "null",
              "string"
            ]
          },
          "meterProvider": {
            "type": [
              "null",
              "string"
            ]
          },
          "meterModel": {
            "type": [
              "null",
              "string"
            ]
          },
          "mobileNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "accountNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "regionId": {
            "type": [
              "null",
              "string"
            ]
          },
          "districtId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ECollectMeterData": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "null",
              "string"
            ]
          },
          "customerName": {
            "type": [
              "null",
              "string"
            ]
          },
          "accountNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "address": {
            "type": [
              "null",
              "string"
            ]
          },
          "meterSerial": {
            "type": [
              "null",
              "string"
            ]
          },
          "balance": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "meterType": {
            "type": [
              "null",
              "string"
            ]
          },
          "meterCategory": {
            "type": [
              "null",
              "string"
            ]
          },
          "alias": {
            "type": [
              "null",
              "string"
            ]
          },
          "region": {
            "type": [
              "null",
              "string"
            ]
          },
          "district": {
            "type": [
              "null",
              "string"
            ]
          },
          "spn": {
            "type": [
              "null",
              "string"
            ]
          },
          "regionId": {
            "type": [
              "null",
              "string"
            ]
          },
          "districtId": {
            "type": [
              "null",
              "string"
            ]
          },
          "chargeMinimumAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "payMinimumAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "ECollectMeterInfo": {
        "type": "object",
        "properties": {
          "meterSerial": {
            "type": [
              "null",
              "string"
            ]
          },
          "districtId": {
            "type": [
              "null",
              "string"
            ]
          },
          "regionId": {
            "type": [
              "null",
              "string"
            ]
          },
          "meterModel": {
            "type": [
              "null",
              "string"
            ]
          },
          "vendingStation": {
            "type": [
              "null",
              "string"
            ]
          },
          "meterProvider": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ECollectOnlineInquiryResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ECollectMeterData"
            }
          },
          "responseDate": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ECollectStatus"
              }
            ]
          }
        }
      },
      "ECollectPayment": {
        "type": "object",
        "properties": {
          "chargeValue": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "callbackURL": {
            "type": [
              "null",
              "string"
            ]
          },
          "paymentReference": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ECollectPaymentInstrument": {
        "type": "object",
        "properties": {
          "paymentMethod": {
            "type": [
              "null",
              "string"
            ]
          },
          "bank": {
            "type": [
              "null",
              "string"
            ]
          },
          "ref": {
            "type": [
              "null",
              "string"
            ]
          },
          "mno": {
            "type": [
              "null",
              "string"
            ]
          },
          "msisdn": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ECollectReceipt": {
        "type": "object",
        "properties": {
          "receiptNo": {
            "type": [
              "null",
              "string"
            ]
          },
          "chargeValue": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "chargeNetValue": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "availableCredit": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "totalCreditAdjustment": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "totalDebitAdjustment": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "totalPenalties": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "paidInstallmentsCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "totalInstallmentsAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "remainingInstallmentCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "remainingInstallmentsAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "lastMonthKwh": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "lastMonthMoney": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "gCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "spn": {
            "type": [
              "null",
              "string"
            ]
          },
          "districtName": {
            "type": [
              "null",
              "string"
            ]
          },
          "daysFromLastCharge": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tariffClass": {
            "type": [
              "null",
              "string"
            ]
          },
          "currentMonthTotalCharge": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "currentMonthTotalMoney": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "currentMonthEstimate": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "ECollectRequest": {
        "type": "object",
        "properties": {
          "merchant": {
            "type": "string"
          },
          "request": {
            "$ref": "#/components/schemas/ECollectRequestHeader"
          },
          "charge": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ECollectCharge"
              }
            ]
          },
          "payment": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ECollectPayment"
              }
            ]
          },
          "card": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ECollectCard"
              }
            ]
          },
          "meter": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ECollectMeter"
              }
            ]
          },
          "bill": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ECollectBill"
              }
            ]
          },
          "paymentInstrument": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ECollectPaymentInstrument"
              }
            ]
          },
          "transactionId": {
            "type": [
              "null",
              "string"
            ]
          },
          "paymentReference": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ECollectRequestHeader": {
        "type": "object",
        "properties": {
          "asyncRequestId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ECollectStatus": {
        "type": "object",
        "properties": {
          "code": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ECollectTransactionStatusResponse": {
        "type": "object",
        "properties": {
          "transactionStatus": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "transactionDate": {
            "type": [
              "null",
              "string"
            ]
          },
          "stan": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "externalTransactionId": {
            "type": [
              "null",
              "string"
            ]
          },
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "responseDate": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ECollectStatus"
              }
            ]
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "ECG Bill Payments"
    }
  ]
}