This document describes into details how to integrate into iPay gateway checkout to collect customer payments from your website or mobile App.
You can use our re-direct API to process payments from MTN Mobile Money, AirtelTigo Money, Vodafone Cash, VISA and MasterCard.
This is a unique Key created by iPay and assigned to third parties for integration.
<form action="https://manage.ipaygh.com/gateway/checkout" method="post"><input type="hidden" name="merchant_key" value="PROVIDED MERCHANT KEY"><input type="hidden" name="success_url" value=""><input type="hidden" name="cancelled_url" value=""><input type="hidden" name="ipn_url" value=""><input type="hidden" name="invoice_id" value=""><input type="hidden" name="extra_name" value="customer name"><input type="hidden" name="extra_mobile" value="0240000000"><input type="hidden" name="extra_email" value="[email protected]"><input type="hidden" name="total" value="1.00"><input type="hidden" name="description" value="Sample Order"><button type="submit">Make Payment</button></form>
It is worth stressing the IPN notification from iPay is not confirmation of a payment. Rather it is a prompt that an event of interest has happened to one of your invoices.
It is your application’s responsibility to query the iPay gateway for details on the event using the status check end point. While this may sound complicated, it is not. Here’s how it works:
Once an invoice is paid or cancelled, iPay does a GET to your IPN URL with the invoice_id parameter. Suppose, your IPN url is https://test.ipaygh.com/notify and a customer pays or cancels invoice with invoice ID: AA123, iPay will perform the GET request https://test.ipay.com/notify?invoice_id=AA123. This call is meant to prompt your application that an event of interest has occurred with respect to the invoice.
Your application will then make the GET call "https://manage.ipaygh.com/gateway/json_status_chk?invoice_id=AA123&merchant_key =YOUR_MERCHANT_KEY" to receive details of the event.
iPay responds to the query in the step above with a JSON object. Details of the response object are described as part of the status check end point.
Transaction status of payment: new: - Payment transaction is new, initiated to the respective payment network paid: - Payment made successfully by customer cancelled: - Payment cancelled by customer awaiting_payment: payment pending. Customer does not complete or cancel payment. failed: - Transaction failed. Reason for failure is provided in status_reason parameter.
This parameter holds detail description for a "failed" Transaction status. For other status values, it is empty.
First name of customer. Usually empty /null since no value is passed
Last name of customer. Usually empty / null
Email address of customer. Usually empty / null
Phone number of customer. Usually empty / nul
Invoice Id of transaction
Payment amount made
Transaction timestamp on gateway
Description of payment made
Sub array of extra parameters available:
The transaction was approved by the acquirer
The transaction could not be processed for an unspecified reason that is not covered by the other response codes.
The transaction was declined by the issuing bank – the customer should contact the bank.
The processing host did not reply to the transaction request. This message is displayed after a specified time if no response is received from the issuing bank. It usually indicates that the issuing bank’s system is temporarily unavailable
The customer’s card is past its expiry date
The customer’s card has insufficient credit to cover their purchase
The transaction could not be processed due to a problem with the processing host’s system
The transaction could not be processed due to a problem with the Payment Server.
Your acquirer has blocked this BIN. Please contact the support desk for further information
This transaction has been declined due to the CSC being unacceptable to the Issuer. Cardholder should contact their bank
The transaction has been declined by the issuing bank – the cardholder should contact the bank.
merchant_key missing or empty
invoice_id missing or empty
total value missing or empty
Merchant is deactivated from receiving payments