> 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.

# Get billing status

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

Returns the account's credit-wallet balance, the current subscription (if any), each phone number's billing mode (PAYG or FIXED), and recent usage.

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

## Authentication

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

## Response

### 200

Billing status.

- `balanceCents` (integer, optional) — Credit-wallet balance in USD cents. May be negative.
- `numbersReleaseAt` (datetime, optional, nullable) — When all of the account's numbers will be released for non-payment, or null when nothing is at risk. Non-null only for a pay-as-you-go account whose balance is negative: it's the end of the 30-day grace period (measured from when the balance first went negative). Topping the balance back to zero or above clears it. Subscription-covered accounts are never at risk, so this is always null for them.
- `subscription` (object, optional, nullable) — The current subscription, or null when the account is pay-as-you-go.
  - `periodStart` (datetime, optional)
  - `periodEnd` (datetime, optional)
  - `quantity` (integer, optional) — How many of your phone numbers this subscription covers (one unit each). `0` while you hold none — the subscription stays active and still bills for **one** number (its minimum), so the amount charged is `max(quantity, 1)` × the unit price, and the next number you provision is free.
  - `interval` (enum, optional)
    - Allowed values: `monthly`, `annual`
  - `cancelAtPeriodEnd` (boolean, optional) — True when the subscription is scheduled to cancel at periodEnd (coverage stays until then, then the account reverts to PAYG). Read live from Stripe, the source of truth.
- `numbers` (list of object, optional)
  - `id` (string, optional)
  - `number` (string, optional)
  - `nickname` (string, optional, nullable) — User-assigned label for the number, or null if unset.
  - `mode` (enum, optional) — PAYG bills the wallet; FIXED is covered by a subscription.
    - Allowed values: `PAYG`, `FIXED`
- `deposits` (list of object, optional) — Recent credits added to the wallet, most recent first.
  - `createdAt` (datetime, optional)
  - `amountCents` (integer, optional) — Amount credited, in USD cents (positive).
  - `kind` (enum, optional) — `card` — paid Stripe top-up; `welcome` — automatic signup credit; `manual` — internal grant by the Dial team.
    - Allowed values: `card`, `welcome`, `manual`
  - `invoiceId` (string, optional, nullable) — Stripe invoice id backing this deposit (only `card` top-ups have one; null otherwise). Pass it to Download an invoice to get the Stripe-hosted invoice and PDF.
- `pricing` (object, optional) — Per-number subscription unit prices (USD cents), read from Stripe (the source of truth). Stripe is a dependency of this endpoint.
  - `monthlyCents` (integer, optional) — Per-number price billed monthly.
  - `annualCents` (integer, optional) — Per-number price billed annually.
- `paymentMethods` (list of object, optional) — Saved payment methods on the account's Stripe customer (all reusable types — card, Link, …), used for top-ups and subscription billing. Empty until one is added. Read live from Stripe, with the default first.
  - `id` (string, optional) — Stripe PaymentMethod id (pm_…).
  - `type` (string, optional) — Stripe PaymentMethod type: card, link, …
  - `brand` (string, optional) — Card brand (visa, mastercard, amex, …); empty for non-card methods.
  - `last4` (string, optional) — Card last four; empty for non-card methods.
  - `expMonth` (integer, optional) — Card expiry month; 0 for non-card methods.
  - `expYear` (integer, optional) — Card expiry year; 0 for non-card methods.
  - `email` (string, optional, nullable) — Identifying email for account-style methods (e.g. Link); null otherwise.
  - `isDefault` (boolean, optional) — True for the customer's default payment method (invoices + subscription renewals).

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "balanceCents": 2350,
  "numbersReleaseAt": null,
  "subscription": {
    "periodStart": "2024-04-01T00:00:00Z",
    "periodEnd": "2024-05-01T00:00:00Z",
    "quantity": 3,
    "interval": "monthly",
    "cancelAtPeriodEnd": false
  },
  "numbers": [
    {
      "id": "num_01F8XYZ9ABC123",
      "number": "+14155550123",
      "nickname": "Support line",
      "mode": "FIXED"
    },
    {
      "id": "num_01F8XYZ9ABC124",
      "number": "+14155550456",
      "nickname": "Sales line",
      "mode": "PAYG"
    }
  ],
  "deposits": [
    {
      "createdAt": "2024-04-10T15:45:00Z",
      "amountCents": 5000,
      "kind": "card",
      "invoiceId": "in_1QabcdEFghij"
    },
    {
      "createdAt": "2024-03-01T12:00:00Z",
      "amountCents": 1000,
      "kind": "welcome",
      "invoiceId": null
    }
  ],
  "pricing": {
    "monthlyCents": 1200,
    "annualCents": 12000
  },
  "paymentMethods": [
    {
      "id": "pm_1F8XYZ9ABC123",
      "type": "card",
      "brand": "visa",
      "last4": "4242",
      "expMonth": 11,
      "expYear": 2026,
      "email": null,
      "isDefault": true
    },
    {
      "id": "pm_1F8XYZ9ABC124",
      "type": "link",
      "brand": "",
      "last4": "",
      "expMonth": 0,
      "expYear": 0,
      "email": "user@example.com",
      "isDefault": false
    }
  ]
}
```

**SDK Code**

```python
import requests

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

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

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

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