Bill operations
Here are all bill operations. Initialization and verification are those important for managing the bill system.
post
https://testgate.ihela.online/api/v1/payments/bill/init/
Bill init
We recommend to store all the received JSON object elements in your system. Here is their explanation :
bank : The bank slug that you can dynamically get from our bank list . This is where we will send the bill for confirmation. The user parameter must then give the customer id in this bank. When this field is null or not mentioned, the system creates the bill in iHela Credit Union. Every time we have a new partnership with a bank (mobile or classic), it will be added automatically to the bank list and you will have nothing to change here.
bank_client_id: The identifier of the client in the bank if the bank is mentioned, for example in EcoCash or PesaFlash, this will be the phone number.
user : The user who will receive the bill in the iHela platform. This field accepts the username, the phone number, the email or the client ID registered in iHela.
confirmation_uri : The iHela URI where the user must confirm the BILL. He has exclusive access to that link at any time. You can redirect him directly if you want. This can be changed in newer releases if your application will be to provide an expiration DateTime value.
code : The BILL unique code, which is not yet the Bill Payment Reference. This is just to identify the uniqueness of a BILL. This must be unique in all databases for a iHela BILL.
payment_reference : This is just null a this step and will be filled after with the iHela Banking Reference for the Bill Payment Operations.
redirect_uri : Your redirect uri (if given) for redirecting the user after the confirmation. We save this to allow the user to Pay the Bill any time after the initiation and then be automatically redirected to your application.
Your redirect_uri must then make a verify call to have the Last Reference (payment_reference) for the BILL as shown bellow.
post
https://testgate.ihela.online/api/v1/payments/bill/verify/
Bill status verification

Bill confirmation callback

The merchant application will provide a callback to be used to send to the merchant API when the customer pays the bill.
This is just used if the Merchant provides a link for payment confirmation. Others will prefer to use the bill status verification section here before.
On production, the given link must be in the VPN that is set while configuring the environment.
Request sent
Response to return
1
{
2
"merchant_reference": "MERCHANT_REFERENCE",
3
"bill_code": "BILL-....",
4
"error": false,
5
"error_message": "Success",
6
"payment_reference": "WEB.BIL-1.01"
7
}
Copied!
1
{
2
"error": false,
3
"error_message": "Success"
4
}
Copied!
We send the merchant reference and the bill code for verification, then the bill status. If the bill has been paid successfully, we send "error": false else we send "error": true. The error_message contains then the reason of the failure.
The response will return "error": true when the merchant can't process the payment on his side. Then we will automatically refund the money to the client.
The payment_reference contains the bank reference of the transaction that can be checked in the merchant account statement. When there is error, it will be send as null.
Last modified 2mo ago