> ## 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 Wallet Ledger

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

Returns your company's SalaryBox wallet history, newest first: every top-up, every spend (for example staff verification charges) and every expiry of balance. It is the same list as Wallet history in the app.

- `amount` is a 2-decimal string, positive when money came in (a top-up or promo credit) and negative when it went out (a spend or expiry).
- `balance_after` is the total balance (normal plus promo) right after the entry. To get the current balance, read `balance_after` on the first row of page 1.
- `type` is `normal` for money your company added, or `promo` for credit from SalaryBox, which can be used only for staff verification and can expire.
- `action` is the label shown in the app, for example `Topup` or `Staff Verification (XXXXXX9999)`. Phone numbers in labels are masked.

`start_date` and `end_date` are optional and each can be used alone. Both are whole days in your company's time zone, and the range must be shorter than 366 days.

**Errors**
- `503` `"Wallet ledger is temporarily unavailable, please try again"`: the wallet service could not be reached. Retry after a short while.


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

## Authentication

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

## Request

### Query parameters

- `start_date` (date, optional) — First day to include, `YYYY-MM-DD`. Optional.
- `end_date` (date, optional) — Last day to include, `YYYY-MM-DD`. Optional. Must not be before `start_date`.
- `page` (integer, optional) — Page number, starting at 1.
- `page_size` (integer, optional) — Results per page. Default and maximum 200.

## Response

### 200

Wallet entries, newest first. Empty `data` and `count` 0 if the company has never used the wallet.

- `data` (list of CompanyWalletLedgerItem, 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

### 400 Bad Request Error

A date is malformed, the dates are in the wrong order, or the range is 366 days or more.

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

### 503 Service Unavailable Error

The wallet is held by a separate SalaryBox service that is temporarily unavailable. Retry later.

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

## Types

### CompanyWalletLedgerItem

- `created_at` (datetime, required) — When the entry was recorded, UTC, ISO 8601.
- `action` (string, required) — What happened, as shown in the app, for example `Topup`, `Staff Verification (XXXXXX9999)`, a balance-expiry label, or `Balance used`. Phone numbers in the label are masked - any run of 7 or more digits shows only its last 4 digits, the rest replaced by `X`.
- `amount` (string, required) — Signed amount with 2 decimals. Positive when money came into the wallet (top-up, promo credit), negative when it went out (a spend or an expiry).
- `balance_after` (string, required) — Total wallet balance (normal plus promo) right after this entry, 2 decimals. On the newest entry (first row of page 1) this is the current wallet balance.
- `type` (enum, required) — Which part of the wallet the entry touched. `normal` is money the company added, usable for anything. `promo` is credit granted by SalaryBox, usable only for staff verification, and it can expire.
  - Allowed values: `normal`, `promo`

## Examples

**Response**

```json
{
  "data": [
    {
      "created_at": "2026-10-22T09:40:12.120331Z",
      "action": "Staff Verification (XXXXXX9999)",
      "amount": "-50.00",
      "balance_after": "99950.00",
      "type": "normal"
    },
    {
      "created_at": "2026-10-22T08:13:05.474635Z",
      "action": "Topup",
      "amount": "91960.00",
      "balance_after": "100000.00",
      "type": "normal"
    }
  ],
  "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/wallet/ledger"

querystring = {"end_date":"2026-10-31","start_date":"2026-10-01"}

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

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

print(response.json())
```

```javascript Example
const url = 'https://api.salaryboxapp.com/v2/customer/v1/company/wallet/ledger?end_date=2026-10-31&start_date=2026-10-01';
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/wallet/ledger?end_date=2026-10-31&start_date=2026-10-01"

	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/wallet/ledger?end_date=2026-10-31&start_date=2026-10-01")

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/wallet/ledger?end_date=2026-10-31&start_date=2026-10-01")
  .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/wallet/ledger?end_date=2026-10-31&start_date=2026-10-01', [
  'headers' => [
    'Authorization' => 'Api-Key  <apiKey>',
  ],
]);

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

```csharp Example
using RestSharp;

var client = new RestClient("https://api.salaryboxapp.com/v2/customer/v1/company/wallet/ledger?end_date=2026-10-31&start_date=2026-10-01");
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/wallet/ledger?end_date=2026-10-31&start_date=2026-10-01")! 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()
```