PG Transaction Status

Post  https://api.aopay.co.in/api/AOP/PGTransactionStatus3


In this API, you will pass the 'PGOrderID'—received from the order creation response—as a request parameter, and the response will return the status of the transaction.

Body Parameters
{
  "txnID": "CMP1045_WA_AOP-554_TERF112764",
  "RegistrationID": "AOP-554"
}
Request Parameters
Name Type Description
txnID String Transaction ID – A unique identifier for a transaction, which in this case refers to the 'PGOrderID' from the response.
RegistrationID String Unique registration identifier, often tied to the user.
Responses

200

200

403

403


Did this page help you?     Yes    No

Language
shell Shell
python Python
node Node
c# C#
php PHP

cURL

curl --location 'https://api.aopay.co.in/api/AOP/PGTransactionStatus3' \
--header 'Content-Type: application/json' \
--data  '{
  "txnID": "CMP1045_WA_AOP-554_TERF112764",
  "RegistrationID": "AOP-554"
}'
                                
import requests
import json

url = 'https://api.aopay.co.in/api/AOP/PGTransactionStatus3'
payload = json.dumps({
  "txnID": "CMP1045_WA_AOP-554_TERF112764",
  "RegistrationID": "AOP-554"
}) 

headers = {
  "Content-type" : "application/json"
}

response = requests.request("POST", url, headers=headers, data=payload)

print (response.text)
                                
var requests = require("request");
var options = { 
  "method" : "POST",
  "url" : 'https://api.aopay.co.in/api/AOP/PGTransactionStatus3',
  "headers" : {
    "Content-Type" : 'application/json'
  },
  body: JSON.stringify({
    "txnID": "CMP1045_WA_AOP-554_TERF112764",
    "RegistrationID": "AOP-554"
  }) 
}; 
request(options, function(error, response){
   if(error) throw new Error(error);
   console.log(response.body); 
}); 
                                
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post,'https://api.aopay.co.in/api/AOP/PGTransactionStatus3')
var content = new StringContent(
  "{
    "txnID": "CMP1045_WA_AOP-554_TERF112764",
    "RegistrationID": "AOP-554"
  }",
  null,"application/json"
); 

request.Content = content;
var response =  await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
                                
<?php
$curl =  curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL =>  'https://api.aopay.co.in/api/AOP/PGTransactionStatus3',
  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 =>  '{
    "txnID": "CMP1045_WA_AOP-554_TERF112764",
    "RegistrationID": "AOP-554"
  }',
  CURLOPT_HTTPHEADER =>  array(
    'Content-Type: application/json'
  ),
));
$response =  curl_exec($curl);
curl_close($curl);
echo $response;
                                

RESPONSE

200

403

-Result

Example

{    
     "transDate": "2024-07-04 11:11:44.0",
     "payerName": "NARENDRA",
     "payerEmail": "techsupport@AOP.center",
     "payerMobile": "9936788496",
     "clientTxnIds": "CMP1045_WA_AOP-554_TERF112895",
     "amount": "10.0",
     "paidAmount": "10.0",
     "ServiceCharge": "2.95",
     "paymentMode": "BHIM UPI QR",
     "status": "SUCCESS",
     "responseCode": "0000",
     "ResponseMessage": "Transaction successfully",
     "Status": "SUCCESS",
     "message": "Transaction successfully",
     "Value": ""
} 
{
    "Status": "403",
    "code": null,
    "Message": "Pay Customer Name is Required",
    "PGOrderID": null,
    "PreparePOSTForm": null
}