You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8cfbf9e
Browse filesBrowse the repository at this point in the historyBrowse files
smshub-nightly + a Money section in pairux-nightly (#26)
smshub-nightly: a nightly email for smshub.dev, revenue first. CoinPay
number_orders settled (count + USD, new rentals vs renewals, new paying
customers, first-ever payment banner), rentals active/ended/running out
and a monthly run-rate, checkouts opened vs paid; the funnel from the
CrawlProof tracker rollups (visitors, home, /numbers,
/verification-numbers, /register) through signups, confirmations,
checkouts and payments with 7/30-day context; inbound SMS, OTP codes and
calls on rented numbers. Read-only against smshub's dev2 Supabase and
crawlproof's Postgres; internal accounts excluded.
pairux-nightly: Money section with outside paid plans by tier, plan
checkouts started vs settled (count + USD), cap refusals from PR #146
(the only upgrade-prompt signal that is logged) and a first-ever payment
banner.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: bin/pairux-nightly
+65-4Lines changed: 65 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -132,7 +132,10 @@ async function accounts() {
132
132
bookings: await q("select host_user_id u, created_at from booking_pages"),
133
133
analyses: await q("select host_user_id u, created_at from call_analyses"),
134
134
translation: await q("select user_id u, created_at from translation_usage"),
135
-
paid: await q("select (select count(*)::int from profiles where plan is not null and plan <> 'free') plans, (select count(*)::int from plan_payments where status in ('paid','confirmed','completed','credited')) payments"),
135
+
plans: await q("select id u, plan, plan_expires_at from profiles where plan is not null and plan <> 'free'"),
136
+
payments: await q("select user_id u, plan, amount_usd::float8 amount, status, created_at, credited_at from plan_payments"),
137
+
// PR #146: a join refused at the plan cap bumps sessions.settings.capRefusedCount; that is when the host sees the upgrade prompt.
138
+
caps: await q("select host_user_id host, (settings->>'capRefusedCount')::int refused, settings->>'capRefusedAt' refused_at from sessions where settings ? 'capRefusedCount'"),
${row('Paid plans active (outside)',`${tierList(m.tiers)}${m.internalTiers.length ? `<div style="font-size:11px;color:${MUTE}">ours, not counted: ${tierList(m.internalTiers)}</div>` : ''}`)}
400
+
${row('Plan checkouts started that day',`${n(m.day.started)} (${usd(m.day.startedUsd)}) · ${esc(dayLabel(PREV))}${n(m.prev.started)} · ${n(m.started30)} in 30 days · ${n(m.startedAll)} all-time`)}
401
+
${row('Plan payments settled that day',`<b>${n(m.day.settled)} (${usd(m.day.settledUsd)})</b> · ${esc(dayLabel(PREV))}${n(m.prev.settled)} (${usd(m.prev.settledUsd)})`)}
402
+
${row('Settled all-time',`${n(m.settledAll)} (${usd(m.settledUsdAll)})${m.byPlan.length ? ` · ${tierList(m.byPlan)}` : ''} · ${n(m.pendingAll)} started but never settled${m.firstSettled ? ` · first ${esc(dayLabel(m.firstSettled,true))}` : ' · <b>no outside payment yet</b>'}`)}
403
+
${row('Upgrade prompts (room at its plan cap)',`${n(m.capRoomsDay)} rooms turned someone away that day · ${n(m.capRooms)} rooms, ${n(m.capRefusedAll)} people turned away all-time<div style="font-size:11px;color:${MUTE}">only the cap refusal is logged (sessions.settings.capRefusedCount, PR #146); prompt views and which button started a checkout are not recorded</div>`)}
${a ? row('Meetings started that day',`${n(d.meetings)} by outside hosts · ${n(d.together)} with 2+ people joining · ${n(d.joins)} joins (${n(d.guests)} guests)`) : ''}
@@ -398,7 +458,6 @@ ${a ? row('Scheduled meetings', `${n(a.scheduledDay)} created that day · ${n(a.
398
458
${a ? row('Recordings',`${n(a.recordingsDay)} that day · ${n(a.recordings)} all-time (${a.recordedHours.toFixed(1)} h)`) : ''}
0 commit comments