Payment trace: self-serve "who was paid, who was skipped and why" per purchase (Earnings tab + admin member card)

Marty, 2026-09-16, after the third "why didn't my sponsor get paid" thread of the day (livedreams / gracie25,
Morten / Terry's linked wallets). GET /api/my/trace?who=<#|username> (yourself, anyone up to 3 levels
below you, or your own 3 uplines) and GET /api/admin/trace?who= list every purchase the member was
part of, newest first: buyer, sponsor, package, then levels 1-3 with the recipient, the skipped
positions and the reason ("not qualified: had N of 2 qualifying buyers then"), the platform share, and
a verify link. Linked extra wallets are named after their owner. Earnings tab card "Trace a payment";
admin member card gets a "Payment trace" section; chatbot canned answer + AI prompt route the
question there.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-16 12:24:53 -05:00
parent dffcaa113b
commit a727ab1ce5
6 changed files with 145 additions and 2 deletions
+11 -1
View File
@@ -693,6 +693,16 @@
<div class="feed" id="buyFeed"><div class="row muted">Nothing yet.</div></div>
</div>
</div>
<div class="card" id="traceCard">
<h3>Trace a payment</h3>
<p class="muted small" style="margin:0 0 8px">Wondering why someone did or did not get paid on a purchase? Enter a member number or username (yourself, anyone up to 3 levels below you, or your own uplines) and every purchase they were part of is laid out tier by tier: who was paid, who was skipped and why.</p>
<div style="display:flex;gap:8px;flex-wrap:wrap;align-items:center">
<input id="trWho" placeholder="member # or @username" style="max-width:260px" autocomplete="off">
<button class="btn small" id="trGo" type="button">Trace</button>
<span class="muted small" id="trMsg"></span>
</div>
<div id="trOut" style="margin-top:10px"></div>
</div>
<div class="card" id="earnGate" hidden>
<h3>Your on-chain history starts with payouts</h3>
<p class="muted small">Once payouts are switched on, every payment, referral event, and purchase in
@@ -1022,7 +1032,7 @@
<script src="/assets/common.js?v=20260916a"></script>
<script src="/assets/wallet.js?v=20260911a"></script>
<script src="/assets/promo.js?v=20260911a"></script>
<script src="/assets/my.js?v=20260916d"></script>
<script src="/assets/my.js?v=20260916e"></script>
<script src="/assets/chat.js?v=20260907l"></script>
</body>
</html>