Table of Contents
PayBiz also offers comprehensive reversal transaction functionality for merchants. Below, you’ll find detailed descriptions of the reversal flows provided by PayBiz.
Customer provides any one of the Transaction Id, RRN, Merchant Reference Id, and Payment Id (From the response of successful purchase transaction) along with the Amount, Transaction Portal Id and Password. Once the transaction complete, PG provide the response accordingly.
Merchant displays transaction result to customer. Below is the sample request and response parameters Request URL:
-
Java
-
Json
private String request() throws IOException {
URL url = new URL("https://staging.logibiztech.com:8777/transaction/request-payment-url");
HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Authorization",
"Bearer OGE4Mjk0MTc0YjdlY2IyODAxNGI5Njk5MjIwMDE1Y2N8c3k2S0pzVDg=");
conn.setDoInput(true);
conn.setDoOutput(true);
String data = {
"tranPortalId": "t2",
"password": "password",
"actionCode": 2,
"amount": "590.2",
"tranRefType":”TRANSACTION_ID”,
"tranRefValue": "9231867155 30001"
}”
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);
}
{
"tranPortalId": "t2",
"password": "password",
"actionCode": 2,
"amount": "590.2",
"tranRefType":"TRANSACTION_ID",
"tranRefValue": "9231867155 30001"
}
Response
Success scenario
{
"responseMessage": "Payment Successful!",
"status": "SUCCESS",
"merchantRefId": "887171",
"paymentId": "823186729590001",
"txnTime": "2023-07-05T16:16:03",
"amount": "234.0",
"responseCode": null,
"rrn": "183035212860",
"originalTxnId": "183035212860",
"currencyCode": "840",
"trxnId": null
}
Failure scenario
{
"errorCode": "LOG-300",
"errorDesc": "Invalid Reversal Amount"
}