Table of Contents
For Inquiry Transactions Merchant forwards, the API request to Paybiz Payment gateway as per below sample request. Action Code for Inquiry Transactions is 5.
Request URL: https://staging.logibiztech.com:8777/maps/external/inquiry
Sample Request Body
Below are the samples based on Transaction ID, Merchant Reference ID (Track ID), Payment ID, and RRN (Original Transaction ID).
-
Java (Transaction ID)
-
Json (Transaction ID)
-
Payment ID
-
Merchant Reference ID
-
RRN
private String request() throws IOException {
URL url = new URL("https://staging.logibiztech.com:8777/maps/external/inquiry");
HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Authorization",
"Bearer OGE4Mjk0MTc0YjdlY2IyODAxNGI5Njk5MjIwMDE1Y2N8c3k2S0pzVDg=");
conn.setDoInput(true);
conn.setDoOutput(true);
String data = “{
"merchantId": "merchant1",
"terminalId": "terminal1",
"instId": "inst1",
"actionCode": 5,
"currency": "840",
"paymentInstrument": "CARD",
"tranRefType": "TRANSACTION_ID",
"tranRefValue": "923201000240001",
"instId ":"inst1”
}”
DataOutputStream wr = new DataOutputStream(conn.getOutputStream());
wr.writeBytes(data);
wr.flush();
wr.close();
int responseCode = conn.getResponseCode();
InputStream is;
if (responseCode >= 400) is = conn.getErrorStream();
else is = conn.getInputStream();
return IOUtils.toString(is);
}
{
"merchantId": "merchant1",
"terminalId": "terminal1",
"instId": "inst1",
"actionCode": 5,
"currency": "840",
"paymentInstrument": "CARD",
"tranR efType": "TRANSACTION_ID",
"tranRefValue": "923201000240001",
"instId ": "inst1"
}
{
"merchantId": "merchant1",
"terminalId": "terminal1",
"instId": "inst1",
"actionCode": 5,
"currency": "840",
"paymentInstrument": "CARD",
"tranRefType": "PAYMENT_ID",
"tranRefValue": "823201000100006"
}
{
"merchantId": "merchant1",
"terminalId": "terminal1",
"instId": "inst1",
"actionCode": 5,
"currency": "840",
"paymentInstrument": "CARD",
"tranRefType": "MERCHANT_REF_ID",
"tranRefValue": "5345535"
}
{
"merchantId": "merchant1",
"terminalId": "terminal1",
"instId": "inst1",
"actionCode": 5,
"currency": "840",
"paymentInstrument": "CARD",
"tranRefType": "RRN",
"tranRefValue": "955640106895"
}
Sample Response Body
Success scenario
[
{
"id": 0,
"toDate": "2023-07-20 00:00:11",
"fromDate": "2023-07-20 00:00:11",
"merchantId": "merchant1",
"termId": "terminal1",
"currencyCode": 840,
"amount": 24202.2,
"paymentId": "823201000100006",
"instId": "inst1",
"instPId": 21,
"threedsFlag": false,
"tranPortalId": "t2",
"merchantSuccessUrl": null,
"merchantErrorUrl": null,
"merchantRefId": "d5f24cb5-b098-44e9-ae0b22b9ec1532d0",
"merchantIntegType": null,
"password": null,
"actionCode": "PURCHASES",
"cardHolderName": "abc",
"cardNumberM ask": "424242******4242",
"cardExpiryMonth": "1*",
"cardExpiryYear": " 1***3",
"cardType": "INST1VISA",
"cardBin": 31026,
"brandId": null,
"lan gId": null,
"pmtStatus": "SUCCESS",
"currencyName": "SAR",
"areqData": null,
"aresData": null,
"creqData": null,
"cresData": null,
"vreqData": null,
"vresData": null,
"pareqData": null,
"paresData": null,
"authCode": "000000",
"paymentInstrmnt": "CARD ",
"status": null,
"custMobNum": null,
"custEmail": null,
"tranType": null,
"applePayFlag": false,
"transId": "9232010002 40001",
"extConId": null,
"responseCode": "00",
"riskRespCode": "0",
"symbol": "\u0000",
"ipAddress": "11.99.00",
"batchId": "1234",
"customField1": null,
"customField2": null,
"customField3": null,
"customField4": null,
"customField5": null,
"customField6": null,
"customField7": null,
"customField8": null,
"customField9": null,
"customField10": null,
"customField11": null,
"customField12": null,
"customField13": null,
"customField14": null,
"customField15": null,
"customField16": null,
"customField17": null,
"customField18": null,
"customField19": null,
"customField20": null,
"rrn": "955640106895"
}
]
Failure scenario
{
"errorCode":"LOG-30",
"errorDesc": "No Transaction Found"
}