Payment Confirmation
After the account validation has successfully responded with the account details. You can proceed to confirm the payment for the service.
Last updated
After the account validation has successfully responded with the account details. You can proceed to confirm the payment for the service.
Last updated
Payment confirmation requires the PIN to be sent as part of the request. This PIN is shared in the account approval email. The PIN parameter is sent as a sha1 hash string converted to upper case. Below is pseudocode to describe how the hash is created.
Send a JSON POST request to the API endpoint below;
As mentioned in the registration section, the API is asynchronous. The 202 response is an acknowledgement of your request. The EllyPay will send a payment notification with the updated status of the transaction. The notification data has the same structure as the acknowledgement response above with the addition of the details object that could hold extra data about the transaction. A sample is shared below
Whenever the status of the transaction changes (to failure or success), we notify your service via callbacks. Below are the hints to take note of as regards these payment notifications.
All callbacks are sent to the callback URL you provide during registration.
A secure callback URL is required and notifications will ONLY be sent to https URLs. If you don't receive these notifications, ensure to check this.
The callback request is a POST with JSON encoded data.
We expect that your service will acknowledge the callback request by responding with HTTP code 200 otherwise we will retry a few more times (if the response code is below the 500 range) and then stop.
The callback request includes an extra header ellypay-signature
and this can optionally be used to verify that the callback request originated from our servers. If the signature is valid, you can proceed with your business logic.
The next section describes the signature verification procedure.
Parameter
Type
Description
Required
validation_reference
string
The validation reference returned in the validation procedure here. This reference is generated by EllyPay
YES
pin
string
The sha1 hash value of the PIN as described in the above section
YES
secret_code
string
This one is a special parameter that applies to Airtel Money Withdraw transactions. The customer secret code should be Base64 encoded before sending the API request.
NO
Parameter
Type
Description
id
integer
The transaction ID
amount
float
The transaction amount
product_code
string
The code of the product for which the payment has been done
product_name
string
The name of the product
agent_reference
string
The reference from your system. This is the value that's sent for the prior validation request.
internal_reference
string
The unique reference generated by EllyPay for the transaction
agent_commission
float
The commission to be earned by the transacting account (where applicable)
status
string
The status of the transaction. Value can be one of; PENDING, FAILED, CANCELLED or SUCCESSFUL
message
string
Message describing the status of the transaction