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

# List billing activity

GET https://api.getdial.ai/api/v1/billing/activity

The unified billing activity ledger — usage (calls, SMS, number ownership), wallet credits, and subscription payments — merged newest-first and cursor-paginated. Each item has a `type` that selects which fields are present. Pagination is Stripe-style: pass `limit` (max page size) and `starting_after` set to the `occurredAt` of the last item you received to fetch the next page (only items strictly older are returned). `hasMore` indicates whether further pages exist.

Reference: https://docs.getdial.ai/api-reference/rest-api/billing/list-billing-activity

## Authentication

- `Authorization` header (bearer token, required) — Your Dial API key, sent as `Authorization: Bearer sk_live_...`

## Request

### Query parameters

- `filter` (enum, optional, default: all) — Scope the feed: `all`, `usage` only, or `payment-credits` (subscription payments + wallet credits).
  - Allowed values: `all`, `usage`, `payment-credits`
- `limit` (integer, optional, default: 50) — Max items per page (clamped to 1–100).
- `starting_after` (datetime, optional) — Exclusive cursor — an exact ISO timestamp (the `occurredAt` of the last item from the previous page). Only items strictly older are returned.

## Response

### 200

One page of activity, newest-first.

- `data` (list of object, optional)
  - `type` (enum, optional)
    - Allowed values: `usage`, `credit`, `payment`
  - `occurredAt` (datetime, optional)
  - `balanceAfterCents` (integer, optional) — Credit-wallet balance in USD cents immediately after this row — a running balance; the newest item equals the current wallet balance. Rows that don't move the wallet carry the balance as of their moment.
  - `amountCents` (integer, optional) — Credits/payments: amount; usage: see totalCents.
  - `totalCents` (integer, optional) — Usage rows only — billed amount in USD cents.
  - `fareName` (string, optional)
  - `number` (string, optional, nullable)
  - `billedQuantity` (integer, optional)
  - `attribution` (enum, optional)
    - Allowed values: `wallet`, `entitlement`
  - `phoneNumberId` (string, optional)
  - `callId` (string, optional, nullable)
  - `messageId` (string, optional, nullable)
  - `kind` (enum, optional) — Credit rows only.
    - Allowed values: `card`, `welcome`, `manual`
  - `invoiceId` (string, optional, nullable) — Stripe invoice id (credit/payment rows); pass to Download an invoice.
  - `reason` (string, optional) — Payment rows only — Stripe billing reason.
- `hasMore` (boolean, optional) — True when more items exist older than the last one returned.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "data": [
    {
      "type": "usage",
      "occurredAt": "2024-01-15T09:30:00Z",
      "balanceAfterCents": 12500,
      "amountCents": 50,
      "totalCents": 50,
      "fareName": "sms.tier_1.message",
      "number": "+14155550123",
      "billedQuantity": 1,
      "attribution": "wallet",
      "phoneNumberId": "pn_8f3a2b7c-4d1e-4a9b-9f2d-123456789abc",
      "callId": null,
      "messageId": "msg_7d9f3e2a-1b4c-4e5f-8a7d-987654321def",
      "kind": null,
      "invoiceId": null,
      "reason": null
    }
  ],
  "hasMore": true
}
```

**SDK Code**

```python
import requests

url = "https://api.getdial.ai/api/v1/billing/activity"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.getdial.ai/api/v1/billing/activity';
const options = {
  method: 'GET',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

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

```go
package main

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

func main() {

	url := "https://api.getdial.ai/api/v1/billing/activity"

	payload := strings.NewReader("{}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	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
require 'uri'
require 'net/http'

url = URI("https://api.getdial.ai/api/v1/billing/activity")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

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

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

HttpResponse<String> response = Unirest.get("https://api.getdial.ai/api/v1/billing/activity")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.getdial.ai/api/v1/billing/activity', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.getdial.ai/api/v1/billing/activity");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getdial.ai/api/v1/billing/activity")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
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()
```