> ## 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"
> ```

# Get Company Subscription

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

Returns your company's current subscription and any renewal already paid for that has not started yet. Not paginated.

- `has_active_subscription`: whether the company has an active plan today.
- `subscription`: the latest subscription, even if it has expired. `null` if the company never subscribed.
- `upcoming_renewal`: a paid renewal that starts later, or `null`.

Invoices are not included.


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

## Authentication

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

## Response

### 200

Current subscription and upcoming renewal.

- `message` (string, required)
- `status` (boolean, required)
- `data` (CompanySubscriptionData, required)

## Types

### CompanySubscriptionData

- `has_active_subscription` (boolean, required) — Whether the company has an active plan today.
- `subscription` (CompanySubscription, required, nullable) — The latest subscription, even if lapsed. Null if the company never subscribed.
- `upcoming_renewal` (CompanySubscription, required, nullable) — An already-purchased renewal that starts later. Null if none.

### CompanySubscription

One subscription of the company.

- `plan_name` (string, required, nullable) — Name of the plan.
- `purchase_mode` (enum, required, nullable) — How it was acquired. `RENEWAL` renewed before expiry; `RENEWAL_POST` renewed after expiry.
  - Allowed values: `NEW`, `UPGRADE`, `EXTENSION`, `RENEWAL`, `RENEWAL_POST`, `TRIAL`
- `is_active` (boolean, required) — Whether the subscription is active today.
- `start_date` (date, required) — First day, in the company's time zone.
- `expiry_date` (date, required) — Last day, in the company's time zone.
- `allowed_staff_count` (integer, required, nullable) — Maximum staff allowed.
- `addons` (list of string, required) — Add-on names, for example `location_tracking`, `crm`. May be empty.
- `price_paid` (string, required, nullable) — Amount paid, 2-decimal string.
- `currency` (string, required, nullable) — Currency code, for example INR.
- `paid_on` (date, required, nullable) — Date of payment.
- `auto_renew` (enum, required, nullable) — Auto-renewal status. Null if not set up.
  - Allowed values: `ACTIVE`, `INACTIVE`

## Examples

**Response**

```json
{
  "message": "Success",
  "status": true,
  "data": {
    "has_active_subscription": true,
    "subscription": {
      "plan_name": "Business",
      "purchase_mode": "RENEWAL",
      "is_active": true,
      "start_date": "2026-01-01",
      "expiry_date": "2026-12-31",
      "allowed_staff_count": 100,
      "addons": [
        "location_tracking",
        "crm"
      ],
      "price_paid": "23600.00",
      "currency": "INR",
      "paid_on": "2025-12-28",
      "auto_renew": "ACTIVE"
    },
    "upcoming_renewal": {
      "plan_name": "Business",
      "purchase_mode": "RENEWAL",
      "is_active": false,
      "start_date": "2027-01-01",
      "expiry_date": "2027-12-31",
      "allowed_staff_count": 100,
      "addons": [
        "location_tracking"
      ],
      "price_paid": "23600.00",
      "currency": "INR",
      "paid_on": "2026-10-20",
      "auto_renew": "INACTIVE"
    }
  }
}
```

**SDK Code**

```python Example
import requests

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

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';
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"

	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")

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")
  .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', [
  '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");
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")! 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()
```