Transaction Payment Leg
To make use of the new WebPAY payment page, kindly make use of the same request structure as the old WebPAY (for more details on payment POST request structure, click here).
However, the only difference is that your request should be sent to below service URLs:-
Payment URL for New WebPAY
TEST Payment URL | https://sandbox.interswitchng.com/collections/w/pay |
---|---|
TEST Query URL (JSON) | https://sandbox.interswitchng.com/collections/api/v1/gettransaction.json |
LIVE Payment URL | https://webpay.interswitchng.com/collections/w/pay |
LIVE Query URL (JSON) | https://webpay.interswitchng.com/collections/api/v1/gettransaction.json |
Test Merchant Details are also below:-
1.5% Fee New WebPAY Details (NO SPLIT XML)
1.5% to a cap of N2,000 Transaction Fee for New WebPAY Details (NO SPLIT XML)Field Name | Expected Value | Comments |
---|---|---|
product_id | 1076 | |
pay_item_id | 101 | |
Mac Key | D3D1D05AFE42AD50818167EAC73C109168A0F108F32645C8B59E897FA930DA44F9230910DAC9E20641823799A107A02068F7BC0F4CC41D2952E249552255710F |
All other details remain the same.
1 2 3 4 5 6 7 8 9 10 |
<form name="form1" action="https://sandbox.interswitchng.com/collections/w/pay" method="post"> <input name="product_id" type="hidden" value="1076" /> <input name="pay_item_id" type="hidden" value="101" /> <input name="amount" type="hidden" value="50000" /> <input name="currency" type="hidden" value="566" /> <input name="site_redirect_url" type="hidden" value="http://www.mycompany.com/response/”/> <input name="txn_ref" type="hidden" value="AB-12385_TT" /> <input name="cust_id" type="hidden" value="AD99" > <input name="hash" type="hidden" value="62D36BDC4B7C805844E3E8C813166BD8B42F9D3E768F349EC4FB174084BC9C2027338DA875A460E843A68FA85C15FB1E0195F2B98ECC6F40D0408D719F9D7E5D" /> </form> |
Server Response – ResponseDescription & ResponseCode returned
After payment, details of the transaction are returned to the merchant website for processing.This is done in the form of a HTTP POST request sent to the site_redirect_url.
1 2 3 4 5 6 7 8 9 10 11 12 |
Array ( [txnref] => JB9445755 [resp] => Z1 [payRef] => JB9445755 [desc] => Customer cancellation [retRef] => [cardNum] => [apprAmt] => 123400 [amount] => 123400 [mac] => ) |
1 2 3 4 5 6 7 8 9 10 11 12 |
Array ( [txnref] => JB1692583 [resp] => 00 [payRef] => ECO|WEB|WEBDEMO|12-09-2017|152610|128556 [desc] => Approved by Financial Institution [retRef] => 000560296399 [cardNum] => [apprAmt] => 66600 [amount] => 66600 [mac] => ) |
Transaction Confirmation Leg
Transaction confirmation is done the same way as with old WebPAY (for more details on transaction confirmation GET request structure, click here).
Request URL
HTTP GET -> https://sandbox.interswitchng.com/collections/api/v1/gettransaction.json?productid=1076&transactionreference=JB1692583&amount=66600
Host: sandbox.interswitchng.com
Hash: 29EC8A9728F385672D1774B8860626C706E7B7E73C059C46AE4272E06AECEA2D4D1A417C37A303AA14767B082A0B8AF1D81895740B3442C732D4531D54E2474E
Sample Responses:-
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
Array ( [Amount] => 66600 [CardNumber] => [MerchantReference] => JB1692583 [PaymentReference] => ECO|WEB|WEBDEMO|12-09-2017|152610|128556 [RetrievalReferenceNumber] => 000560296399 [SplitAccounts] => Array ( ) [TransactionDate] => 2017-09-12T01:33:24 [ResponseCode] => 00 [ResponseDescription] => Approved by Financial Institution ) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
Array ( [Amount] => 123400 [CardNumber] => [MerchantReference] => JB8577679 [PaymentReference] => FBN|WEB|WEBDEMO|12-09-2017|152611|107120 [RetrievalReferenceNumber] => 000560297572 [SplitAccounts] => Array ( ) [TransactionDate] => 2017-09-12T01:40:06 [ResponseCode] => 61 [ResponseDescription] => Exceeds Withdrawal Limit ) |
You can find a complete working script in the Sample Code section.