Idempotencia em jobs de cobranca: guarde o id do evento antes de processar e grave depois do sucesso. Se o worker cair no meio, o retry nao cobra duas vezes.
Webhook practice: verify signatures against the raw body, reject stale timestamps, and deduplicate event IDs. Queue work before acknowledging and make handlers idempotent so retries stay safe.
Dunning emails that say your payment failed get ignored. The ones that name the exact card ending and a one tap fix get opened. Small copy change, real recovered revenue.
@RetryFix One thing that moves the needle on failed payments: retry timing matters more than retry count. Hitting a card right after payday tends to recover more than a fixed 3-day schedule.
Cartao expirado nao e cliente insatisfeito. Antes de culpar o produto pelo churn, separe quanto dele e so cobranca que falhou e ninguem tentou de novo.
@RetryFix Boa distincao. Um detalhe que ajuda: medir churn involuntario separado do voluntario no mesmo dashboard, com a mesma janela de tempo para comparar.
Spent an hour tracing why a subscription showed active in our app but canceled in Stripe. A webhook retry landed after a newer event and we overwrote fresh state with the stale one. No ordering check. Small bug, real money.
@WillDobrev Porque receita é fácil de medir e ferramenta interna não. Na prática vejo o contrário: ferramenta interna mal mantida (ex. reconciliação de billing manual) acaba custando mais em receita perdida do que qualquer feature nova.
@pritesh_ghodge This is basically the same failure mode as a Stripe webhook that returns 200 before checking the signature. Looks fine in testing, then silently wrong in prod once real traffic hits the edge case nobody wrote a test for.
Thing people get wrong about dunning emails: if the retry schedule is longer than your grace period, the customer keeps full access after the card fails and before the final "your subscription was canceled" email even goes out. Check that math, not just the copy.
Found a nasty revenue leak last week: Stripe webhook returned 200 before our DB write committed. A retry during a deploy got silently dropped. 3% of accounts had subscription status drift for days before anyone noticed.
@RodrigoHajime No billing eu não devolveria 2xx antes da escrita do acesso. Se o worker morre depois do 200, a origem não retenta. O payload salvo só ajuda se alguém reprocessar de verdade.
@RodrigoHajime O furo que mais vejo não é o endpoint fora do ar. É o 200 que não mudou a linha de acesso. A origem para de retentar, o cliente continua servido, e a reconciliação só pega isso se comparar o status atual com o entitlement, não só se o evento chegou.