Skip to main content
POST
/
v1
/
sdk
/
limits
Check usage limits for a customer and product
curl --request POST \
  --url https://api.example.com/v1/sdk/limits \
  --header 'Content-Type: application/json' \
  --data '
{
  "customerRef": "cus_3C4D5E6F",
  "productRef": "prd_1A2B3C4D",
  "planRef": "pln_2B3C4D5E"
}
'
{
  "remaining": 997,
  "withinLimits": true,
  "checkoutSessionId": "e3f1c2d4b6a89f001122334455667788",
  "checkoutUrl": "https://solvapay.com/customer/checkout?id=e3f1c2d4b6a89f001122334455667788"
}

Body

application/json
customerRef
string
required

Customer reference identifier

Example:

"cus_3C4D5E6F"

productRef
string
required

Product reference identifier

Example:

"prd_1A2B3C4D"

planRef
string

Plan reference to pre-select when creating a checkout session. If provided and the customer needs to purchase, the checkout page skips plan selection and shows the payment form directly.

Example:

"pln_2B3C4D5E"

Response

Limit check result

remaining
number
required

Remaining usage units before hitting the limit

Example:

997

withinLimits
boolean
required

Whether the customer is within their usage limits

Example:

true

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"