Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
The existing CAPI only sent CompleteRegistration (signup). For a B2B funnel where trials are cheap (~25 TRY) but paid is rare (~1% of trials), the highest-value signal Meta can optimize on is the realized-revenue Purchase. Add MetaCapiService.sendPurchase and fire it from activateSubscription — the shared chokepoint for BOTH Stripe (webhook) and EFT/manual activation — so all paid revenue is sent regardless of method. Hashed-email Advanced Matching (no browser fbp/fbc in the webhook); event_id = purchase_<subscriptionId> dedupes a browser Purchase. Awaited so it ships before the short request returns; fail-open. This is the "teach Meta to find payers, not end-users" lever from adsOpt.md Phase 0. Still gated on activating CAPI in prod (merge + META_CAPI_PIXEL_ID/ACCESS_TOKEN env). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>