Wallet system: top-ups, coupons, credits, AI usage and admin controls (14 Oct 2026)

Wallet system: top-ups, coupons, credits, AI usage and admin controls (14 Oct 2026) A workflow diagram generated by Archify. 01 / Customer portal, AI service, emails 02 / Wallet server and gateways 03 / Wallet data 04 / Admin console and background jobs Request and price Pay Credit and use Wallet page · USD amount, pick gateway · Customer portal, AI service, emails › Request and price Wallet page USD amount, pick gateway Top-up refused · 403 status, coupon errors · Customer portal, AI service, emails › Request and price Top-up refused 403 status, coupon errors Purchase email · amount paid + credits · Customer portal, AI service, emails › Credit and use Purchase email amount paid + credits AI chat service · internal token usage · Customer portal, AI service, emails › Credit and use AI chat service internal token usage initiatePurchase · ACTIVE or TRIALING only · Wallet server and gateways › Request and price initiatePurchase ACTIVE or TRIALING only Stripe or Razorpay · USD Checkout / INR order · Wallet server and gateways › Pay Stripe or Razorpay USD Checkout / INR order Payment confirmed · webhook or Razorpay verify · Wallet server and gateways › Pay Payment confirmed webhook or Razorpay verify handleTopupSucceeded · credit once, WLT number · Wallet server and gateways › Credit and use handleTopupSucceeded credit once, WLT number AI metering debit · 402 when balance short · Wallet server and gateways › Credit and use AI metering debit 402 when balance short wallet_credit_settings · rates and alert % · Wallet data › Request and price wallet_credit_settings rates and alert % wallet_coupons · reserve, redeem, release · Wallet data › Request and price wallet_coupons reserve, redeem, release wallet_purchases · pending → completed · Wallet data › Pay wallet_purchases pending → completed wallets + transactions · balance, CAS version · Wallet data › Credit and use wallets + transactions balance, CAS version Wallet settings · credit rate, alert %, INR · Admin console and background jobs › Request and price Wallet settings credit rate, alert %, INR Wallet coupons · create, toggle, delete · Admin console and background jobs › Request and price Wallet coupons create, toggle, delete wallet-coupon-expiry · every 5 min, 15-min TTL · Admin console and background jobs › Pay wallet-coupon-expiry every 5 min, 15-min TTL Adjust balance · credit or debit + reason · Admin console and background jobs › Credit and use Adjust balance credit or debit + reason Low balance email · crossed below threshold · Admin console and background jobs › Credit and use Low balance email crossed below threshold adjust manage PUT settings net paid > 0 credit + ledger row debit email-jobs expire, release slot alert captured refused reserve slot POST /wallet/purchase completed / failed metering/ai-logs Legend Customer / admin screen Wallet server Refused Background job / alert Wallet table Gateway / AI service