Skip to main content
A customer is created automatically on a buyer’s first purchase. You can also create one yourself, and you can tie it to your own user with an external id.

Entitlements in one read

customers.state returns everything a customer is entitled to right now:
past_due means a renewal failed and the customer is inside the dunning grace period. Gate on status === "active" if you want to be stricter.

Stay in sync without polling

Subscribe to the customer.state_changed webhook. Its data is the same document the state endpoint returns, and bursts of changes (a purchase emits an order, a subscription and several grants) are coalesced into one event. A good pattern:
  1. Cache state per user.
  2. Refresh the cache when customer.state_changed arrives.
  3. Fall back to a direct read if the cache is missing.

Listing