From d62055520925559928b2748806e49e468372bbcb Mon Sep 17 00:00:00 2001 From: martbost Date: Wed, 19 Aug 2026 09:44:01 -0500 Subject: [PATCH] MoonPay card on-ramp for crypto-new members (zero custody) - GET /api/public/moonpay-url: returns a MoonPay checkout link for POL on Polygon (pol_polygon). With partner keys in config (moonpayPublicKey/ moonpaySecretKey, now PATCHable), the URL is HMAC-signed and prefilled with the member's own wallet address + shortfall amount; without keys it falls back to MoonPay's generic buy page. MoonPay is merchant of record - the site never touches funds. - Join page: when the connected wallet can't cover the Premium entry, a funding box appears with the exact shortfall, a buy button (new tab), and a refresh-balance button. - Training page: "buy POL with a card" callout after the funding video with the three things to get right (POL, Polygon network, own address). - Start page: one-line card-buy pointer under the sponsor card. - Chatbot canned answer + AI system prompt updated (funding guidance). Co-Authored-By: Claude Fable 5 --- private/join-now.html | 7 +++++++ public/chat.js | 2 +- public/join-now.js | 23 ++++++++++++++++++++++- public/start.html | 2 +- public/training.html | 2 ++ server.js | 20 +++++++++++++++++++- 6 files changed, 52 insertions(+), 4 deletions(-) diff --git a/private/join-now.html b/private/join-now.html index 14f83d6..15a1b33 100644 --- a/private/join-now.html +++ b/private/join-now.html @@ -27,6 +27,13 @@
Balanceβ€”
+