Payouts
Create a Payout Contact
POST /api/v1/contacts_for_cust — Register a beneficiary with bank account or UPI details. Returns a contact_id reusable for all future payouts.
Create a Payout Contact
curl --request POST \
--url https://api.bluswap.co/api/v1/contacts_for_cust \
--header 'Content-Type: <content-type>' \
--header 'X-Real-IP: <x-real-ip>' \
--header 'x-api-key: <api-key>' \
--data '
{
"bank_account_number": "<string>",
"ifsc": "<string>",
"name": "<string>",
"contact_number": "<string>",
"email_id": "<string>",
"account_type": "<string>",
"upi_id": "<string>"
}
'import requests
url = "https://api.bluswap.co/api/v1/contacts_for_cust"
payload = {
"bank_account_number": "<string>",
"ifsc": "<string>",
"name": "<string>",
"contact_number": "<string>",
"email_id": "<string>",
"account_type": "<string>",
"upi_id": "<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({
bank_account_number: '<string>',
ifsc: '<string>',
name: '<string>',
contact_number: '<string>',
email_id: '<string>',
account_type: '<string>',
upi_id: '<string>'
})
};
fetch('https://api.bluswap.co/api/v1/contacts_for_cust', 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/contacts_for_cust",
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([
'bank_account_number' => '<string>',
'ifsc' => '<string>',
'name' => '<string>',
'contact_number' => '<string>',
'email_id' => '<string>',
'account_type' => '<string>',
'upi_id' => '<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/contacts_for_cust"
payload := strings.NewReader("{\n \"bank_account_number\": \"<string>\",\n \"ifsc\": \"<string>\",\n \"name\": \"<string>\",\n \"contact_number\": \"<string>\",\n \"email_id\": \"<string>\",\n \"account_type\": \"<string>\",\n \"upi_id\": \"<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/contacts_for_cust")
.header("x-api-key", "<api-key>")
.header("Content-Type", "<content-type>")
.header("X-Real-IP", "<x-real-ip>")
.body("{\n \"bank_account_number\": \"<string>\",\n \"ifsc\": \"<string>\",\n \"name\": \"<string>\",\n \"contact_number\": \"<string>\",\n \"email_id\": \"<string>\",\n \"account_type\": \"<string>\",\n \"upi_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bluswap.co/api/v1/contacts_for_cust")
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 \"bank_account_number\": \"<string>\",\n \"ifsc\": \"<string>\",\n \"name\": \"<string>\",\n \"contact_number\": \"<string>\",\n \"email_id\": \"<string>\",\n \"account_type\": \"<string>\",\n \"upi_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyBefore you can send a payout, you must register the beneficiary as a contact. For UPI payouts, pass only the UPI ID. For bank payouts, pass the account number and IFSC code. If you want to enable both bank and UPI payouts for the same beneficiary, provide all fields. The API returns a
contact_id that you reuse for every future payout to that beneficiary.
string
required
Your secret API key.
string
required
Must be
application/json.string
required
Your whitelisted server IP address.
Request body
{
"bank_account_number": "123456789012",
"ifsc": "HDFC0001234",
"name": "John Doe",
"contact_number": "9999988888",
"email_id": "john@example.com",
"account_type": "Savings",
"upi_id": "johndoe@upi"
}
Sample Request
curl --location 'https://api.bluswap.co/api/v1/contacts_for_cust' \
--header 'x-api-key: YOUR_SECRET_KEY' \
--header 'Content-Type: application/json' \
--header 'X-Real-IP: YOUR_WHITELISTED_IP' \
--data '{
"bank_account_number": "123456789012",
"ifsc": "HDFC0001234",
"name": "John Doe",
"contact_number": "9999988888",
"email_id": "john@example.com",
"account_type": "Savings",
"upi_id": "johndoe@upi"
}'
const response = await fetch('https://api.bluswap.co/api/v1/contacts_for_cust', {
method: 'POST',
headers: {
'x-api-key': '<YOUR_API_KEY>',
'Content-Type': 'application/json',
'X-Real-IP': '<YOUR_WHITELISTED_IP>'
},
body: JSON.stringify({
bank_account_number: '123456789012',
ifsc: 'HDFC0001234',
name: 'John Doe',
contact_number: '9999988888',
email_id: 'john@example.com',
account_type: 'Savings',
upi_id: 'johndoe@upi'
})
});
console.log(await response.json());
import requests
response = requests.post(
"https://api.bluswap.co/api/v1/contacts_for_cust",
headers={"x-api-key": "<YOUR_API_KEY>", "X-Real-IP": "<YOUR_WHITELISTED_IP>"},
json={
"bank_account_number": "123456789012",
"ifsc": "HDFC0001234",
"name": "John Doe",
"contact_number": "9999988888",
"email_id": "john@example.com",
"account_type": "Savings",
"upi_id": "johndoe@upi"
},
)
print(response.json())
var body = "{\"bank_account_number\":\"123456789012\",\"ifsc\":\"HDFC0001234\",\"name\":\"John Doe\",\"contact_number\":\"9999988888\",\"email_id\":\"john@example.com\",\"account_type\":\"Savings\",\"upi_id\":\"johndoe@upi\"}";
var request = java.net.http.HttpRequest.newBuilder(
java.net.URI.create("https://api.bluswap.co/api/v1/contacts_for_cust"))
.headers(
"x-api-key", "<YOUR_API_KEY>",
"Content-Type", "application/json",
"X-Real-IP", "<YOUR_WHITELISTED_IP>")
.POST(java.net.http.HttpRequest.BodyPublishers.ofString(body))
.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(`{"bank_account_number":"123456789012","ifsc":"HDFC0001234","name":"John Doe","contact_number":"9999988888","email_id":"john@example.com","account_type":"Savings","upi_id":"johndoe@upi"}`)
request, _ := http.NewRequest(http.MethodPost, "https://api.bluswap.co/api/v1/contacts_for_cust", 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/contacts_for_cust');
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([
'bank_account_number' => '123456789012',
'ifsc' => 'HDFC0001234',
'name' => 'John Doe',
'contact_number' => '9999988888',
'email_id' => 'john@example.com',
'account_type' => 'Savings',
'upi_id' => 'johndoe@upi'
]),
CURLOPT_RETURNTRANSFER => true
]);
echo curl_exec($curl);
curl_close($curl);
require "json"
require "net/http"
uri = URI("https://api.bluswap.co/api/v1/contacts_for_cust")
request = Net::HTTP::Post.new(uri, {
"x-api-key" => "<YOUR_API_KEY>",
"Content-Type" => "application/json",
"X-Real-IP" => "<YOUR_WHITELISTED_IP>"
})
request.body = {
bank_account_number: "123456789012",
ifsc: "HDFC0001234",
name: "John Doe",
contact_number: "9999988888",
email_id: "john@example.com",
account_type: "Savings",
upi_id: "johndoe@upi"
}.to_json
puts Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request).body }
Request parameters
string
Beneficiary bank account number. Required for bank payouts (IMPS, NEFT, RTGS).
string
IFSC code of the beneficiary’s bank branch. Required when providing a bank account number.
string
required
Full name of the account holder as it appears on their bank records.
string
required
Beneficiary’s mobile number. Used for communication and verification.
string
Beneficiary’s email address. Used for notifications and records.
string
Type of the bank account. Accepted values:
Savings or Current.string
Beneficiary’s UPI ID (e.g.,
88XXXXXX54@ybl). Required for UPI payouts.Responses
- 201 Contact Created
- 200 Contact Already Exists
- 400 Different IFSC Conflict
Returned when the contact does not already exist. A new contact is created and a unique
contact_id is assigned.{
"status": "Success",
"status_code": 201,
"message": "Contact created successfully",
"detail": null,
"data": {
"contact_id": "cnt_a1b2c3d4e5f6",
"bank_account_number": "123456789012",
"ifsc": "HDFC0001234",
"name": "John Doe",
"account_type": "Savings",
"upi_id": "johndoe@upi"
}
}
Returned when a contact with the same bank account number already exists. The API returns the existing contact’s details without creating a duplicate.
{
"status": "Success",
"status_code": 200,
"message": "Contact already exists with the provided account number",
"detail": null,
"data": {
"contact_id": "cnt_a1b2c3d4e5f6",
"bank_account_number": "123456789012",
"ifsc": "HDFC0001234",
"name": "John Doe",
"account_type": "Savings",
"upi_id": "johndoe@upi"
}
}
Returned when the same bank account number is already registered with a different IFSC code. Resolve the conflict before retrying.
{
"status": "FAILED",
"status_code": 400,
"message": "Bank account number already exists with different IFSC",
"detail": null,
"data": null
}
Save the
contact_id from the response — you need it to check verification status and to initiate payouts.⌘I
Create a Payout Contact
curl --request POST \
--url https://api.bluswap.co/api/v1/contacts_for_cust \
--header 'Content-Type: <content-type>' \
--header 'X-Real-IP: <x-real-ip>' \
--header 'x-api-key: <api-key>' \
--data '
{
"bank_account_number": "<string>",
"ifsc": "<string>",
"name": "<string>",
"contact_number": "<string>",
"email_id": "<string>",
"account_type": "<string>",
"upi_id": "<string>"
}
'import requests
url = "https://api.bluswap.co/api/v1/contacts_for_cust"
payload = {
"bank_account_number": "<string>",
"ifsc": "<string>",
"name": "<string>",
"contact_number": "<string>",
"email_id": "<string>",
"account_type": "<string>",
"upi_id": "<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({
bank_account_number: '<string>',
ifsc: '<string>',
name: '<string>',
contact_number: '<string>',
email_id: '<string>',
account_type: '<string>',
upi_id: '<string>'
})
};
fetch('https://api.bluswap.co/api/v1/contacts_for_cust', 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/contacts_for_cust",
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([
'bank_account_number' => '<string>',
'ifsc' => '<string>',
'name' => '<string>',
'contact_number' => '<string>',
'email_id' => '<string>',
'account_type' => '<string>',
'upi_id' => '<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/contacts_for_cust"
payload := strings.NewReader("{\n \"bank_account_number\": \"<string>\",\n \"ifsc\": \"<string>\",\n \"name\": \"<string>\",\n \"contact_number\": \"<string>\",\n \"email_id\": \"<string>\",\n \"account_type\": \"<string>\",\n \"upi_id\": \"<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/contacts_for_cust")
.header("x-api-key", "<api-key>")
.header("Content-Type", "<content-type>")
.header("X-Real-IP", "<x-real-ip>")
.body("{\n \"bank_account_number\": \"<string>\",\n \"ifsc\": \"<string>\",\n \"name\": \"<string>\",\n \"contact_number\": \"<string>\",\n \"email_id\": \"<string>\",\n \"account_type\": \"<string>\",\n \"upi_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bluswap.co/api/v1/contacts_for_cust")
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 \"bank_account_number\": \"<string>\",\n \"ifsc\": \"<string>\",\n \"name\": \"<string>\",\n \"contact_number\": \"<string>\",\n \"email_id\": \"<string>\",\n \"account_type\": \"<string>\",\n \"upi_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body