flowglad-usage-tracking

Record usage events for usage-based billing with idempotent transactionIds.

2|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/flowglad/skills --skill flowglad-usage-tracking
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flowglad-usage-tracking
Source: https://github.com/flowglad/skills/tree/main/skills/usage-tracking
Command: npx skills add https://github.com/flowglad/skills --skill flowglad-usage-tracking

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill delivers reliable usage-based billing by capturing consumption events, enforcing idempotency, and presenting real-time balance data to users, reducing revenue leakage and billing disputes.

Core Features & Use Cases

  • Client-side usage events: track API calls and feature usage with smart defaults, ensuring ids and subscriptions are handled automatically.
  • Server-side tracking: record usage atomically during expensive operations to maintain financial accuracy.
  • Balance visibility: display current credits, usage history, and upgrade prompts when limits approach.

Quick Start

Integrate the skill by using the client API to record usage events for fast, user-facing meters, or implement server-side recording in API routes to ensure atomic billing.

Frequently Asked Questions about flowglad-usage-tracking

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement metered billing for API calls?

Metered billing for API calls is implemented by recording usage events via client-side or server-side APIs. The system applies smart defaults client-side and tracks atomically server-side to ensure accurate consumption billing.

How does idempotency work for usage tracking transactions?

Idempotency in usage tracking works by enforcing idempotent transactionIds during usage recording. This prevents duplicate billing charges and revenue leakage when recording consumption events.

Can I check user balances before executing expensive operations?

Yes, you can check user balances before executing expensive operations. The system supports server-side balance checks to verify sufficient credits before allowing costly API routes to proceed.

What is the best way to display real-time balance data to users?

Displaying real-time balance data is best handled by leveraging the balance visibility features. This presents current credits, usage history, and automatic upgrade prompts when users approach their limits.

How do I resolve usage pricing for a specific meter?

Usage pricing for a specific meter is resolved by utilizing either the usageMeterSlug or priceSlug parameters. This allows the system to accurately identify and apply the correct price for server-side tracking.