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"
}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.
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"
}Customer reference identifier
"cus_3C4D5E6F"
Product reference identifier
"prd_1A2B3C4D"
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.
"pln_2B3C4D5E"
Limit check result
Remaining usage units before hitting the limit
997
Whether the customer is within their usage limits
true
Checkout session ID if payment is required
"e3f1c2d4b6a89f001122334455667788"
Checkout URL if payment is required
"https://solvapay.com/customer/checkout?id=e3f1c2d4b6a89f001122334455667788"