18 KiB
18 KiB
CheckResponse
OK
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
allowed |
bool | ✔️ | Whether the customer is allowed to use the feature. True if they have sufficient balance or the feature is unlimited/boolean. | |
customer_id |
str | ✔️ | The ID of the customer that was checked. | |
entity_id |
OptionalNullable[str] | ➖ | The ID of the entity, if an entity-scoped check was performed. | |
required_balance |
Optional[float] | ➖ | The required balance that was checked against. | |
balance |
Nullable[models.Balance] | ✔️ | The customer's balance for this feature. Null if the customer has no balance for this feature. | { "feature_id": "messages", "granted": 100, "remaining": 72, "usage": 28, "unlimited": false, "overage_allowed": false, "max_purchase": null, "next_reset_at": 1773851121437, "breakdown": [ { "id": "cus_ent_39qmLooixXLAqMywgXywjAz96rV", "plan_id": "pro_plan", "included_grant": 100, "prepaid_grant": 0, "remaining": 72, "usage": 28, "unlimited": false, "reset": { "interval": "month", "resets_at": 1773851121437 }, "price": null, "expires_at": null } ] } |
preview |
Optional[models.Preview] | ➖ | Upgrade/upsell information when access is denied. Only present if with_preview was true and allowed is false. |