Form Creation
- Create a form in the location that the <PAY NOW> button should appear
- Set the form’s action to <https://sandbox.interswitchng.com/webpay/pay>
- Set the form’s HTTP method to POST
- Create hidden fields with details shown the table below. Note that only 7 fields are mandatory .i.e.
- product_id,
- amount,
- currency,
- site_redirect_url,
- txn_ref, hash and
- pay_item_id
- Create a submit button in the form.
1 2 3 4 5 6 7 8 9 10 11 |
<form name="form1" action="https://sandbox.interswitchng.com/webpay/pay" method="POST"> <input name="product_id" type="hidden" value="6207" /> <input name="pay_item_id" type="hidden" value="103" /> <input name="amount" type="hidden" value="50000" /> <input name="currency" type="hidden" value="566" /> <input name="site_redirect_url" type="hidden" value="http://abc.com/getresponse” /> <input name="txn_ref" type="hidden" value="AB-12385_TT" /> <input name="cust_id" type="hidden" value="AD99" /> <input name="hash" type="hidden" value="B48FEE432779ED2B2532677AD49C45EC03541B4555D6F439C1174B8F3D7A83E4B9B40223538E1EB5D834A7C1D04A32E984A41DBE2D8565B129B013BE1D1456DF" /> <input type="submit" value="PAY NOW"></input> </form> |
For complete list of merchant details when sending request, click here
Details on how to calculate hash are located here