> ## Client identification
>
> Requests to this API should include a `Client-Platform` header alongside
> `Authorization`, identifying the application, tool, or model making the
> request. This is used for integration support and analytics.
>
> Use your model or tool name, for example `claude-code` or `chatgpt`.
>
> Example:
>
> ```bash
> curl https://api.salaryboxapp.com/... \
>   -H "Authorization: Api-Key <api-key>" \
>   -H "Client-Platform: claude-code"
> ```

# List Plans

GET https://api.salaryboxapp.com/v2/customer/v1/company/subscription/plans

Returns the plans your company can buy, priced in the company's currency (`INR` for Indian companies, `USD` otherwise). Prices exclude GST and trial pricing. Not paginated, no parameters. Only for companies on SalaryBox's current pricing.

- Monthly price is `base_amount_per_month` plus `per_staff_per_month` times the number of staff.
- Returns `503` `"Plans are temporarily unavailable, please try again"` when SalaryBox's payments service cannot be reached.


Reference: https://docs.salarybox.in/api-reference/company/subscription-plans-retrieve

## Authentication

- `Authorization` header (required) (prefixed with ` Api-Key   `) — Format: "Api-Key \{api-key}"

## Response

### 200

Plans with a price for each billing cycle.

- `message` (string, required)
- `status` (boolean, required)
- `data` (list of SubscriptionPlan, required)

## Errors

### 403 Forbidden Error

Your company is not on SalaryBox's current pricing.

- `message` (string, required)
- `status` (boolean, required)
- `errors` (map from string to any, optional, nullable)

### 503 Service Unavailable Error

SalaryBox's payments service could not be reached. Try again shortly.

- `message` (string, required)
- `status` (boolean, required)
- `errors` (map from string to any, optional, nullable)

## Types

### SubscriptionPlan

- `id` (string, required) — Plan identifier.
- `name` (string, required)
- `features` (list of string, required)
- `currency` (enum, required)
  - Allowed values: `INR`, `USD`
- `prices` (list of SubscriptionPlanPrice, required) — One entry per billing cycle.
- `description` (string, optional, nullable)
- `min_staff` (integer, optional, nullable) — Fewest staff the plan allows.
- `max_staff` (integer, optional, nullable) — Most staff the plan allows.

### SubscriptionPlanPrice

The price of a plan for one billing cycle. Amounts have 2 decimals and exclude GST.

- `billing_cycle` (string, optional) — Lower-case cycle name, for example `quarterly` or `annual`.
- `months` (integer, optional) — Length of the cycle in months.
- `base_amount_per_month` (string, optional) — Fixed part of the monthly price.
- `per_staff_per_month` (string, optional) — Monthly price for each staff member.
- `original_base_amount_per_month` (string, optional, nullable) — Fixed monthly price before the discount. Null when the cycle has no discount.
- `original_per_staff_per_month` (string, optional, nullable) — Per-staff monthly price before the discount. Null when the cycle has no discount.
- `discount_percentage` (string, optional, nullable) — Discount for this cycle, for example `20`. Null when there is none.

## Examples

**Response**

```json
{
  "message": "Success",
  "status": true,
  "data": [
    {
      "id": "business",
      "name": "Business",
      "features": [
        "Attendance tracking",
        "Payroll processing"
      ],
      "currency": "INR",
      "prices": [
        {
          "billing_cycle": "quarterly",
          "months": 3,
          "base_amount_per_month": "500.00",
          "per_staff_per_month": "30.00",
          "original_base_amount_per_month": null,
          "original_per_staff_per_month": null,
          "discount_percentage": null
        },
        {
          "billing_cycle": "annual",
          "months": 12,
          "base_amount_per_month": "400.00",
          "per_staff_per_month": "24.00",
          "original_base_amount_per_month": "500.00",
          "original_per_staff_per_month": "30.00",
          "discount_percentage": "20"
        }
      ],
      "description": "Attendance and payroll for growing teams.",
      "min_staff": 1,
      "max_staff": 10000
    }
  ]
}
```

**SDK Code**

```python Example
import requests

url = "https://api.salaryboxapp.com/v2/customer/v1/company/subscription/plans"

headers = {"Authorization": "Api-Key  <apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Example
const url = 'https://api.salaryboxapp.com/v2/customer/v1/company/subscription/plans';
const options = {method: 'GET', headers: {Authorization: 'Api-Key  <apiKey>'}};

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

```go Example
package main

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

func main() {

	url := "https://api.salaryboxapp.com/v2/customer/v1/company/subscription/plans"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Api-Key  <apiKey>")

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

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

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

}
```

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

url = URI("https://api.salaryboxapp.com/v2/customer/v1/company/subscription/plans")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Api-Key  <apiKey>'

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

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

HttpResponse<String> response = Unirest.get("https://api.salaryboxapp.com/v2/customer/v1/company/subscription/plans")
  .header("Authorization", "Api-Key  <apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.salaryboxapp.com/v2/customer/v1/company/subscription/plans', [
  'headers' => [
    'Authorization' => 'Api-Key  <apiKey>',
  ],
]);

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

```csharp Example
using RestSharp;

var client = new RestClient("https://api.salaryboxapp.com/v2/customer/v1/company/subscription/plans");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Api-Key  <apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Example
import Foundation

let headers = ["Authorization": "Api-Key  <apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.salaryboxapp.com/v2/customer/v1/company/subscription/plans")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```