Validate

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


In this API, you will provide the user’s unique registration reference along with encrypted request data and associated domain details. The request is securely identified using the NEP key and a unique transaction reference ID. Partner and domain identifiers ensure the request is routed correctly, while the encrypted data contains sensitive transaction details required for processing through the specified.

Body Parameters
{
  "nep_key": "NEPXXX",
  "refid": "TXNXXX",
  "domain": "electricity",
  "partnerId": "PARTXXX",
  "encdata": "eyJhbGci",
  "RegistrationID": "AOP-554"
}
panValidate Request
Name Type Description
nep_key String A security or encryption key used to decrypt or validate the payload. It might be temporary or session-based.
refid String A unique reference ID to trace this request. Used for logging, status checks, or reconciliation.
domain String Refers to the API domain or the service category (e.g., bill payment, banking, AEPS, etc.).
Responses

200

200

401

401


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/Validate' \
--header 'Content-Type: application/json' \
--data  '{
  "nep_key": "NEPXXX",
  "refid": "TXNXXX",
  "domain": "electricity",
  "partnerId": "PARTXXX",
  "encdata": "eyJhbGci",
  "RegistrationID": "AOP-554"
}'
                                
import requests
import json

url = 'https://api.aopay.co.in/api/AOP/Validate'
payload = json.dumps({
  "nep_key": "NEPXXX",
  "refid": "TXNXXX",
  "domain": "electricity",
  "partnerId": "PARTXXX",
  "encdata": "eyJhbGci",
  "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/Validate',
  "headers" : {
    "Content-Type" : 'application/json'
  },
  body: JSON.stringify({
    "nep_key": "NEPXXX",
    "refid": "TXNXXX",
    "domain": "electricity",
    "partnerId": "PARTXXX",
    "encdata": "eyJhbGci",
    "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/Validate')
var content = new StringContent(
  "{
    "nep_key": "NEPXXX",
    "refid": "TXNXXX",
    "domain": "electricity",
    "partnerId": "PARTXXX",
    "encdata": "eyJhbGci",
    "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/Validate',
  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 =>  '{
    "nep_key": "NEPXXX",
    "refid": "TXNXXX",
    "domain": "electricity",
    "partnerId": "PARTXXX",
    "encdata": "eyJhbGci",
    "RegistrationID": "AOP-554"
  }',
  CURLOPT_HTTPHEADER =>  array(
    'Content-Type: application/json'
  ),
));
$response =  curl_exec($curl);
curl_close($curl);
echo $response;
                                

RESPONSE

200

207

-Result

Example

{
    "code": "0x0200",
    "description": "Token Generated Successfully",
    "merchantTrxnRefId": "473fp0f3bBGipzN8PlqY8nTeS",
    "token": "473tokuOQ9gkbSOPhxqPrPO1dzXIYhW8XTRxhd0oU",
    "status": "Success"
}
                                
{
    "code": "207",
    "description": "Amount is Requaired",
    "merchantTrxnRefId": null,
    "token": null,
    "status": "False"
}