curl --request POST \
--url https://api.example.com/v1/sdk/limits \
--header 'Content-Type: application/json' \
--data '
{
"customerRef": "<string>",
"productRef": "<string>",
"planRef": "<string>",
"meterName": "<string>",
"usageType": "<string>"
}
'{
"withinLimits": true,
"remaining": 997,
"checkoutSessionId": "e3f1c2d4b6a89f001122334455667788",
"checkoutUrl": "https://solvapay.com/customer/checkout?id=e3f1c2d4b6a89f001122334455667788",
"meterName": "requests",
"creditBalance": 123,
"creditsPerUnit": 123,
"currency": "<string>",
"activationRequired": true,
"plans": [
{
"reference": "<string>",
"type": "<string>",
"price": 123,
"currency": "<string>",
"requiresPayment": true,
"name": "<string>",
"freeUnits": 123,
"creditsPerUnit": 123,
"billingModel": "<string>",
"billingCycle": "<string>"
}
],
"balance": {
"creditBalance": 123,
"creditsPerUnit": 123,
"currency": "<string>",
"remainingUnits": 123
},
"product": {
"reference": "<string>",
"name": "<string>"
},
"confirmationUrl": "<string>"
}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": "<string>",
"productRef": "<string>",
"planRef": "<string>",
"meterName": "<string>",
"usageType": "<string>"
}
'{
"withinLimits": true,
"remaining": 997,
"checkoutSessionId": "e3f1c2d4b6a89f001122334455667788",
"checkoutUrl": "https://solvapay.com/customer/checkout?id=e3f1c2d4b6a89f001122334455667788",
"meterName": "requests",
"creditBalance": 123,
"creditsPerUnit": 123,
"currency": "<string>",
"activationRequired": true,
"plans": [
{
"reference": "<string>",
"type": "<string>",
"price": 123,
"currency": "<string>",
"requiresPayment": true,
"name": "<string>",
"freeUnits": 123,
"creditsPerUnit": 123,
"billingModel": "<string>",
"billingCycle": "<string>"
}
],
"balance": {
"creditBalance": 123,
"creditsPerUnit": 123,
"currency": "<string>",
"remainingUnits": 123
},
"product": {
"reference": "<string>",
"name": "<string>"
},
"confirmationUrl": "<string>"
}Limit check result
Whether the customer is within their usage limits
true
Remaining usage units before hitting the limit
997
Checkout session ID if payment is required
"e3f1c2d4b6a89f001122334455667788"
Checkout URL if payment is required
"https://solvapay.com/customer/checkout?id=e3f1c2d4b6a89f001122334455667788"
The meter name to use when tracking usage events
"requests"
Credit balance in mils (for pre-paid usage-based plans)
Credits per usage unit (for pre-paid usage-based plans)
ISO 4217 currency code for credit fields
True when the customer must activate a priced default plan before usage is allowed
Active plans on the product available for activation or checkout
Show child attributes
Prepaid usage balance context when the default plan is usage-based
Show child attributes
Product the limit check applies to
Show child attributes
Customer portal confirmation URL when activation is required (fallback when not starting checkout)