openapi: 3.0.1 info: title: madapi-mtn-tmf678-customer-bill-management-aggregator description: "Used to facilitate the capability for consumers to retrieve bill information\ \ at service level, account level or invoice level etc" license: name: MADAPI url: https://developers.mtn.com/ version: 1.0.0 servers: - url: https://api.mtn.com/ paths: /customerBill/validate: post: tags: - customer-bill-management-service-controller summary: 'Provides the ability for a consumer to validate invoice ' description: Provides the ability for a consumer to validate the content of the invoice to ensure all content are properly in oder before sending for signing. operationId: validateInvoice parameters: - name: transactionId in: header required: false schema: type: string default: "" - name: targetSystem in: header required: false schema: type: string default: "" - name: countryCode in: header required: false schema: type: string default: "" requestBody: content: application/json: schema: $ref: '#/components/schemas/InvoiceRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/InvoiceResponse' application/pdf: schema: $ref: '#/components/schemas/InvoiceResponse' "400": description: Bad Request content: application/json: schema: $ref: '#/components/schemas/BadRequestErrorResponse' "401": description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedErrorResponse' "500": description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ServerErrorResponse' /customerBill/sign: post: tags: - customer-bill-management-service-controller summary: 'Provides the ability for a consumer to sign invoice ' description: This Post operation provides the ability for a consumer to sign and submit an invoice after validating the content of the invoice to ensure all is in oder. operationId: signInvoice parameters: - name: transactionId in: header required: false schema: type: string default: "" - name: targetSystem in: header required: false schema: type: string default: "" - name: countryCode in: header required: false schema: type: string default: "" requestBody: content: application/json: schema: $ref: '#/components/schemas/InvoiceRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/InvoiceResponse' application/pdf: schema: $ref: '#/components/schemas/InvoiceResponse' "400": description: Bad Request content: application/json: schema: $ref: '#/components/schemas/BadRequestErrorResponse' "401": description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedErrorResponse' "500": description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ServerErrorResponse' /customerBill/irnValidate: post: tags: - customer-bill-management-service-controller summary: 'Provides the ability for a consumer to validate irn ' description: "This Post operation method provides the consumer with the capabilities\ \ of validating irn(invoice reference number) provided that is, it is valid." operationId: validateIrn parameters: - name: transactionId in: header required: false schema: type: string default: "" - name: targetSystem in: header required: false schema: type: string default: "" - name: countryCode in: header required: false schema: type: string default: "" requestBody: content: application/json: schema: $ref: '#/components/schemas/InvoiceRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/InvoiceResponse' application/pdf: schema: $ref: '#/components/schemas/InvoiceResponse' "400": description: Bad Request content: application/json: schema: $ref: '#/components/schemas/BadRequestErrorResponse' "401": description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedErrorResponse' "500": description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ServerErrorResponse' /customerBill/create: post: tags: - customer-bill-management-service-controller summary: Creates a new invoice in the system description: "This operation is utilized for creating a new invoice in the system,\ \ storing it in the system and a confirmation with the invoice ID(unique identifier)\ \ and status is send as a response." operationId: createInvoice parameters: - name: transactionId in: header required: false schema: type: string default: "" - name: targetSystem in: header required: false schema: type: string default: CFIS - name: countryCode in: header required: false schema: type: string default: "" requestBody: content: application/json: schema: $ref: '#/components/schemas/InvoiceRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/InvoiceResponse' "400": description: Bad Request content: application/json: schema: $ref: '#/components/schemas/BadRequestErrorResponse' "401": description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedErrorResponse' "500": description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ServerErrorResponse' /customerBill/{id}: get: tags: - customer-bill-management-service-controller summary: "Provides the ability for a consumer to retrieve list of paid and unpaid\ \ bill amount, advance payment amount and total due amount." description: "Provides the ability for a consumer to retrieve list of paid and\ \ unpaid bill amount, advance payment amount and total due amount." operationId: customerBillById parameters: - name: id in: path required: true schema: type: string - name: transactionId in: header required: false schema: type: string default: "" - name: targetSystem in: header required: false schema: type: string default: "" - name: countryCode in: header required: false schema: type: string default: "" - name: x-origin-channelid in: header required: false schema: type: string default: "" - name: systemId in: header required: false schema: type: string default: "" - name: customerType in: query required: false schema: type: string default: "" - name: queryType in: query required: false schema: type: string default: "" - name: offset in: query required: false schema: type: integer format: int32 default: 1 - name: limit in: query required: false schema: type: integer format: int32 default: 300 - name: billingFlag in: query required: false schema: type: string default: "" - name: startDate in: query required: false schema: type: string default: "" - name: endDate in: query required: false schema: type: string default: "" - name: billCycleId in: query required: false schema: type: string default: "" - name: custom in: query required: false schema: type: string default: "" - name: billingAccountId in: query required: false schema: type: string default: "" - name: quoteId in: query required: false schema: type: string default: "" - name: receivingCustomerId in: query required: false schema: type: string default: "" - name: product in: query required: false schema: type: string default: "" - name: transactionType in: query required: false schema: type: string default: "" - name: message in: query required: false schema: type: string default: "" - name: amountType in: query required: false schema: type: string default: "" - name: amount in: query required: false schema: type: string default: "" - name: currency in: query required: false schema: type: string default: "" responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/APIResponse' application/pdf: schema: $ref: '#/components/schemas/APIResponse' "400": description: Bad Request content: application/json: schema: $ref: '#/components/schemas/BadRequestErrorResponse' "401": description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedErrorResponse' "500": description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ServerErrorResponse' patch: tags: - customer-bill-management-service-controller summary: Provides the ability for a consumer to update postpaid bill balance description: 'This PatchMapping operation method provides the ability for a consumer to update the account''s postpaid bill balances. ' operationId: patchCustomerBillWithId parameters: - name: id in: path required: true schema: type: string - name: transactionId in: header required: false schema: type: string default: "" - name: targetSystem in: header required: false schema: type: string default: "" - name: countryCode in: header required: false schema: type: string default: "" - name: x-origin-channelid in: header required: false schema: type: string default: "" - name: x-authorization-claims in: header required: false schema: type: string default: "" - name: channelName in: header required: false schema: type: string default: "" requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateBillRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/APIResponse' "400": description: Bad Request content: application/json: schema: $ref: '#/components/schemas/BadRequestErrorResponse' "401": description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedErrorResponse' "500": description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ServerErrorResponse' /customerBill: get: tags: - customer-bill-management-service-controller summary: Provides the ability for a consumer to retrieve account balance information description: "Provides the ability for a consumer to retrieve list of unpaid\ \ bill amount, advance payment amount and total due amount." operationId: customerBill parameters: - name: transactionId in: header required: false schema: type: string default: "" - name: targetSystem in: header required: false schema: type: string default: "" - name: countryCode in: header required: false schema: type: string default: "" - name: x-origin-channelid in: header required: false schema: type: string default: "" - name: customerType in: query required: true schema: type: string - name: customerId in: query required: true schema: type: string - name: queryType in: query required: false schema: type: string default: completeBill - name: offset in: query required: false schema: type: integer format: int32 default: 0 - name: limit in: query required: false schema: type: integer format: int32 default: 0 - name: billingFlag in: query required: false schema: type: string default: "" - name: startDate in: query required: false schema: type: string default: "" - name: endDate in: query required: false schema: type: string default: "" - name: billCycleId in: query required: false schema: type: string default: "" - name: custom in: query required: false schema: type: string default: "" - name: correlationId in: query required: false schema: type: string default: "" responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/APIResponse' "400": description: Bad Request content: application/json: schema: $ref: '#/components/schemas/BadRequestErrorResponse' "401": description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedErrorResponse' "500": description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ServerErrorResponse' /customerBill/activation/status: get: tags: - customer-bill-management-service-controller summary: 'Provides the ability for a consumer to retrieve Activation Status ' description: 'This GetMapping operation method provides the consumer with the ability of retrieving the debit Activation Status. ' operationId: autoDebitActivationStatus parameters: - name: customerType in: query required: false schema: type: integer format: int32 - name: customerId in: query required: false schema: type: string default: "" - name: queryType in: query required: false schema: type: string default: "" responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/APIResponse' application/pdf: schema: $ref: '#/components/schemas/APIResponse' "400": description: Bad Request content: application/json: schema: $ref: '#/components/schemas/BadRequestErrorResponse' "401": description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedErrorResponse' "500": description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ServerErrorResponse' components: schemas: AccountingCustomerParty: type: object properties: partyName: type: string tin: type: string email: type: string telephone: type: string businessDescription: type: string postalAddress: $ref: '#/components/schemas/PostalAddress' AccountingSupplierParty: type: object properties: partyName: type: string tin: type: string email: type: string telephone: type: string businessDescription: type: string postalAddress: $ref: '#/components/schemas/PostalAddress' AllowanceCharge: type: object properties: chargeIndicator: type: boolean amount: type: number format: double BillingReference: type: object properties: irn: type: string issueDate: type: string ContractDocumentReference: type: object properties: irn: type: string issueDate: type: string DispatchDocumentReference: type: object properties: irn: type: string issueDate: type: string DocumentReference: type: object properties: irn: type: string issueDate: type: string InvoiceDeliveryPeriod: type: object properties: startDate: type: string endDate: type: string InvoiceLine: type: object properties: hsnCode: type: string productCategory: type: string discountRate: type: number format: double discountAmount: type: integer format: int32 feeRate: type: number format: double feeAmount: type: integer format: int32 invoicedQuantity: type: integer format: int32 lineExtensionAmount: type: integer format: int32 item: $ref: '#/components/schemas/Item' price: $ref: '#/components/schemas/Price' InvoiceRequest: type: object properties: businessId: type: string irn: type: string invoiceReference: type: string issueDate: type: string dueDate: type: string issueTime: type: string invoiceTypeCode: type: string paymentStatus: type: string note: type: string taxPointDate: type: string documentCurrencyCode: type: string taxCurrencyCode: type: string accountingCost: type: string buyerReference: type: string invoiceDeliveryPeriod: $ref: '#/components/schemas/InvoiceDeliveryPeriod' orderReference: type: string billingReference: type: array items: $ref: '#/components/schemas/BillingReference' dispatchDocumentReference: $ref: '#/components/schemas/DispatchDocumentReference' receiptDocumentReference: $ref: '#/components/schemas/ReceiptDocumentReference' originatorDocumentReference: $ref: '#/components/schemas/OriginatorDocumentReference' contractDocumentReference: $ref: '#/components/schemas/ContractDocumentReference' documentReference: type: array items: $ref: '#/components/schemas/DocumentReference' accountingSupplierParty: $ref: '#/components/schemas/AccountingSupplierParty' accountingCustomerParty: $ref: '#/components/schemas/AccountingCustomerParty' actualDeliveryDate: type: string paymentMeans: type: array items: $ref: '#/components/schemas/PaymentMean' paymentTermsNote: type: string allowanceCharge: type: array items: $ref: '#/components/schemas/AllowanceCharge' taxTotal: type: array items: $ref: '#/components/schemas/TaxTotal' legalMonetaryTotal: $ref: '#/components/schemas/LegalMonetaryTotal' invoiceLine: type: array items: $ref: '#/components/schemas/InvoiceLine' Item: type: object properties: name: type: string description: type: string sellersItemIdentification: type: string LegalMonetaryTotal: type: object properties: lineExtensionAmount: type: number format: double taxExclusiveAmount: type: integer format: int32 taxInclusiveAmount: type: integer format: int32 payableAmount: type: integer format: int32 OriginatorDocumentReference: type: object properties: irn: type: string issueDate: type: string PaymentMean: type: object properties: paymentMeansCode: type: string paymentDueDate: type: string PostalAddress: type: object properties: streetName: type: string cityName: type: string postalZone: type: string country: type: string Price: type: object properties: priceAmount: type: integer format: int32 baseQuantity: type: integer format: int32 priceUnit: type: string ReceiptDocumentReference: type: object properties: irn: type: string issueDate: type: string TaxCategory: type: object properties: id: type: string percent: type: number format: double TaxSubtotal: type: object properties: taxableAmount: type: integer format: int32 taxAmount: type: integer format: int32 taxCategory: $ref: '#/components/schemas/TaxCategory' TaxTotal: type: object properties: taxAmount: type: number format: double taxSubtotal: type: array items: $ref: '#/components/schemas/TaxSubtotal' APIError: type: object properties: sequenceNo: type: string transactionId: type: string path: type: string error: type: object status: type: string timestamp: type: string InvoiceResponse: type: object properties: resultCode: type: string result: $ref: '#/components/schemas/Result' transactionId: type: string sequenceNo: type: string apiError: $ref: '#/components/schemas/APIError' Result: type: object properties: resultDescription: type: string resultCode: type: string ServiceRequestDetails: type: object properties: requestLevel: type: string notes: type: string validFor: $ref: '#/components/schemas/ValidFor' uppeLimit: type: integer format: int32 entityCode: type: string entityLevel: type: integer format: int32 orderStatus: type: string requestType: type: string enum: - OPTOUT - OPTIN - DEFAULT autoDebitType: type: string enum: - bankCard - account - wallet - DEFAULT ValidFor: type: object properties: endDate: type: string startDate: type: string APIResponse: type: object properties: content: type: object statusCode: type: string timestamp: type: string status: type: string error: type: string message: type: string path: type: string _links: $ref: '#/components/schemas/Links' Links: type: object additionalProperties: $ref: '#/components/schemas/Link' Amount: type: object properties: amount: type: string unit: type: string Atm: type: object properties: bankName: type: string branchCode: type: string atmCode: type: string Bank: type: object properties: bankName: type: string bankCode: type: string branchCode: type: string paymentMode: type: string BankCard: type: object properties: brand: type: string type: type: string cardNumber: type: string expirationDate: type: string cvv: type: string lastFourDigits: type: string nameOnCard: type: string bank: type: string issuer: type: string Cash: type: object properties: centerName: type: string centerCode: type: string Cheque: type: object properties: chequeNumber: type: string issueDate: type: string expiryDate: type: string accountNumber: type: string bankCode: type: string Details: type: object properties: bank: $ref: '#/components/schemas/Bank' cash: $ref: '#/components/schemas/Cash' atm: $ref: '#/components/schemas/Atm' cheque: $ref: '#/components/schemas/Cheque' bankCard: $ref: '#/components/schemas/BankCard' tokenizedCard: $ref: '#/components/schemas/TokenizedCard' InvoiceDetails: type: object properties: invoiceNumber: type: string amount: $ref: '#/components/schemas/Amount' Payment: type: object properties: id: type: string paymentRef: type: array items: $ref: '#/components/schemas/PaymentRef' billNumber: type: string transactionDate: type: string paidAmount: $ref: '#/components/schemas/Amount' paymentMethod: $ref: '#/components/schemas/PaymentMethod' PaymentMethod: type: object properties: name: type: string description: type: string type: type: string details: $ref: '#/components/schemas/Details' PaymentRef: type: object properties: referenceId: type: string referenceType: type: string referenceName: type: string TokenizedCard: type: object properties: brand: type: string type: type: string lastFourDigits: type: string tokenType: type: string token: type: string issuer: type: string pan: type: string tokenUserId: type: string registrationDate: type: string status: type: string UpdateBillRequest: type: object properties: idType: type: string id: type: string phoneNumber: type: string totalPaidAmount: $ref: '#/components/schemas/Amount' payment: type: array items: $ref: '#/components/schemas/Payment' invoiceDetails: type: array items: $ref: '#/components/schemas/InvoiceDetails' serviceRequestDetails: $ref: '#/components/schemas/ServiceRequestDetails' lastUpdate: type: string reference: type: string payment_status: type: string BadRequestErrorResponse: type: object properties: statusCode: type: string example: "5000" statusMessage: type: string example: INVALID_INPUT_PARAMETERS supportMessage: type: string example: The input parameters provided are invalid. httpStatus;: type: object example: code: 400 series: CLIENT_ERROR reason: Bad Request timestamp: type: string example: 2025-08-05T20:57:21Z UnauthorizedErrorResponse: type: object properties: statusCode: type: string example: "4000" statusMessage: type: string example: Unauthorized supportMessage: type: string example: The supplied authentication is invalid. httpStatus;: type: object example: code: 401 series: CLIENT_ERROR reason: Unauthorized timestamp: type: string example: 2025-08-05T20:57:21Z ServerErrorResponse: type: object properties: statusCode: type: string example: "3001" statusMessage: type: string example: INTERNAL_SERVER_ERROR supportMessage: type: string example: An internal server error occurred and processing could not be completed. httpStatus;: type: array example: code: 500 series: SERVER_ERROR reason: Internal Server Error timestamp: type: string example: 2025-08-05T20:57:21Z Link: type: object properties: href: type: string hreflang: type: string title: type: string type: type: string deprecation: type: string profile: type: string name: type: string templated: type: boolean