Transaction Status

📘

Header Request

secret : Unique secret key (Provided by Pay2New)

Request Parameters

ParametersTypeMandatory (M) , Optional(O)Description
client_txn_idStringMClient transaction Id

Sample Request

curl --location 'https://pay2new.in/apis/v1/transactionStatus' \
--header 'secret: qwertyuQWERTY12345asdf' \
--header 'Content-Type: application/json' \
--data '{
    "client_txn_id" : "123456789"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://pay2new.in/apis/v1/transactionStatus',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "client_txn_id" : "123456789"
}',
  CURLOPT_HTTPHEADER => array(
    'secret: qwertyuQWERTY12345asdf',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response Parameter

ParametersTypeDescription
statusIntegerPay2new Status Code
messageStringMessage from API
orderArrayResponse Data (If Present)

Sample Response

{
    "status": 1,
    "message": "Transaction Found!",
    "order": {
        "number": "123456789",
        "amount": "0.0000",
        "status": "1",
        "order_id": "P2N5452534158DFOLASDF",
        "request_id": "P2N54544444545",
        "optional1": "",
        "optional2": "",
        "optional3": "",
        "optional4": "",
        "message": "Transaction Successful",
        "operator_reference": null,
        "customer_number": "9876543210",
        "cashback": "0.0000",
        "charge": "0.0000",
        "tds": "0.0000",
        "closing_balance": "5214.8967"
    }
}
Language
Click Try It! to start a request and see the response here!