Payment Confirmation
After the account validation has successfully responded with the account details. You can proceed to confirm the payment for the service.
Prepare Transaction Details
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 Payment Request
Send a JSON POST request to the API endpoint below;
Request Body
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
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
Handling Payment Notifications/Callbacks
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.
Last updated