Skip to main content

Get Lead Billing Counts

GET 

/api/billing/leads/:lead_id/counts

Get billing counts for a specific lead (optimized for tab badges).

This endpoint returns ONLY the counts in a single aggregated database query, making it much faster than fetching all the actual data. Perfect for displaying count badges in the UI.

Args: lead_id: Lead ID

Returns: Billing counts including:

  • payment_methods_count: Number of credit cards
  • subscriptions_count: Number of subscriptions (orders)
  • purchases_count: Number of one-time charges
  • transactions_count: Total number of transactions
  • invoices_count: Number of invoices

Request

Responses

Successful Response