Billpayment
Introduction
Invoice payment API contains the methods that allow you to obtain and pay invoices pending payment. payment of these invoices. There are two workflows depending on whether it is Postpaid or Prepaid.
The workflow to be followed and the methods required, as well as the fields requested and the answers with their explanation and format, are detailed below. explanation and format, are detailed below.
Requesting user invoices
The first thing to do is to check the outstanding invoices of a user by means of the nic for which the operation is going to be done. To do this we have the method "Get Invoices".
Total Payments
Total payment labels are the simplest, as they always display the total amount owed, which will be the amount ultimately paid. They require no further customization, as the logic is straightforward: the customer must settle the entire debt.
Discrete Payments
For discrete payments, labels must reflect the breakdown of available invoices, allowing for the selection of one or more invoices to pay without requiring the full debt to be settled. This means labels should dynamically adjust based on the number of invoices, displaying terms such as "Partial Debt," "Selected Invoice," and "Total Outstanding."
Open Payments
The most complex case is the Wallet, as the balance, both before and after specifying the amount to be paid, can be either positive or negative, and labels need to reflect this variability.
Completing the sale
The last method is "pay" method indicating the registration id returned in the previous step. returned in the previous step. This method will return the result of the sale.