Skip to main content
GET
/
v1
/
billing
/
charges
listBillingCharges
import { Vercel } from "@vercel/sdk";

const vercel = new Vercel({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await vercel.billing.listBillingCharges({
    from: "2025-01-01T00:00:00.000Z",
    to: "2025-01-31T00:00:00.000Z",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    slug: "my-team-url-slug",
  });

  for await (const event of result) {
    // Handle the event
    console.log(event);
  }
}

run();
{
  "BilledCost": 123,
  "BillingCurrency": "USD",
  "ChargeCategory": "Adjustment",
  "ChargePeriodStart": "<string>",
  "ChargePeriodEnd": "<string>",
  "ConsumedQuantity": 123,
  "ConsumedUnit": "<string>",
  "EffectiveCost": 123,
  "ServiceName": "<string>",
  "ServiceProviderName": "<string>",
  "Tags": {},
  "PricingCategory": "Other",
  "PricingCurrency": "USD",
  "PricingQuantity": 123,
  "PricingUnit": "<string>",
  "RegionId": "<string>",
  "RegionName": "<string>",
  "ServiceCategory": "AI and Machine Learning"
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Query Parameters

from
string
required

Inclusive start of the date range as an ISO 8601 date-time string in UTC.

Example:

"2025-01-01T00:00:00.000Z"

to
string
required

Exclusive end of the date range as an ISO 8601 date-time string in UTC.

Example:

"2025-01-31T00:00:00.000Z"

teamId
string

The Team identifier to perform the request on behalf of.

Example:

"team_1a2b3c4d5e6f7g8h9i0j1k2l"

slug
string

The Team slug to perform the request on behalf of.

Example:

"my-team-url-slug"

Response

Extension of the base schema for Focus charges. Includes pricing information for all customers.

BilledCost
number
required

Charge amount serving as the basis for invoicing

BillingCurrency
enum<string>
required

Currency used for billing (ISO 4217)

Available options:
USD
ChargeCategory
enum<string>
required

Classification of the charge

Available options:
Adjustment,
Credit,
Purchase,
Tax,
Usage
ChargePeriodStart
string
required

Inclusive start of the charge period (ISO 8601 UTC)

ChargePeriodEnd
string
required

Exclusive end of the charge period (ISO 8601 UTC) - Required in v1.3

ConsumedQuantity
number
required

Volume of resource consumed

ConsumedUnit
string
required

Unit of measurement for consumed quantity

EffectiveCost
number
required

Amortized cost representation including discounts, pre-commitment credit purchase amount, etc.

ServiceName
string
required

Display name for the service/product

ServiceProviderName
string
required

Entity making the resource/service available for purchase (v1.3)

Tags
object
required

Custom key-value metadata (ProjectId, ProjectName)

PricingCategory
enum<string>
required

Pricing model used for the charge.

Available options:
Other,
Standard,
Dynamic,
Committed
PricingCurrency
enum<string>
required
Available options:
USD
PricingQuantity
number
required
PricingUnit
string
required
RegionId
string

Provider-assigned region identifier

RegionName
string

Display name for the region

ServiceCategory
enum<string>

High-level category of the service

Available options:
AI and Machine Learning,
Analytics,
Business Applications,
Compute,
Databases,
Developer Tools,
Multicloud,
Identity,
Integration,
Internet of Things,
Management and Governance,
Media,
Migration,
Mobile,
Networking,
Security,
Storage,
Web,
Other