Limits

Check usage limits for a customer and product

Changed on

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

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 deducted per metered item (for prepaid usage-based plans)

currencystring

ISO 4217 currency code for credit fields

limitnumber

The effective finite cap for this meter. Present only when the backend measured a finite cap.

meterNamestring

The meter name to use when tracking usage events

needsTopUpboolean

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.

overageboolean

Access is granted past the included cap and the usage is paid from prepaid credits — onExceed: draw_credits.

paywallReason'activation_required' | 'topup_required' | 'payment_required' | 'limit_reached'

Authoritative paywall classification shared with Managed MCP. Present on denial responses only.

planNamestring

Display name of the active or default plan

planRefstring

Active plan reference when the customer already holds a purchase

purchaseRefstring

Active purchase reference when the customer already holds a purchase

remainingnumber required

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

usednumber

Consumed usage units this period. Present only when the backend measured a finite cap.

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
}

Changes

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property to the response with the status

    • info

      response property plans/items/creditsPerUnit deprecated