Payouts
Get Contact Status
POST /api/v1/get-contact-status — Check a beneficiary’s verification status before initiating a payout. Only VERIFIED contacts can receive funds.
Get Contact Status
curl --request POST \
--url https://api.bluswap.co/api/v1/get-contact-status \
--header 'Content-Type: <content-type>' \
--header 'X-Real-IP: <x-real-ip>' \
--header 'x-api-key: <api-key>' \
--data '
{
"contact_id": "<string>",
"account_number": "<string>"
}
'import requests
url = "https://api.bluswap.co/api/v1/get-contact-status"
payload = {
"contact_id": "<string>",
"account_number": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "<content-type>",
"X-Real-IP": "<x-real-ip>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'Content-Type': '<content-type>',
'X-Real-IP': '<x-real-ip>'
},
body: JSON.stringify({contact_id: '<string>', account_number: '<string>'})
};
fetch('https://api.bluswap.co/api/v1/get-contact-status', 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.bluswap.co/api/v1/get-contact-status",
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([
'contact_id' => '<string>',
'account_number' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"X-Real-IP: <x-real-ip>",
"x-api-key: <api-key>"
],
]);
$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.bluswap.co/api/v1/get-contact-status"
payload := strings.NewReader("{\n \"contact_id\": \"<string>\",\n \"account_number\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("X-Real-IP", "<x-real-ip>")
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.bluswap.co/api/v1/get-contact-status")
.header("x-api-key", "<api-key>")
.header("Content-Type", "<content-type>")
.header("X-Real-IP", "<x-real-ip>")
.body("{\n \"contact_id\": \"<string>\",\n \"account_number\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bluswap.co/api/v1/get-contact-status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = '<content-type>'
request["X-Real-IP"] = '<x-real-ip>'
request.body = "{\n \"contact_id\": \"<string>\",\n \"account_number\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"beneficiary_name": "<string>",
"account_number": "<string>",
"ifsc": "<string>",
"status": "<string>",
"upi_id_status": "<string>"
}After creating a contact, use this endpoint to retrieve the beneficiary’s current verification status before initiating a payout. bluSwap verifies both the bank account details and the UPI ID (if provided) in the background after contact creation. Only contacts with status
Using Account Number:
VERIFIED are eligible for payout processing — requests to contacts with any other status will be rejected.
string
required
Your secret API key.
string
required
Must be
application/json.string
required
Your whitelisted server IP address.
Request body
You can identify the contact using either acontact_id or an account_number.
Using Contact ID:
{
"contact_id": "xxxxxxxxx"
}
{
"account_number": "XXXXXXXXXX"
}
Either
contact_id or account_number must be provided. You do not need to supply both.Sample Request
curl --location 'https://api.bluswap.co/api/v1/get-contact-status' \
--header 'x-api-key: YOUR_SECRET_KEY' \
--header 'Content-Type: application/json' \
--header 'X-Real-IP: YOUR_WHITELISTED_IP' \
--data '{
"contact_id": "xxxxxxxxx"
}'
const response = await fetch('https://api.bluswap.co/api/v1/get-contact-status', {
method: 'POST',
headers: {
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json',
'X-Real-IP': '<YOUR_WHITELISTED_IP>'
},
body: JSON.stringify({ contact_id: 'YOUR_CONTACT_ID' })
});
console.log(await response.json());
import requests
response = requests.post(
"https://api.bluswap.co/api/v1/get-contact-status",
headers={"x-api-key": "<YOUR_API_KEY>", "X-Real-IP": "<YOUR_WHITELISTED_IP>"},
json={"contact_id": "YOUR_CONTACT_ID"},
)
print(response.json())
var request = java.net.http.HttpRequest.newBuilder(
java.net.URI.create("https://api.bluswap.co/api/v1/get-contact-status"))
.headers(
"x-api-key", "<YOUR_API_KEY>",
"Content-Type", "application/json",
"X-Real-IP", "<YOUR_WHITELISTED_IP>")
.POST(java.net.http.HttpRequest.BodyPublishers.ofString("{\"contact_id\":\"YOUR_CONTACT_ID\"}"))
.build();
var response = java.net.http.HttpClient.newHttpClient()
.send(request, java.net.http.HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
package main
import (
"net/http"
"strings"
)
func main() {
payload := strings.NewReader(`{"contact_id":"YOUR_CONTACT_ID"}`)
request, _ := http.NewRequest(http.MethodPost, "https://api.bluswap.co/api/v1/get-contact-status", payload)
request.Header.Set("x-api-key", "<YOUR_API_KEY>")
request.Header.Set("Content-Type", "application/json")
request.Header.Set("X-Real-IP", "<YOUR_WHITELISTED_IP>")
response, _ := http.DefaultClient.Do(request)
defer response.Body.Close()
}
<?php
$curl = curl_init('https://api.bluswap.co/api/v1/get-contact-status');
curl_setopt_array($curl, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'x-api-key: <YOUR_API_KEY>',
'Content-Type: application/json',
'X-Real-IP: <YOUR_WHITELISTED_IP>'
],
CURLOPT_POSTFIELDS => json_encode(['contact_id' => 'YOUR_CONTACT_ID']),
CURLOPT_RETURNTRANSFER => true
]);
echo curl_exec($curl);
curl_close($curl);
require "json"
require "net/http"
uri = URI("https://api.bluswap.co/api/v1/get-contact-status")
request = Net::HTTP::Post.new(uri, {
"x-api-key" => "<YOUR_API_KEY>",
"Content-Type" => "application/json",
"X-Real-IP" => "<YOUR_WHITELISTED_IP>"
})
request.body = { contact_id: "YOUR_CONTACT_ID" }.to_json
puts Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request).body }
Request parameters
string
Unique ID of the contact returned when the contact was created. Use this or
account_number.string
Beneficiary bank account number. Use this or
contact_id.Sample Response
{
"status": "SUCCESS",
"status_code": 200,
"message": "Contact fetched successfully",
"data": {
"id": "XXXXXXXXX",
"beneficiary_name": "XXXXXXXXX",
"account_number": "XXXXXXXXX",
"ifsc": "XXXXXXXXX",
"status": "VERIFIED",
"upi_id_status": "VERIFIED"
}
}
Response fields
string
Unique identifier of the contact.
string
Registered name of the beneficiary.
string
Bank account number associated with the contact.
string
IFSC code of the beneficiary’s bank branch.
string
Verification status of the bank account. See status values below.
string
Verification status of the UPI ID (if one was registered). See UPI status values below.
Bank account status values
| Status | Description |
|---|---|
VERIFIED | Bank account verified successfully — safe to initiate a payout |
UNDER_VERFICATION | Verification is currently in progress — check again shortly |
INVALID_BANK_ACCOUNT | Bank account details are invalid — update the contact before retrying |
UPI ID status values
| Status | Description |
|---|---|
VERIFIED | UPI ID verified successfully — safe to initiate a UPI payout |
UNDER_VERFICATION | Verification is currently in progress — check again shortly |
INVALID_UPI_ID | UPI ID is invalid — update the contact before retrying |
⌘I
Get Contact Status
curl --request POST \
--url https://api.bluswap.co/api/v1/get-contact-status \
--header 'Content-Type: <content-type>' \
--header 'X-Real-IP: <x-real-ip>' \
--header 'x-api-key: <api-key>' \
--data '
{
"contact_id": "<string>",
"account_number": "<string>"
}
'import requests
url = "https://api.bluswap.co/api/v1/get-contact-status"
payload = {
"contact_id": "<string>",
"account_number": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "<content-type>",
"X-Real-IP": "<x-real-ip>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'Content-Type': '<content-type>',
'X-Real-IP': '<x-real-ip>'
},
body: JSON.stringify({contact_id: '<string>', account_number: '<string>'})
};
fetch('https://api.bluswap.co/api/v1/get-contact-status', 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.bluswap.co/api/v1/get-contact-status",
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([
'contact_id' => '<string>',
'account_number' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"X-Real-IP: <x-real-ip>",
"x-api-key: <api-key>"
],
]);
$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.bluswap.co/api/v1/get-contact-status"
payload := strings.NewReader("{\n \"contact_id\": \"<string>\",\n \"account_number\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("X-Real-IP", "<x-real-ip>")
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.bluswap.co/api/v1/get-contact-status")
.header("x-api-key", "<api-key>")
.header("Content-Type", "<content-type>")
.header("X-Real-IP", "<x-real-ip>")
.body("{\n \"contact_id\": \"<string>\",\n \"account_number\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bluswap.co/api/v1/get-contact-status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = '<content-type>'
request["X-Real-IP"] = '<x-real-ip>'
request.body = "{\n \"contact_id\": \"<string>\",\n \"account_number\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"beneficiary_name": "<string>",
"account_number": "<string>",
"ifsc": "<string>",
"status": "<string>",
"upi_id_status": "<string>"
}