Additional HTTP POST Fields
FIELD | DESCRIPTION | EXPECTED VALUE | FIELD |
---|---|---|---|
payment_params | For miscellaneous payment parameters | variable | alphanumeric |
xml_data | Any other data that needs to be sent will be packaged as xml and put in this field | variable | XML |
‘xml_data’ Format
1 2 3 4 5 |
<payment_item_detail> <item_details detail_ref="12345" college="CollegeOfMedicine" department="Pharmacology" faculty="MrNaijaD_Class2007"> <item_detail item_id="1" item_name="Butter" item_amt="5000" bank_id="120" acct_num="1284736289" /> <item_detail item_id="2" item_name="Juice" item_amt="12000" bank_id="16" acct_num="1277731890" /> </item_details> </payment_item_detail> |
The addition of the item_amt in the split data must be the equal to the amount–transaction fee
Hence (item_amt_1 + item_amt_2 + …item_amt_X) = (Amount – TransactionFee).
This is to say, that you would like to split a specified amount after the transaction fee has been deducted.
For instance if,
Split Item 1 = N500 (destined for a UBA account – 9876543210)
Split Item 2 = N2,000 (destined for a GTBank account – 1234567890)
Transaction Fee = N300 (Interswitch Fee to be deducted from total amount before settlement)
The above scenario can be represented in XML like below:-
1 2 3 |
<input name="amount" type="hidden" value="280000" /> <item_detail item_id="1" item_name="Butter" item_amt="50000" bank_id="7" acct_num="9876543210" /> <item_detail item_id="2" item_name="Juice" item_amt="200000"bank_id="10" acct_num="1234567890" /> |
Please note, on the sandbox environment real funds are not used, hence for account number, any 10 digit number string can be used. Once Live please use only authorised account details.
For the complete list of SPLIT bank codes, click here.
Sample Request
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
<form name="form1" action=" https://sandbox.interswitchng.com/webpay/pay" method="post"> <input name="product_id" type="hidden" value="6207" /> <input name="amount" type="hidden" value="175900" /> <input name="currency" type="hidden" value="566" /> <input name="site_redirect_url" type="hidden" value="http://abc.com/page/getresponse.aspx?echo=" <input name="site_name" type="hidden" value="http://www.abc.com" /> <input name="cust_id" type="hidden" value="a" /> <input name="cust_id_desc" type="hidden" value="Value Name" /> <input name="cust_name" type="hidden" value="Name <B>Surname</B>" /> <input name="cust_name_desc" type="hidden" value="Full name" /> <input name="txn_ref" type="hidden" value="AB-12345-TD" /> <input name="pay_item_id" type="hidden" value="101" /> <input name="pay_item_name" type="hidden" value="Name of Fees/Payment" /> <input name="local_date_time" type="hidden" value="" /> <input name="hash" type="hidden" value="402D39A072B15B557D0E04E74D6F896EAA98EDFF5B81726C52F6A73C6CC729075C526CCF56EB1ADA1E 336BFA297D2288A069385BD4ED210F381B5F61135BBF0D " /> <input name="payment_params" type="hidden" value="college_split" /> <input name="xml_data" type="hidden" value=' <payment_item_detail> <item_details detail_ref="AB-12345-TD" college="College_Of_Medicine" department="PharamacyDept" faculty="MrNaijaD_Class2007"> <item_detail item_id="1" item_name="Butter" item_amt="55500" bank_id="7" acct_num="9876543210" /> <item_detail item_id="2" item_name="Juice" item_amt="11100"bank_id="10" acct_num="1234567890" /> </item_details> </payment_item_detail>' /> </form> |
PASSING TRANSACTION FEE TO THE CUSTOMER
Please note, you will be settled whatever customer was debited less the respective transaction fee. In order to pass this transaction fee to the customer, you can use the following method:-
For transaction fee N300, do the following,
Let’s say the Merchant has an item worth N4,500.
Amount to be Sent to WebPAY (Y) = 4500 + 300 = 4800
Fee = 300.
Amount Settled to Merchant = Y – Fee
= 4800 – 300 = 4500