Skip to content

Validate VPA

| View as Markdown

This API is for validating VPA – Virtual Private Address i.e UPI id of a customer for UPI payments online. If UPI id is not valid, then no payment can be done.

https://kraken.airpay.co.in/airpay/pay/v4/api/vpavalidate/?token=<access_token>
ParameterType ValueDescriptionValue Like
Content-Type requiredStringThe Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data.application/json
ParameterType ValueDescriptionValue Like
customer_vpa requiredAlphanumericCustomer Virtual Payment Addresstest@okhdfcbank
ParameterType ValueDescriptionValue Like
status requiredStringStatus Code200
vpa_name requiredStringVPA NameJACOB TARUN KOSHY
message requiredStringStatus MessageSuccess
<?php
$merchant_id = "<merchant_id>";
$username = "<username>";
$password = "<password>";
$secret = "<secret>";
$secretKey = '<secretKey>';
$data = array();
$data['customer_vpa'] = "customer@abcbank";
$privatekey = hash('sha256', $secret.'@'.$username.':|:'.$password);
$encdata = encrypt(json_encode($data), $secretKey);
$checksum = checksum($data);
$payload = [
'merchant_id'=>$merchant_id,
'encdata' => $encdata,
'checksum' => $checksum,
'privatekey' => $privatekey
];
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://kraken.airpay.co.in/airpay/pay/v4/api/vpavalidate/?token=<access_token>',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => $payload
));
$result = curl_exec($curl);
curl_close($curl);
$response = json_decode($result)->response;
HTTP/1.1 200 OK
{
"status_code": "200",
"response_code": "00",
"status": "Success",
"message": "success",
"data": {
"status" : "200",
"vpa_name" : "JACOB TARUN KOSHY",
"message" : "Success",
}
}
HTTP/1.1 200 OK
{
{
"status_code":"400",
"response_code":501,
"status":"fail",
"message":"Invalid Merchant Id",
"data":[]
}
}