> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.

Before 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.

**x-api-key** `string` *required*

Your secret API key.

**Content-Type** `string` *required*

Must be `application/json`.

**X-Real-IP** `string` *required*

Your whitelisted server IP address.

## Request body

```json theme={"dark"}
{
  "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

```bash Shell theme={"dark"}
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"
  }'
```

```javascript Node.js theme={"dark"}
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());
```

```python Python theme={"dark"}
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())
```

```java Java theme={"dark"}
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());
```

```go Go theme={"dark"}
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 PHP theme={"dark"}
<?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);
```

```ruby Ruby theme={"dark"}
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

**bank\_account\_number** `string`

Beneficiary bank account number. Required for bank payouts (IMPS, NEFT, RTGS).

**ifsc** `string`

IFSC code of the beneficiary's bank branch. Required when providing a bank account number.

**name** `string` *required*

Full name of the account holder as it appears on their bank records.

**contact\_number** `string` *required*

Beneficiary's mobile number. Used for communication and verification.

**email\_id** `string`

Beneficiary's email address. Used for notifications and records.

**account\_type** `string`

Type of the bank account. Accepted values: `Savings` or `Current`.

**upi\_id** `string`

Beneficiary's UPI ID (e.g., `88XXXXXX54@ybl`). Required for UPI payouts.

## Responses

> [tab] 201 Contact Created
>
> Returned when the contact does not already exist. A new contact is created and a unique `contact_id` is assigned.
>
> ```json theme={"dark"}
> {
>   "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"
>   }
> }
> ```

> [tab] 200 Contact Already Exists
>
> Returned when a contact with the same bank account number already exists. The API returns the existing contact's details without creating a duplicate.
>
> ```json theme={"dark"}
> {
>   "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"
>   }
> }
> ```

> [tab] 400 Different IFSC Conflict
>
> Returned when the same bank account number is already registered with a different IFSC code. Resolve the conflict before retrying.
>
> ```json theme={"dark"}
> {
>   "status": "FAILED",
>   "status_code": 400,
>   "message": "Bank account number already exists with different IFSC",
>   "detail": null,
>   "data": null
> }
> ```

> [!TIP]
>
> Save the `contact_id` from the response — you need it to check verification status and to initiate payouts.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.