latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-204887241.6 KB

d29ab7373802

Limits

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.

post/v1/sdk/limits

Request body

customerRefstring required
includeCheckoutSessionboolean
meterNamestring
productRefstring required
usageTypestring

Response

Limit check result

activationRequiredboolean

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

checkoutSessionIdstring

Checkout session ID if payment is required

checkoutUrlstring

Checkout URL if payment is required

confirmationUrlstring

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

creditBalancenumber

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

creditsPerUnitnumber

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

currencystring

ISO 4217 currency code for credit fields

meterNamestring

The meter name to use when tracking usage events

needsTopUpboolean

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

needsUpgradeboolean

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

overageboolean

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

remainingnumber required

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

throttledboolean

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

upgradedboolean

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

withinLimitsboolean required

Whether the customer is within their usage limits

Example response

{
  "checkoutSessionId": "e3f1c2d4b6a89f001122334455667788",
  "checkoutUrl": "https://solvapay.com/customer/checkout?id=e3f1c2d4b6a89f001122334455667788",
  "meterName": "requests",
  "remaining": 997,
  "withinLimits": true
}