Record and query subscription_changed
Document what each subscription_changed row represents and which service sends it. Send test events to check the fields, then verify that the query answers your question.
- 1
Outcome becomes final
Billing service after provider reconciliation emits only after the application commits the effective subscription state and movement amount.
- 2
Choose the fields
8 required fields preserve the declared grain: One committed recurring-revenue movement per account, subscription, and effective change.
- 3
Check the test event
Check types, UTC time, alternate outcomes, idempotency, and every pseudonymous or review-classified field.
- 4
Query the result
How much recurring revenue is new, expanded, contracted, churned, or reactivated?
Grain
One committed recurring-revenue movement per account, subscription, and effective change.
Owner
Billing service after provider reconciliation
Emit when
After the application commits the effective subscription state and movement amount.
Field contract
Field types and data to exclude
Keep field names and types stable once production queries depend on them. Document optional fields and add them only when they answer a specific question.
| Field | Type | Required | Privacy | Meaning |
|---|---|---|---|---|
| timestamp_utc | timestamp | yes | non-sensitive | UTC time when the operation finishes. |
| event_id | string | yes | non-sensitive | Stable unique identifier used for deduplication. |
| release | string | yes | non-sensitive | Application or service version that emitted the event. |
| account_id | string | yes | pseudonymous | Stable internal account identifier, never an email or name. |
| subscription_id | string | yes | pseudonymous | Stable internal subscription identifier. |
| movement_type | string | yes | non-sensitive | New, expansion, contraction, churn, or reactivation. |
| plan_before | string | no | non-sensitive | Normalized plan before the effective change. |
| plan_after | string | no | non-sensitive | Normalized plan after the effective change. |
| mrr_delta_usd | number | yes | non-sensitive | Signed monthly recurring revenue movement in USD. |
| effective_at | timestamp | yes | non-sensitive | UTC time the billing change became effective. |
Synthetic JSON event
{
"timestamp_utc": "2026-07-29T10:20:00Z",
"event_id": "evt_subscription_01",
"account_id": "acct_8f31",
"release": "2026.07.3",
"subscription_id": "sub_41aa",
"movement_type": "expansion",
"plan_before": "starter",
"plan_after": "business",
"mrr_delta_usd": 84,
"effective_at": "2026-07-29T10:19:55Z"
}Privacy review
Review identifiers before ingestion
This example uses synthetic identifiers. Pseudonymous values can still be personal data, and review fields can expose business or provider context. Apply your own consent, retention, access, residency, and deletion requirements.
account_id: pseudonymoussubscription_id: pseudonymous
Validation checklist
Test the schema before building a dashboard
- Send one known subscription_changed fixture after the documented outcome boundary.
- Verify all 8 required fields arrive with the documented types.
- Retry the same event identifier and confirm the chosen deduplication behavior.
- Send a controlled failure or alternate outcome when the workflow supports one.
- Run the related SQL over a fixed window and reconcile the result to the fixture.
Common mistakes
Record one result per row
- Emitting subscription_changed before billing service after provider reconciliation knows the final outcome.
- Mixing different kinds of results in one table, which makes counts and rates ambiguous.
- Replacing controlled categories with raw URLs, payloads, prompts, or error text.
- Changing a field type in place after saved queries and dashboards depend on it.
- Adding identifiers without a documented investigation, access, and retention need.
Use the contract
Query the event and set up monitoring
Related contracts
Send a test event before production traffic
Create a free API key, send the synthetic event, and inspect the inferred table before connecting a live workflow.