Skip to main content

Tracking Usage

To monitor customer usage and enforce limits or billing, record each usage event with Metrifox. Send Usage Events Use the CheckAccess method to log consumable feature usage, such as AI image generations, Credits, API calls.
Before recording usage, it’s best to verify that the customer is entitled to use the feature. This helps prevent:
  • Exceeding usage limits
  • Unauthorized access
  • Unintended overage charge
Each time a customer uses a feature:
  1. Call theRecordUsage
  2. Include relevant metadata (e.g. feature Key, quantity, timestamp)
  3. Metrifox updates the customer’s usage balance accordingly
This ensures accurate enforcement of quotas, overage billing, and usage-based pricing.

SDK available in

Javascript | Ruby | cURL | Python | PHP | Go | Java
{
  "message": "Usage recorded",
  "event_name": "candidate.sourced",
  "customer_key": "cust-6d11ca90",
  "amount": 2
}

Adjusting Usage Balances

In addition to tracking consumption, you can also increase a customer’s balance for a feature by sending a negative value with EntitlementTrack. Use Case: Reclaiming Seats If a customer removes a seat, you can:
  • Send a negative quantity to credit back usage
  • Restore their available balance for future use