Check usage limits for a customer and product
Checks whether a customer has an active purchase for a product and is within their usage limits. Returns a checkout URL if payment is required.
Authorizations
Provider secret API key (sk_live_… / sk_test_…) supplied as a Bearer token.
Body
1 - 201 - 20SDK-only free-tool allowance. Authenticated by the provider secret key, so cap is the provider's own declaration, not customer input.
Response
Limit check result
Remaining usage units before hitting the limit. -1 means unlimited (no finite cap).
997
Whether the customer is within their usage limits
true
True when the customer must activate a priced default plan before usage is allowed
Per-provider auto-recharge snapshot read off the customer document. Omitted when no config exists.
Prepaid usage balance context when the default plan is usage-based
Checkout session ID if payment is required
"e3f1c2d4b6a89f001122334455667788"
Checkout URL if payment is required
"https://solvapay.com/customer/checkout?id=e3f1c2d4b6a89f001122334455667788"
Customer portal confirmation URL when activation is required (fallback when not starting checkout)
Credit balance in credits (100 credits = 1 minor currency unit), for pre-paid usage-based plans
Credits deducted per metered item (for prepaid usage-based plans)
ISO 4217 currency code for credit fields
The effective finite cap for this meter. Present only when the backend measured a finite cap.
The meter name to use when tracking usage events
"requests"
Access is blocked until prepaid credits cover the next unit — past an included cap with onExceed: draw_credits, or from the first unit on a recurring meter with no limit.
Access is granted past the included cap and the usage is paid from prepaid credits — onExceed: draw_credits.
Authoritative paywall classification shared with Managed MCP. Present on denial responses only.
activation_required, topup_required, payment_required, limit_reached Display name of the active or default plan
Active plan reference when the customer already holds a purchase
Active plans on the product available for activation or checkout
Product the limit check applies to
Active purchase reference when the customer already holds a purchase
Consumed usage units this period. Present only when the backend measured a finite cap.