Skip to main content
POST
Check usage limits for a customer and product

Authorizations

Authorization
string
header
required

Provider secret API key (sk_live_… / sk_test_…) supplied as a Bearer token.

Body

application/json
customerRef
string
required
Required string length: 1 - 20
productRef
string
required
Required string length: 1 - 20
includeCheckoutSession
boolean
meterName
string
usageType
string

Response

Limit check result

remaining
number
required

Remaining usage units before hitting the limit. -1 means unlimited (no finite cap).

Example:

997

withinLimits
boolean
required

Whether the customer is within their usage limits

Example:

true

activationRequired
boolean

True when the customer must activate a priced default plan before usage is allowed

balance
object

Prepaid usage balance context when the default plan is usage-based

checkoutSessionId
string

Checkout session ID if payment is required

Example:

"e3f1c2d4b6a89f001122334455667788"

checkoutUrl
string

Checkout URL if payment is required

Example:

"https://solvapay.com/customer/checkout?id=e3f1c2d4b6a89f001122334455667788"

confirmationUrl
string

Customer portal confirmation URL when activation is required (fallback when not starting checkout)

creditBalance
number

Credit balance in credits (100 credits = 1 minor currency unit), for pre-paid usage-based plans

creditsPerUnit
number

Credits per usage unit (for pre-paid usage-based plans)

currency
string

ISO 4217 currency code for credit fields

meterName
string

The meter name to use when tracking usage events

Example:

"requests"

needsTopUp
boolean

Access is blocked pending an auto-recharge top-up of the prepaid balance — onExceed: top_up.

needsUpgrade
boolean

Access is blocked pending a plan switch to the limit's target pricing — onExceed: auto_upgrade.

overage
boolean

Access is granted and usage beyond the included cap accrues an overage charge — onExceed: charge.

plans
object[]

Active plans on the product available for activation or checkout

product
object

Product the limit check applies to

throttled
boolean

Access is granted but the caller should degrade/throttle service — the limit was exceeded with onExceed: throttle.

upgraded
boolean

The customer was auto-upgraded to the target pricing to restore access — onExceed: auto_upgrade succeeded.