> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.senjaropay.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.senjaropay.com/_mcp/server.

# List billers for a category

POST https://api.senjaropay.com/api/billPayments/subcategories
Content-Type: application/json

Returns billers under a category. Each biller includes utilityCode,
reference field hints, and whether lookup is required before pay.


Reference: https://docs.senjaropay.com/api-documentation/bill-payments/list-bill-subcategories

## Authentication

- `x-api-key` header (required) — API Key authentication via header
- `x-api-secret` header (required) — API Key authentication via header

## Request

### Body (application/json)

This endpoint expects a BillSubcategoriesRequest.

- `category_id` (string, required) — Category id from the categories response.

## Response

### 200

Subcategories

- `status` (string, required)
- `code` (integer, required)
- `data` (map from string to list of BillSubcategory, required) — Map of category name to its billers.

## Errors

### 400 Bad Request Error

Validation error

- `status` (string, optional)
- `code` (integer, optional)
- `error_code` (string, optional)
- `message` (string, optional)

### 401 Unauthorized Error

Unauthorized

- `status` (string, optional)
- `code` (integer, optional)
- `error_code` (string, optional)
- `message` (string, optional)

## Types

### BillSubcategory

- `id` (integer, optional)
- `utilityCode` (string, optional) — Pass this value as utility on lookup and pay.
- `refLabel` (string, optional) — Label to show for the customer reference field.
- `refType` (string, optional) — Expected reference format.
- `refExample` (string, optional)
- `lookupAvailable` (boolean, optional) — When true, call lookup before pay.
- `description` (string, optional)
- `logo` (string, optional)

## Examples

**Request**

```json
{
  "category_id": "4"
}
```

**Response**

```json
{
  "status": "success",
  "code": 200,
  "data": {
    "Government Payments": [
      {
        "id": 11,
        "utilityCode": "GEPG",
        "refLabel": "Control No",
        "refType": "Numeric(12)",
        "refExample": "991234567891",
        "lookupAvailable": true,
        "description": "Government bill payment across supported agencies",
        "logo": "https://cdn.example.com/bills/gepg.png"
      }
    ]
  }
}
```

**SDK Code**

```python billPayments_listBillSubcategories_example
import requests

url = "https://api.senjaropay.com/api/billPayments/subcategories"

payload = { "category_id": "4" }
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript billPayments_listBillSubcategories_example
const url = 'https://api.senjaropay.com/api/billPayments/subcategories';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"category_id":"4"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go billPayments_listBillSubcategories_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.senjaropay.com/api/billPayments/subcategories"

	payload := strings.NewReader("{\n  \"category_id\": \"4\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby billPayments_listBillSubcategories_example
require 'uri'
require 'net/http'

url = URI("https://api.senjaropay.com/api/billPayments/subcategories")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"category_id\": \"4\"\n}"

response = http.request(request)
puts response.read_body
```

```java billPayments_listBillSubcategories_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.senjaropay.com/api/billPayments/subcategories")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"category_id\": \"4\"\n}")
  .asString();
```

```php billPayments_listBillSubcategories_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.senjaropay.com/api/billPayments/subcategories', [
  'body' => '{
  "category_id": "4"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp billPayments_listBillSubcategories_example
using RestSharp;

var client = new RestClient("https://api.senjaropay.com/api/billPayments/subcategories");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"category_id\": \"4\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift billPayments_listBillSubcategories_example
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["category_id": "4"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.senjaropay.com/api/billPayments/subcategories")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```