Entitlement & Credit Trigger Webhooks
Entitlement & Credit Trigger Webhooks
Entitlement & Credit Trigger Webhooks
Entitlement and credit trigger webhooks fire based on your customers’ feature usage, not on data changes. They’re useful for notifying your team when customers are approaching or have hit a limit, and for surfacing in-app notifications to customers about their usage.
Entitlement triggers fire when a company’s usage for a specific feature crosses a threshold:
Limit types explained:
limit) — the point at which access is restricted. For usage included with a plan, this represents that full usage amount. For pay as you go and overage pricing, this represents a (normally hidden) upper bound of usage you can configure, typically to prevent abuse or runaway spend.soft_limit) — For overage pricing, represents the point at which users will start being billed for usage. This is configurable and shown to the user in Schematic components.tier_limit) — For tiered pricing, fires as a company crosses into each successive pricing tier, letting you notify them of cost changes or prompt an upgrade.Entitlement triggers must be configured per feature. When creating or updating a webhook endpoint in Schematic, add one or more entitlement trigger configs — each specifying the feature_id you want to monitor.
The body of each entitlement trigger webhook is typed as WebFeatureUsageWebhookOutput in the Node.js SDK:
Credit triggers fire based on credit usage:
Credit triggers are configured per credit type, using a credit_id in the trigger config when creating or updating a webhook endpoint.
These events fire when a scheduled credit auto-topup fails:
auto.topup.hard.failure — typed as CreditsAutoTopupHardFailure:
auto.topup.retry.exceeded — typed as CreditsAutoTopupRetryFailure: