What’s inside the object
A customer state object is a complete entitlement snapshot. Instead of joining subscriptions, benefits, and usage by hand, you get them pre-resolved:Because Macropay is the Merchant of Record, those subscriptions and benefits are billed and tax-collected under our name — you read the resolved entitlement and provision access, while we remit sales tax and VAT worldwide on your behalf.
Read it on demand
When you need the state right now — say, on login or before serving a gated request — fetch it directly. Query by your own ID or by Macropay’s:By your external ID
Use the customer ID you already store. No extra mapping table required.
By Macropay customer ID
The same payload, keyed by the internal Macropay customer ID.
Stay in sync
Polling works for on-demand checks, but for keeping your own database current you want to be told the moment anything changes. Subscribe to thecustomer.state_changed webhook and Macropay pushes the full, updated state object whenever:
- A customer is created, updated, or deleted.
- A subscription starts or changes.
- A benefit is granted or revoked.
customer.state_changed
One event that mirrors the full state object on every change.