curl --request POST \
--url https://api.cashfree.com/payout/validatePayout \
--header 'Content-Type: <content-type>' \
--header 'x-api-version: <x-api-version>' \
--header 'x-client-id: <x-client-id>' \
--header 'x-client-secret: <x-client-secret>' \
--data '
{
"transfer_id": "123451XX",
"vpa": "success@upi",
"phone": "9999999999"
}
'import requests
url = "https://api.cashfree.com/payout/validatePayout"
payload = {
"transfer_id": "123451XX",
"vpa": "success@upi",
"phone": "9999999999"
}
headers = {
"x-client-id": "<x-client-id>",
"x-client-secret": "<x-client-secret>",
"x-api-version": "<x-api-version>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-client-id': '<x-client-id>',
'x-client-secret': '<x-client-secret>',
'x-api-version': '<x-api-version>',
'Content-Type': '<content-type>'
},
body: JSON.stringify({transfer_id: '123451XX', vpa: 'success@upi', phone: '9999999999'})
};
fetch('https://api.cashfree.com/payout/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://api.cashfree.com/payout/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([
'transfer_id' => '123451XX',
'vpa' => 'success@upi',
'phone' => '9999999999'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"x-api-version: <x-api-version>",
"x-client-id: <x-client-id>",
"x-client-secret: <x-client-secret>"
],
]);
$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://api.cashfree.com/payout/validatePayout"
payload := strings.NewReader("{\n \"transfer_id\": \"123451XX\",\n \"vpa\": \"success@upi\",\n \"phone\": \"9999999999\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-client-id", "<x-client-id>")
req.Header.Add("x-client-secret", "<x-client-secret>")
req.Header.Add("x-api-version", "<x-api-version>")
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://api.cashfree.com/payout/validatePayout")
.header("x-client-id", "<x-client-id>")
.header("x-client-secret", "<x-client-secret>")
.header("x-api-version", "<x-api-version>")
.header("Content-Type", "<content-type>")
.body("{\n \"transfer_id\": \"123451XX\",\n \"vpa\": \"success@upi\",\n \"phone\": \"9999999999\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cashfree.com/payout/validatePayout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-client-id"] = '<x-client-id>'
request["x-client-secret"] = '<x-client-secret>'
request["x-api-version"] = '<x-api-version>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"transfer_id\": \"123451XX\",\n \"vpa\": \"success@upi\",\n \"phone\": \"9999999999\"\n}"
response = http.request(request)
puts response.read_body{
"transfer_token": "9d37bc17-db08-476b-8206-f0f8ec9661ad",
"vpa": "success@upi",
"account_status": "VALID",
"name_at_bank": "JOHN SNOW"
}Validate Payout
Validates a UPI VPA or phone number and returns a single-use transfer token valid for one hour. Pass this token to the Process Validated Payout API (POST /payout/transfers) to initiate the payout.
In the request body, pass the value for exactly one of vpa or phone, not both.
The response contains either basic or advanced VPA details. Advanced details include IFSC branch information. To enable advanced details for your account, fill the Support Form.
curl --request POST \
--url https://api.cashfree.com/payout/validatePayout \
--header 'Content-Type: <content-type>' \
--header 'x-api-version: <x-api-version>' \
--header 'x-client-id: <x-client-id>' \
--header 'x-client-secret: <x-client-secret>' \
--data '
{
"transfer_id": "123451XX",
"vpa": "success@upi",
"phone": "9999999999"
}
'import requests
url = "https://api.cashfree.com/payout/validatePayout"
payload = {
"transfer_id": "123451XX",
"vpa": "success@upi",
"phone": "9999999999"
}
headers = {
"x-client-id": "<x-client-id>",
"x-client-secret": "<x-client-secret>",
"x-api-version": "<x-api-version>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-client-id': '<x-client-id>',
'x-client-secret': '<x-client-secret>',
'x-api-version': '<x-api-version>',
'Content-Type': '<content-type>'
},
body: JSON.stringify({transfer_id: '123451XX', vpa: 'success@upi', phone: '9999999999'})
};
fetch('https://api.cashfree.com/payout/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://api.cashfree.com/payout/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([
'transfer_id' => '123451XX',
'vpa' => 'success@upi',
'phone' => '9999999999'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"x-api-version: <x-api-version>",
"x-client-id: <x-client-id>",
"x-client-secret: <x-client-secret>"
],
]);
$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://api.cashfree.com/payout/validatePayout"
payload := strings.NewReader("{\n \"transfer_id\": \"123451XX\",\n \"vpa\": \"success@upi\",\n \"phone\": \"9999999999\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-client-id", "<x-client-id>")
req.Header.Add("x-client-secret", "<x-client-secret>")
req.Header.Add("x-api-version", "<x-api-version>")
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://api.cashfree.com/payout/validatePayout")
.header("x-client-id", "<x-client-id>")
.header("x-client-secret", "<x-client-secret>")
.header("x-api-version", "<x-api-version>")
.header("Content-Type", "<content-type>")
.body("{\n \"transfer_id\": \"123451XX\",\n \"vpa\": \"success@upi\",\n \"phone\": \"9999999999\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cashfree.com/payout/validatePayout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-client-id"] = '<x-client-id>'
request["x-client-secret"] = '<x-client-secret>'
request["x-api-version"] = '<x-api-version>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"transfer_id\": \"123451XX\",\n \"vpa\": \"success@upi\",\n \"phone\": \"9999999999\"\n}"
response = http.request(request)
puts response.read_body{
"transfer_token": "9d37bc17-db08-476b-8206-f0f8ec9661ad",
"vpa": "success@upi",
"account_status": "VALID",
"name_at_bank": "JOHN SNOW"
}Headers
Client app ID. You can find your app ID in the Merchant Dashboard.
"<CLIENT_ID>"
Client secret key. You can find your secret key in the Merchant Dashboard.
"<CLIENT_SECRET>"
Body
Identifies this validation attempt and the beneficiary to resolve on UPI. Send transfer_id plus exactly one of vpa or phone.
Response
Always returns HTTP 200 when the request is accepted. Use account_status, transfer_token, and related fields to judge VPA validity and any advanced IFSC metadata.
Validation outcome: transfer token, account status, beneficiary name, and optional IFSC metadata when advanced responses are enabled.
Single-use token, valid for one hour, for the Process Validated Payout API. Empty string when account_status is INVALID.
Was this page helpful?