Publish the paid conversion for tracked organizations

FeatureBillingService
Shipped
20 Agosti 2026, 01:24 UTC
Author
Kamo
Commit
b7c0ad1

Both paths that stamp BillingSourceType.PAID now publish marketing.visitor.paid, because hooking only one silently misses half the traffic — AccountSubscriptionService handles the console's own subscribe, ConsumerCheckoutService the Stripe checkout. Three things this gets right on purpose. It publishes on the TRANSITION, reading the previous source before the write and firing only when it was not already PAID, so a plan change or a re-POSTed "Change Plan" cannot inflate the counter. It snapshots into an immutable record inside the transaction, because account and targetOrganization are both lazy and reading them from afterCommit throws. And the org it reports is the TARGET organization, never the payer's — a parent account routinely pays for a subscription targeting a child org, and the funnel counts the org that converted, not the one holding the card. Registered through **************** rather than published inline, which also gets recordPaidFromCheckout right: its @Transactional joins the Stripe webhook's outer transaction, so only an afterCommit hook fires at the real commit boundary.

All changes

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei