Skip to main content
POST
/
payout
/
v1
/
validatePayout
Validate Payout V1
curl --request POST \
  --url https://payout-api.cashfree.com/payout/v1/validatePayout \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "transferId": "JUNOB2018142",
  "vpa": "success@upi",
  "phone": "9999999999"
}
'
import requests

url = "https://payout-api.cashfree.com/payout/v1/validatePayout"

payload = {
"transferId": "JUNOB2018142",
"vpa": "success@upi",
"phone": "9999999999"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({transferId: 'JUNOB2018142', vpa: 'success@upi', phone: '9999999999'})
};

fetch('https://payout-api.cashfree.com/payout/v1/validatePayout', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://payout-api.cashfree.com/payout/v1/validatePayout",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'transferId' => 'JUNOB2018142',
'vpa' => 'success@upi',
'phone' => '9999999999'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://payout-api.cashfree.com/payout/v1/validatePayout"

payload := strings.NewReader("{\n \"transferId\": \"JUNOB2018142\",\n \"vpa\": \"success@upi\",\n \"phone\": \"9999999999\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://payout-api.cashfree.com/payout/v1/validatePayout")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"transferId\": \"JUNOB2018142\",\n \"vpa\": \"success@upi\",\n \"phone\": \"9999999999\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://payout-api.cashfree.com/payout/v1/validatePayout")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"transferId\": \"JUNOB2018142\",\n \"vpa\": \"success@upi\",\n \"phone\": \"9999999999\"\n}"

response = http.request(request)
puts response.read_body
{
  "status": "SUCCESS",
  "subCode": "200",
  "message": "vpa details retrieved successfully",
  "data": {
    "transferToken": "91328624-74e1-4f27-85cc-0c4166827cf7",
    "vpa": "success@upi",
    "accountStatus": "VALID",
    "nameAtBank": "JOHN SNOW"
  }
}

Headers

Authorization
string
required

Bearer token returned by the Authorize API (POST /payout/v1/authorize).

Example:

"Bearer eyJhbGciOiJIUzM4NCIsInR5cCI6IkpXVCJ9..."

Content-Type
string
required

MIME type of the request or response content.

Example:

"application/json"

X-Request-Id
string

Optional. Identifier for request tracing between your systems and Cashfree Support.

Body

application/json

Identifies this validation attempt and the beneficiary to resolve on UPI. Send transferId plus exactly one of vpa or phone.

transferId
string
required

Merchant-defined identifier for this payout attempt. Use only letters, numbers, hyphens, and underscores. Maximum 40 characters.

Example:

"JUNOB2018142"

vpa
string

Virtual Payment Address (VPA) on UPI to validate. In the request body, pass the value for exactly one of vpa or phone, not both.

Example:

"success@upi"

phone
string

Phone number used to resolve the beneficiary VPA on UPI. In the request body, pass the value for exactly one of phone or vpa, not both.

Example:

"9999999999"

Response

200 - application/json

Always returns HTTP 200. Use status, subCode, and message to see whether validation succeeded. When status is SUCCESS, data includes the transfer token and beneficiary-facing VPA fields.

Cashfree status envelope. When status is SUCCESS, data carries the single-use token and the validated VPA payload.

status
enum<string>

Top-level outcome of the validation request (SUCCESS or ERROR).

Available options:
SUCCESS,
ERROR
subCode
string

200 on success, 400 or 422 on error.

message
string

Human-readable message that describes the error.

data
object

Present on SUCCESS responses only.