Overview
The/check endpoint verifies whether a customer has access to a specific feature or product. Use it to:
- Gate features behind paywalls
- Display remaining usage limits
- Show upgrade prompts when limits are reached
- Combine check + track in a single atomic operation
Quick Start
Parameters
string
required
The ID of the customer to check access for.
string
The ID of the feature to check. Use either
featureId or productId.string
The ID of the product to check. Use either
featureId or productId.string
The ID of the entity for entity-scoped checks (e.g., per-seat limits).
number
default:"1"
Minimum balance required for access. Returns
allowed: false if the customer’s balance is below this value.boolean
default:"false"
If true, atomically records a usage event while checking access. Combines check + track in one call.
boolean
default:"false"
If true, includes upgrade/upsell information when access is denied. Useful for displaying paywalls.
object
Additional properties to attach to the usage event (only used if
sendEvent: true).Response
Common Use Cases
Simple Feature Gate
Display Remaining Usage
Atomic Check + Track
UsesendEvent: true to check access and record usage in a single atomic operation:
Show Upgrade Options on Limit
Entity-Scoped Checks (Per-Seat Limits)
Error Handling
Balance Breakdown
When a customer has multiple sources of balance (multiple plans, top-ups, rollovers), thebreakdown array shows where each portion comes from:
Query Parameters
boolean
default:"false"
Bypass cache and fetch fresh data from the database.
string[]
Expand related objects. Supports:
"balance.feature"Related Endpoints
- Track Endpoint - Record usage events after check
- Attach Endpoint - Upgrade customer when limits are reached
- Webhooks - Listen for balance changes
Next Steps
Track Usage
Learn how to record usage events
Handle Upgrades
Upgrade customers when they hit limits