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

# Retrieve Payout Purpose Codes

> Get the full list of purpose codes for payout requests. Use the bs_code value as transaction_purpose_code to classify the nature of your fund transfer.

Use this endpoint to retrieve the full list of purpose codes accepted for payout requests. When you initiate a payout, pass the `bs_code` value from this response as the `transaction_purpose_code` field to classify the nature of the fund transfer.

## Headers

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

## Sample Request

```sh Shell theme={"dark"}
curl --location --request GET 'https://api.bluswap.co/api/v1/get-bs-purpose-codes' \
  --header 'x-api-key: YOUR_SECRET_KEY' \
  --header 'Content-Type: application/json' \
  --header 'X-Real-IP: YOUR_WHITELISTED_IP'
```

```js Node.js theme={"dark"}
const response = await fetch('https://api.bluswap.co/api/v1/get-bs-purpose-codes', {
  headers: { 'x-api-key': '<YOUR_API_KEY>', 'Content-Type': 'application/json', 'X-Real-IP': '<YOUR_WHITELISTED_IP>' }
});
console.log(await response.json());
```

```python Python theme={"dark"}
import requests

response = requests.get(
    "https://api.bluswap.co/api/v1/get-bs-purpose-codes",
    headers={"x-api-key": "<YOUR_API_KEY>", "X-Real-IP": "<YOUR_WHITELISTED_IP>"},
)
print(response.json())
```

```java Java theme={"dark"}
var request = java.net.http.HttpRequest.newBuilder(java.net.URI.create("https://api.bluswap.co/api/v1/get-bs-purpose-codes")).headers("x-api-key", "<YOUR_API_KEY>", "Content-Type", "application/json", "X-Real-IP", "<YOUR_WHITELISTED_IP>").GET().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"
func main() {
request, _ := http.NewRequest(http.MethodGet, "https://api.bluswap.co/api/v1/get-bs-purpose-codes", nil)
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/get-bs-purpose-codes');
curl_setopt_array($curl, [CURLOPT_HTTPHEADER => ['x-api-key: <YOUR_API_KEY>', 'Content-Type: application/json', 'X-Real-IP: <YOUR_WHITELISTED_IP>'], CURLOPT_RETURNTRANSFER => true]);
echo curl_exec($curl);
curl_close($curl);
```

```ruby Ruby theme={"dark"}
require "net/http"

uri = URI("https://api.bluswap.co/api/v1/get-bs-purpose-codes")
request = Net::HTTP::Get.new(uri, {"x-api-key" => "<YOUR_API_KEY>", "Content-Type" => "application/json", "X-Real-IP" => "<YOUR_WHITELISTED_IP>"})
puts Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request).body }
```

## Sample Response

```json theme={"dark"}
{
    "status": "Success",
    "status_code": 200,
    "message": "BS Transaction Purpose Codes fetched successfully.",
    "detail": null,
    "data": [
        {
            "bs_code": "BS103",
            "bs_description": "Remittances to the Prime Minister's National Relief Fund / Chief Minister's Distress Relief Fund - Kerala subject to the condition that the remittances are directly credited to the Fund by the banks and the banks maintain full details of the remitters"
        },
        {
            "bs_code": "BS104",
            "bs_description": "EMI payments in India to Banks and Non-Banking Financial Companies (NBFCs) for repayment of loans."
        },
        {
            "bs_code": "BS105",
            "bs_description": "Tax payments in India"
        }
    ]
}
```

## Response Fields

Each object in the `data` array contains the following fields:

**bs\_code** `string`

The purpose code to pass as `transaction_purpose_code` when calling the [Initiate Payout](/docs/payouts/initiate-payout.md) endpoint (e.g., `"BS103"`).

**bs\_description** `string`

Human-readable description of the purpose code, explaining the permitted use case for the fund transfer.


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