Validate VPA
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>Header
Section titled “Header”| Parameter | Type Value | Description | Value Like |
|---|---|---|---|
| Content-Type required | String | The Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data. | application/json |
Request Body
Section titled “Request Body”| Parameter | Type Value | Description | Value Like |
|---|---|---|---|
| customer_vpa required | Alphanumeric | Customer Virtual Payment Address | test@okhdfcbank |
Success 200
Section titled “Success 200”| Parameter | Type Value | Description | Value Like |
|---|---|---|---|
| status required | String | Status Code | 200 |
| vpa_name required | String | VPA Name | JACOB TARUN KOSHY |
| message required | String | Status Message | Success |
<?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;Success Response
Section titled “Success 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", }}Error Response
Section titled “Error Response” HTTP/1.1 200 OK { { "status_code":"400", "response_code":501, "status":"fail", "message":"Invalid Merchant Id", "data":[] }}