02 ยท Webhooks โ†’ PaymentEventProcessor: accepted events, writes, emails, rejections (14 Oct 2026)

02 ยท Webhooks โ†’ PaymentEventProcessor: accepted events, writes, emails, rejections (14 Oct 2026) An architecture diagram generated by Archify. Stripe ยท 3 event types used ยท Architecture component Stripe 3 event types used Razorpay ยท payment.*, token.* ยท Architecture component Razorpay payment.*, token.* Stripe adapter ยท signature, India card check ยท Architecture component Stripe adapter signature, India card check Razorpay adapter ยท HMAC, normalize ยท Architecture component Razorpay adapter HMAC, normalize Dedupe + process() ยท skips only processed rows ยท Architecture component Dedupe + process() skips only processed rows Redelivery reprocessed ยท failed row runs again ยท Architecture component Redelivery reprocessed failed row runs again D44 resolved ยท capture call removed ยท Architecture component D44 resolved capture call removed FAILED cycle 0 ยท PAYMENT_FAILED, email once ยท Architecture component FAILED cycle 0 PAYMENT_FAILED, email once TOKEN_SAVED ยท token; default if none ยท Architecture component TOKEN_SAVED token; default if none SUCCEEDED cycle 0 ยท PENDING_SETUP ยท Architecture component SUCCEEDED cycle 0 PENDING_SETUP SUCCEEDED plan change ยท upgrade or reactivation ยท Architecture component SUCCEEDED plan change upgrade or reactivation SUCCEEDED renewal ยท ACTIVE, stale cycle skipped ยท Architecture component SUCCEEDED renewal ACTIVE, stale cycle skipped FAILED cycle โ‰ฅ 1 ยท PAST_DUE ยท Architecture component FAILED cycle โ‰ฅ 1 PAST_DUE TOKEN_REVOKED ยท Razorpay only ยท Architecture component TOKEN_REVOKED Razorpay only Customer retry ยท same card or new card ยท Architecture component Customer retry same card or new card Confirmed mandate ยท saved by verified webhooks ยท Architecture component Confirmed mandate saved by verified webhooks Invoice + Payment ยท FX legs, org, IAM ยท Architecture component Invoice + Payment FX legs, org, IAM Trial conversion ยท plan applied, ACTIVE ยท Architecture component Trial conversion plan applied, ACTIVE Next billing job ยท period end (both gateways) ยท Architecture component Next billing job period end (both gateways) Grace + retry ยท first failure only ยท Architecture component Grace + retry first failure only Plan-change declined ยท no status change, email ยท Architecture component Plan-change declined no status change, email Next retry attempt ยท temporary reason, max 3 ยท Architecture component Next retry attempt temporary reason, max 3 Wallet top-up ยท checked vs WalletPurchase ยท Architecture component Wallet top-up checked vs WalletPurchase WalletPurchase ยท credits + WLT invoice ยท Architecture component WalletPurchase credits + WLT invoice webhook webhook retryable Legend Processor handler Stored result Verification / defect BullMQ job Payment gateway