docs: webhook fan-out reference + metadata correlation guide#17
docs: webhook fan-out reference + metadata correlation guide#17next-devin wants to merge 1 commit intomainfrom
Conversation
Two improvements to help external developers self-serve on common integration questions: 1. webhooks/index.mdx — new "Event Trigger Sources" section listing the models whose post_save fires each *.updated event (so subscribers can pick the leanest event for their use case), plus an "Identifying Rebill Orders" section covering the order subscriptions block and the transaction.subscription.billing_cycle counter. 2. admin-api/guides/metadata-and-correlation.mdx — new guide enumerating the 9 metadata-supported object types, with a callout that subscriptions/carts aren't directly metadata-managed. Walks through the canonical attribution.metadata pattern for cross-rebill external ID correlation (set once on subscription attribution, flows through subscription/order/transaction webhooks via FK inheritance with no follow-up API call). Includes a worked plan_id example and a "When to Use Which Surface" decision table. Surfaced via support inquiry from a merchant building integration to an external plan-management service. The fan-out + correlation patterns were institutional knowledge that took multiple rounds to produce authoritatively; this PR puts both into the public docs so future developers get the answer on first read. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Overview
Other Observations (not in diff)One item noted for awareness:
Files Reviewed (3 files)
Reviewer Notes: The PR adds two valuable documentation improvements: (1) an "Event Trigger Sources" table clarifying the fan-out behavior of The changes are accurate, well-structured, and follow existing documentation patterns. The internal links ( Reviewed by minimax-m2.7 · 315,002 tokens |
|
@alexphelps is this worth adding? Or just noise? |
Summary
Two additions to help external developers self-serve on common integration questions surfaced via support inquiries:
webhooks/index.mdx— new sections on event trigger sources and rebill identificationadmin-api/guides/metadata-and-correlation.mdx— new guide on the canonical metadata patterns, including cross-rebill correlation via `attribution.metadata`What's in each file
content/docs/webhooks/index.mdx§ Event Trigger Sources — most `*.updated` events fan out across multiple sender models, not just the headline resource. The new table lists every model whose change fires each event (e.g., `order.updated` fires on Order, Line, Transaction, Refund, MarketingAttribution, ShippingAddress, BillingAddress, Fulfillment, plus tag changes). Picking the leanest event for a use case is currently institutional knowledge; this surfaces it.
Includes a callout recommending `transaction.created` filtered to `type: "debit"` as the leanest signal for "fulfill on charge."
§ Identifying Rebill Orders — explains how to distinguish renewal orders from new-customer orders:
content/docs/admin-api/guides/metadata-and-correlation.mdx(new)Why now
Surfaced via merchant inquiry from a customer building integration to an external plan-management service. The conversation took multiple rounds to produce an authoritative answer because the canonical pattern (`attribution.metadata` rebill inheritance) wasn't documented anywhere public, the metadata-managed object list was buried inside the Metadata API enum, and event fan-out semantics were institutional knowledge. This PR puts all three into the docs so the next developer asking the same question gets the answer on first read.
Test plan
🤖 Generated with Claude Code