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

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

Returns every invoice issued to your company, newest first. It is the same list as Purchase history in the app: plan purchases and renewals, staff verification charges and wallet top-ups. Old plan purchases are included. Rows with no purchase date come last. Amounts are not returned. App Store and Play Store purchases are not listed, because those stores issue the invoices.

- `invoice_type` is `subscription` (plan purchase, upgrade, renewal or recurring plan payment), `verification` (staff verification charges) or `wallet` (wallet top-up).
- `purchase_type` and `description` are the labels shown in the app. Phone numbers and PAN numbers in `description` are masked.

**Errors**
- `403` `"Invoices for this company are issued by your SalaryBox partner. Please contact them for invoice details."`: your company bought SalaryBox through a partner.


Reference: https://docs.salarybox.in/api-reference/billing/company-subscription-invoices-list

## Authentication

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

## Request

### Query parameters

- `page` (integer, optional) — Page number, starting at 1.
- `page_size` (integer, optional) — Results per page. Default 50, maximum 100. A larger value is capped at 100.

## Response

### 200

Invoices, newest first.

- `data` (list of CompanyInvoice, required)
- `message` (string, optional)
- `status` (boolean, optional)
- `count` (integer, optional) — Total number of results across all pages.
- `prev` (string, optional, nullable) — URL of the previous page, or null.
- `next` (string, optional, nullable) — URL of the next page, or null.

## Errors

### 403 Forbidden Error

The company bought SalaryBox through a partner, who issues its invoices.

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

### 404 Not Found Error

The requested page does not exist.

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

## Types

### CompanyInvoice

- `purchased_at` (datetime, required, nullable) — When the purchase was made, ISO 8601, in the company's time zone. Null for very old rows, which are listed last.
- `invoice_type` (enum, required) — `subscription` is a plan purchase, upgrade, renewal or recurring plan payment. `verification` is a staff verification charge. `wallet` is a wallet top-up.
  - Allowed values: `subscription`, `verification`, `wallet`
- `purchase_type` (string, required, nullable) — The label shown in the app, for example `New Purchase`, `Renewal`, `Verification Package`, `Verified Employee Addition` or `SalaryBox Wallet`.
- `description` (string, required) — The line shown in the app. Phone numbers and PAN numbers are masked.
- `invoice_url` (string, required, nullable) — Link to the invoice PDF. Null when no invoice file exists yet.

## Examples

**Response**

```json
{
  "data": [
    {
      "purchased_at": "2026-10-05T14:32:10+05:30",
      "invoice_type": "subscription",
      "purchase_type": "Renewal",
      "description": "Attendance, Payroll - 50 Staff - Valid till 05 Oct 2027",
      "invoice_url": "https://example.com/invoice.pdf"
    },
    {
      "purchased_at": "2026-09-18T11:05:42+05:30",
      "invoice_type": "verification",
      "purchase_type": "Verification Package",
      "description": "Staff Verification - Ravi Kumar",
      "invoice_url": null
    }
  ],
  "message": "Success",
  "status": true,
  "count": 2,
  "prev": null,
  "next": null
}
```

**SDK Code**

```python Example
import requests

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

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

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

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