customer.state_changed webhook whenever it changes. See Customers for the concept.
The examples use the sandbox client from the quickstart overview, on API version 2026-10.
Read the state
getState (get_state in Python), or GET /v1/customers/{id}/state.
To look up the same information by hand:
- Dashboard
- CLI
- Prompt
- Open Customers
- Select the customer
- Overview lists their Subscriptions and Benefit Grants
- Usage shows each meter’s consumed and credited units
Handle customer.state_changed
The webhook’s payload is the full state, so you don’t need to fetch anything:
Terminal
The state object
Common checks:
- A plan: a subscription in
active_subscriptionswith yourproduct_id. A subscription canceled at period end stays here until it ends. - A feature flag: a grant in
granted_benefitswith yourbenefit_id, or with abenefit_metadatakey you set on the benefit. See Feature flags. - Credits left: the
balanceof your meter inactive_meters. Polar never blocks usage, so enforce limits in your app.
When customer.state_changed fires
- A customer is created, updated or deleted
- A subscription is created, updated, canceled, revoked or renewed
- A benefit is granted, updated or revoked
- A meter balance changes, from usage or credits
- A license key changes

