BixPay card integration, phase 1 (Marty approved the copy 2026-10-29; docs/BIXPAY-INTEGRATION.md): gated by site config bixpayLive (off by default). Profile > BixPay card field (partner link validated: bix.ibportal.io/auth/register, e= token, a=1; the appId=3 card-customer link is refused with a message), bixpay.js resolver own > sponsor chain (10 levels) > company link (bixCompanyLink, seeded with Marty's partner link), every surface says whose link it is. Wallet tab card, one-week Overview announcement (24 h snooze), one sentence in TierPaid payout emails and the games' wallet nudges, Promo tools > BixPay tab (3 posts, email swipe, 4 text-only banners on the Spaces CDN, tracked link + per-member clicks), public guide /bixpay with masked app screenshots, chatbot canned answers + facts gated to 'coming soon' while off (KNOWLEDGE_DATE 2026-10-29). Clicks per surface via /go/bixpay in the admin Traffic tab; admin Overview counts members with a link; member card shows it; signed /api/partner/bixpay and the lssync profile row carry it for LinkSpin/CTB. accounts.bix_partner_link column (db.js alterSafe). Tests: qa/bixpay.test.cjs (17) + walk.mjs BixPay block; my.js/promo.js/admin.js ?v=20261029bx.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-29 07:56:49 -05:00
parent 6e1ab102f1
commit ed6febe0b8
29 changed files with 971 additions and 27 deletions
+5 -1
View File
@@ -36,6 +36,7 @@ const pub = a => a ? { email: a.email, sponsorRef: a.sponsorRef || '', code: a.c
username: a.username || null, memberId: a.memberId || 0, joinedVia: a.joinedVia || null, joinedRef: a.joinedRef || null,
lineBannerUrl: a.lineBannerUrl || null, lineTargetUrl: a.lineTargetUrl || null, wallOffers: a.wallOffers || null,
avatarUrl: a.avatarUrl || null, bio: a.bio || null, socials: a.socials || null,
bixPartnerLink: a.bixPartnerLink || null, // BixPay partner link (bixpay.js, 2026-10-29): one identity, follows the member to LinkSpin/CTB
chatAvailable: a.chatAvailable === false ? false : true, lastSeen: a.lastSeen || 0,
address: a.address || null, created: a.created } : null;
const USER_RE = /^[a-zA-Z0-9_]{3,20}$/;
@@ -125,6 +126,7 @@ const J = {
this.save();
return { ok: true, account: pub(acct) };
},
async setBixLink(e, link) { const acct = this.db.byEmail[e]; if (!acct) return { error: 'No such account.' }; acct.bixPartnerLink = link || null; this.save(); return { ok: true, account: pub(acct) }; },
async touchSeen(e) { const a = this.db.byEmail[e]; if (a) { a.lastSeen = Date.now(); this.save(); } },
async setChatAvailable(e, v) { const a = this.db.byEmail[e]; if (!a) return { error: 'No such account.' }; a.chatAvailable = !!v; this.save(); return { ok: true, available: !!v }; },
async getMutes(e) { const a = this.db.byEmail[e]; return (a && Array.isArray(a.chatMutes)) ? a.chatMutes : []; },
@@ -228,7 +230,7 @@ const J = {
const rowPub = r => r ? pub({ email: r.email, sponsorRef: r.sponsor_ref, code: r.code,
username: r.username, memberId: r.member_id || 0, joinedVia: r.joined_via || null, joinedRef: r.joined_ref || null,
lineBannerUrl: r.line_banner_url, lineTargetUrl: r.line_target_url, wallOffers: r.wall_offers || null,
avatarUrl: r.avatar_url, bio: r.bio, socials: r.socials,
avatarUrl: r.avatar_url, bio: r.bio, socials: r.socials, bixPartnerLink: r.bix_partner_link || null,
chatAvailable: r.chat_available === 0 ? false : true, lastSeen: Number(r.last_seen || 0),
address: r.address, created: Number(r.created) }) : null;
const D = {
@@ -289,6 +291,7 @@ const D = {
if (socials !== undefined) await db.q('UPDATE accounts SET socials=? WHERE email=?', [socials || null, e]);
return { ok: true, account: await this.byEmail(e) };
},
async setBixLink(e, link) { const r = await db.q('UPDATE accounts SET bix_partner_link=? WHERE email=?', [link || null, e]); if (!r || !r.affectedRows) return { error: 'No such account.' }; return { ok: true, account: await this.byEmail(e) }; },
async touchSeen(e) { await db.q('UPDATE accounts SET last_seen=? WHERE email=?', [Date.now(), e]); },
async setChatAvailable(e, v) { await db.q('UPDATE accounts SET chat_available=? WHERE email=?', [v ? 1 : 0, e]); return { ok: true, available: !!v }; },
async getMutes(e) {
@@ -504,6 +507,7 @@ module.exports = { init, signup, login, ensure, onChange, isUnclaimedShell, byEm
setLineBanner: (e, b, t) => impl().setLineBanner(String(e || '').toLowerCase(), b, t),
setWallOffers: (e, j) => impl().setWallOffers(String(e || '').toLowerCase(), j),
setProfile: async (e, a, bio, socials) => { const r = await impl().setProfile(String(e || '').toLowerCase(), a, bio, socials); if (!(r && r.error)) changed(String(e || '').toLowerCase()); return r; }, // profile edits reach LinkSpin too
setBixLink: async (e, link) => { const r = await impl().setBixLink(normEmail(e), link ? String(link).slice(0, 300) : null); if (!(r && r.error)) changed(normEmail(e)); return r; }, // the BixPay partner link rides to LinkSpin in the profile row (lssync.js)
touchSeen: e => impl().touchSeen(String(e || '').toLowerCase()),
adminSetAddress: (e, a) => impl().adminSetAddress(String(e || '').toLowerCase(), a ? normAddr(a) : null),
positionByAddress: a => impl().positionByAddress(normAddr(a)),
+120
View File
@@ -0,0 +1,120 @@
// BixPay card integration, phase 1 (Marty approved 2026-10-29; spec docs/BIXPAY-INTEGRATION.md).
// BIX is a separate company: a self-custody wallet with a Visa card spent from USDT/USDC. We only carry each member's
// PARTNER link (bix.ibportal.io/auth/register?e=<token>&a=1) so anyone who gets a card through their pages is credited to
// them in the BIX portal. Nothing is settled on our side: the portal tracks directs and levels itself.
//
// One identity, sponsor follows (feedback-one-identity-sponsor-follows): the link a visitor gets is the member's own,
// else the first sponsor up the chain (10 levels) with one, else the company link (site config bixCompanyLink). Every
// surface says WHOSE link is in play ("you" / "@sponsor" / "network") so members add their own and sponsors get their
// teams signed up.
//
// Everything is gated by site config bixpayLive ('0' = nothing shows; the admin flips it in Admin > Settings).
// Clicks: every surface links through /go/bixpay?s=<surface>[&m=<member>] which counts here (DATA_DIR/bixpay-clicks.json)
// and 302s to the resolved partner link. Counts per surface land in the admin Traffic tab, per member on the Promo tab.
const fs = require('fs');
const path = require('path');
let R = {}; // { dataDir, accounts, siteConfig, refAccount }
const HOST = 'bix.ibportal.io';
const PATH = '/auth/register';
const MAX_LEN = 300;
const MAX_LEVELS = 10;
// Marty's own PARTNER link (IB12143793): the company fallback until Admin > Settings bixCompanyLink says otherwise
const DEFAULT_COMPANY_LINK = 'https://bix.ibportal.io/auth/register?e=XqwU9T1aJ5N0UJ0yr9x0TGUiSQTsVCkTM01MIovVNnc&a=1';
const SURFACES = ['wallet', 'overview', 'email', 'nudge', 'promo', 'guide', 'chat'];
const CUSTOMER_LINK_MSG = "That's the card-customer link. Paste the Partner link from your BIX portal profile instead.";
const ANNOUNCE_MS = 7 * 86400000; // the Overview announcement card shows for the first week after the switch is flipped
function init(opts) { R = opts || {}; }
const cfg = () => { try { return (R.siteConfig && R.siteConfig()) || {}; } catch (e) { return {}; } };
function live() { return String(cfg().bixpayLive == null ? '0' : cfg().bixpayLive) === '1'; }
function companyLink() { const v = validate(cfg().bixCompanyLink); return v.ok ? v.link : DEFAULT_COMPANY_LINK; }
// the Overview announcement runs a week from bixpayLiveSince (stamped by the admin settings route when the switch is flipped on)
function announcing() { if (!live()) return false; const t = Date.parse(String(cfg().bixpayLiveSince || '')); return !(t > 0) || Date.now() - t < ANNOUNCE_MS; }
// A pasted partner link -> { ok: true, link } (normalised to e= and a=1 only) or { error }.
// The card-customer link carries appId=3 (it makes a card customer, not a partner): refused with the message members see.
function validate(input) {
const s = String(input == null ? '' : input).trim();
if (!s) return { error: 'Paste your BixPay partner link first.' };
if (s.length > MAX_LEN) return { error: 'That link is too long. Copy the Partner link from your BIX portal profile.' };
let u; try { u = new URL(s); } catch (e) { return { error: 'That is not a full link. It starts with https://bix.ibportal.io/auth/register?e=' }; }
if (u.protocol !== 'https:' || u.hostname.toLowerCase() !== HOST) return { error: 'A BixPay partner link lives on https://bix.ibportal.io. Copy it from your BIX portal profile (Profile > Partner).' };
if (u.pathname.replace(/\/+$/, '') !== PATH) return { error: 'That is not the register link. It looks like https://bix.ibportal.io/auth/register?e=...&a=1' };
if (u.searchParams.has('appId') || u.searchParams.has('appid')) return { error: CUSTOMER_LINK_MSG };
const e = String(u.searchParams.get('e') || '').trim();
if (!/^[A-Za-z0-9_-]{16,128}$/.test(e)) return { error: 'The link is missing its e= token. Copy the whole Partner link from your BIX portal profile.' };
if (String(u.searchParams.get('a') || '').trim() !== '1') return { error: 'The link needs a=1 on the end. Copy the whole Partner link from your BIX portal profile.' };
return { ok: true, link: 'https://' + HOST + PATH + '?e=' + e + '&a=1' };
}
const nameOf = a => a ? (a.username ? '@' + a.username : a.memberId ? 'member #' + a.memberId : 'your sponsor') : null;
// bixLinkFor(member): own link, else the first sponsor up the chain with one (10 levels), else the company link.
// -> { link, whose: 'you' | 'sponsor' | 'network', name, email } (name/email = the sponsor whose link it is)
async function resolve(acct) {
if (acct && validate(acct.bixPartnerLink).ok) return { link: validate(acct.bixPartnerLink).link, whose: 'you', name: nameOf(acct), email: acct.email };
if (acct && R.accounts && R.accounts.sponsorOf) {
const seen = new Set([String(acct.email || '').toLowerCase()]);
let cur = acct;
for (let i = 0; i < MAX_LEVELS && cur; i++) {
let s = null; try { s = await R.accounts.sponsorOf(cur.email); } catch (e) { s = null; }
if (!s || seen.has(String(s.email).toLowerCase())) break;
seen.add(String(s.email).toLowerCase());
const v = validate(s.bixPartnerLink);
if (v.ok) return { link: v.link, whose: 'sponsor', name: nameOf(s), email: s.email };
cur = s;
}
}
return { link: companyLink(), whose: 'network', name: null, email: null };
}
// the same for a public page: the referrer token (?ref / the sponsor cookie) resolves like the member it names
async function resolveRef(tok) {
let a = null; try { a = tok && R.refAccount ? await R.refAccount(tok) : null; } catch (e) { a = null; }
return resolve(a);
}
// the line every surface shows under the button
function usingLine(r) { return r.whose === 'you' ? 'Using: your link.' : r.whose === 'sponsor' ? 'Using: ' + r.name + "'s link. Add yours in Profile." : 'Using: the network link. Add yours in Profile.'; }
// tracked link for a surface (+ the member it belongs to: the sharer on promo/guide/email, the viewer on the dashboard cards)
const SITE = () => String(process.env.PUBLIC_URL || 'https://instantadpay.com').replace(/\/+$/, '');
function goLink(surface, token) { return SITE() + '/go/bixpay?s=' + encodeURIComponent(surface) + (token ? '&m=' + encodeURIComponent(String(token)) : ''); }
// one sentence for payout emails and the games' wallet nudges (text), only while live
function emailLine(token) { return live() ? 'Want to spend it? A BixPay Visa card turns POL into everyday purchases: ' + goLink('email', token) : ''; }
function nudgeLine(token) { return live() ? 'Want to spend it? A BixPay Visa card turns POL into everyday purchases: ' + goLink('nudge', token) : ''; }
// ---- clicks ----
const FILE = () => path.join(R.dataDir || '.', 'bixpay-clicks.json');
const blank = () => ({ v: 1, total: {}, days: {}, members: {} });
let S = null;
function load() { if (S) return S; try { S = Object.assign(blank(), JSON.parse(fs.readFileSync(FILE(), 'utf8'))); } catch (e) { S = blank(); } return S; }
function save() { try { fs.writeFileSync(FILE(), JSON.stringify(S)); } catch (e) {} }
const day = ts => new Date(ts).toISOString().slice(0, 10);
function click(surface, email) {
const s = SURFACES.includes(surface) ? surface : 'other';
const st = load();
st.total[s] = (st.total[s] || 0) + 1;
const d = day(Date.now()); st.days[d] = st.days[d] || {}; st.days[d][s] = (st.days[d][s] || 0) + 1;
const e = String(email || '').trim().toLowerCase();
if (e) { const m = st.members[e] = st.members[e] || { total: 0 }; m.total++; m[s] = (m[s] || 0) + 1; m.last = Date.now(); }
// bounded: 400 days
const cutoff = day(Date.now() - 400 * 86400000); for (const k of Object.keys(st.days)) if (k < cutoff) delete st.days[k];
save();
return { surface: s, email: e || null };
}
function memberClicks(email) {
const m = load().members[String(email || '').trim().toLowerCase()];
if (!m) return { total: 0 };
return Object.assign({}, m);
}
function adminView(days) {
const st = load(); const n = Math.min(365, Math.max(1, Number(days) || 30));
const since = day(Date.now() - n * 86400000);
const bySurface = {}; let total = 0;
for (const [d, row] of Object.entries(st.days)) if (d >= since) for (const [s, c] of Object.entries(row)) { bySurface[s] = (bySurface[s] || 0) + c; total += c; }
const daily = Object.entries(st.days).filter(([d]) => d >= since).sort((a, b) => a[0] < b[0] ? 1 : -1).map(([d, row]) => ({ day: d, clicks: Object.values(row).reduce((x, y) => x + y, 0) }));
const members = Object.entries(st.members).map(([email, m]) => ({ email, total: m.total || 0, last: m.last || 0, promo: m.promo || 0 })).sort((a, b) => b.total - a.total).slice(0, 50);
return { days: n, total, allTime: Object.values(st.total).reduce((x, y) => x + y, 0), bySurface, daily, members, surfaces: SURFACES };
}
function _reset() { S = null; }
module.exports = { init, live, announcing, validate, resolve, resolveRef, usingLine, companyLink, goLink, emailLine, nudgeLine, click, memberClicks, adminView, SURFACES, CUSTOMER_LINK_MSG, DEFAULT_COMPANY_LINK, MAX_LEVELS, _reset };
+3 -2
View File
@@ -69,7 +69,8 @@ const D = {
const row = r => ({ slug: r.slug, title: r.title, excerpt: r.excerpt || '', body: r.body || '', cover: r.cover || '', tags: r.tags ? String(r.tags).split(',').filter(Boolean) : [], status: r.status, author: r.author || AUTHOR, created: Number(r.created), updated: Number(r.updated), publishedAt: r.published_at ? Number(r.published_at) : null, views: Number(r.views) || 0 });
const impl = () => db.enabled() ? D : J;
function init(opts) { DATA_DIR = opts.dataDir; if (!db.enabled()) J.load(); }
let EXTRA_PAGES = () => []; // sitemap entries that follow a switch (the /bixpay guide while bixpayLive, 2026-10-29)
function init(opts) { DATA_DIR = opts.dataDir; if (typeof opts.extraPages === 'function') EXTRA_PAGES = opts.extraPages; if (!db.enabled()) J.load(); }
async function listAll() { return (await impl().all()).sort((a, b) => (b.publishedAt || b.created) - (a.publishedAt || a.created)); }
async function listPublished() { return (await listAll()).filter(p => p.status === 'published' && (p.publishedAt || 0) <= Date.now()); }
async function get(slug) { return impl().get(slugify(slug)); }
@@ -152,7 +153,7 @@ function rss(posts) {
return '<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>InstantAdPay blog</title><link>' + SITE + '/blog</link><description>Coaching and teaching articles from Marty Bostick.</description>' + items + '</channel></rss>';
}
function sitemap(posts) {
const pages = ['/', '/facts', '/blog', '/whats-new', '/leaderboard', '/ledger', '/contract', '/plays', '/wallets', '/earning', '/partners', '/friday', '/wednesday', '/refuel', '/conversion-tracking', '/presentation'];
const pages = ['/', '/facts', '/blog', '/whats-new', '/leaderboard', '/ledger', '/contract', '/plays', '/wallets', '/earning', '/partners', '/friday', '/wednesday', '/refuel', '/conversion-tracking', '/presentation'].concat(EXTRA_PAGES() || []);
const u = pages.map(p => '<url><loc>' + SITE + p + '</loc><changefreq>weekly</changefreq></url>').join('')
+ posts.map(p => '<url><loc>' + SITE + '/blog/' + p.slug + '</loc><lastmod>' + new Date(p.updated).toISOString().slice(0, 10) + '</lastmod><changefreq>monthly</changefreq></url>').join('');
return '<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' + u + '</urlset>';
+34 -6
View File
@@ -24,7 +24,8 @@ const MODEL = process.env.OPENROUTER_MODEL || 'deepseek/deepseek-v4-flash:nitro'
function init(opts) {
if (opts && typeof opts.gameLive === 'function') GAME_LIVE = opts.gameLive;
if (opts && typeof opts.refuelOn === 'function') REFUEL_ON = opts.refuelOn; DATA_DIR = opts.dataDir; chain = opts.chain; PASS_TIERS = typeof opts.passTiers === 'function' ? opts.passTiers : null; return kb.init({ dataDir: DATA_DIR, seeds: seeds() }); }
if (opts && typeof opts.refuelOn === 'function') REFUEL_ON = opts.refuelOn;
if (opts && typeof opts.bixLive === 'function') BIX_LIVE = opts.bixLive; DATA_DIR = opts.dataDir; chain = opts.chain; PASS_TIERS = typeof opts.passTiers === 'function' ? opts.passTiers : null; return kb.init({ dataDir: DATA_DIR, seeds: seeds() }); }
function key() {
if (process.env.OPENROUTER_API_KEY) return process.env.OPENROUTER_API_KEY.trim();
try { return fs.readFileSync(path.join(DATA_DIR, 'openrouter.key'), 'utf8').trim(); } catch (e) { return ''; }
@@ -32,12 +33,30 @@ function key() {
function enabled() { return !!key(); }
// ---- canned answers: instant, free, always in voice ----
const KNOWLEDGE_DATE = '2026-10-28'; // bump whenever the canned answers / prompt are brought up to date
const KNOWLEDGE_DATE = '2026-10-29'; // bump whenever the canned answers / prompt are brought up to date
const SUPPORT_RE = /(contact|reach|email|e-mail|message|talk to|speak (to|with)|get hold of) (the )?(support|admin|administrator|owner|marty|staff|team at instantadpay|someone|a (human|person|real person))|support (email|address|ticket|team|desk)|help ?desk|(open|send|file|submit|raise) (a )?(support )?ticket|\b(human|real person|live (agent|person|chat|support))\b|customer (service|support)|support@|how (do|can) i get (help|support)/i;
const CANNED = [
{ id: 'support', title: 'Contact support or open a ticket', q: ['How do I contact support?', 'How do I talk to a real person?', 'How do I open a support ticket?'], tags: ['support', 'help', 'ticket', 'contact', 'help desk'],
re: SUPPORT_RE, handoff: true,
a: 'Open Help in your member dashboard (https://instantadpay.com/my#help) to send Marty a ticket, and his replies land right there and in your email. Not signed in or locked out? Use https://instantadpay.com/support, or email support@instantadpay.com. You can also tap "Send this to support" below and I will pass this chat along.' },
// BixPay Visa card (2026-10-29, docs/BIXPAY-INTEGRATION.md). Sits ahead of the Level 4 entry because that one also matches "3%".
// While site config bixpayLive is off, answer() swaps every bixpay-* hit for BIX_SOON_ANSWER. Never BIX's marketing claims (user
// counts, spend per day, valuations) as facts; the only fee we state is 3% per purchase, no load fee, see BIX's terms for the rest.
{ id: 'bixpay-link', title: 'Where to put my BixPay partner link', q: ['Where do I put my BixPay partner link?', 'How do I add my BIX link?', 'Which BixPay link do I paste, referral or partner?'], tags: ['bixpay', 'bix', 'partner link', 'profile', 'ib portal'],
re: /(bix|bixpay).*(partner link|my link|referral link|ib ?portal|paste|where do i (put|add|enter)|profile)|(partner link|ib ?portal).*(bix|bixpay)/i,
a: 'Members > Profile > BixPay card. Paste your PARTNER link there: in your BIX portal (bix.ibportal.io) open Profile and copy the link in the second box, the one labelled Partner. It looks like https://bix.ibportal.io/auth/register?e=...&a=1. The first box, the Bix referral link (it ends in appId=3), only makes a card customer, so the field refuses it and asks for the Partner one. Once saved, your Wallet card, your promo kit, the /bixpay guide opened from your links and the line in your payout emails all carry your link, and LinkSpin will read the same one.' },
{ id: 'bixpay-credit', title: 'Who gets the BixPay credit', q: ['Who gets credit when someone signs up for BixPay through my page?', 'Whose BixPay link is on my pages?', 'What does "Using: the network link" mean?'], tags: ['bixpay', 'bix', 'credit', 'sponsor', 'network link'],
re: /(bix|bixpay).*(credit|whose|who gets|sponsor.s link|network link|using:|my sponsor|upline)|(whose|who gets).*(bix|bixpay)/i,
a: 'The BixPay link on your pages is yours when you have saved your partner link in Profile. If you have not, it is the first sponsor up your line (up to ten levels) who has one, and if nobody has, it is the network link. Every BixPay card says which one is in play: "Using: your link", "Using: @name’s link" or "Using: the network link". Sign-ups are credited inside the BIX portal to whoever owns that link, directs and levels included; InstantAdPay does not count or pay BixPay sign-ups itself. Add your own link in Members > Profile > BixPay card so the credit is yours.' },
{ id: 'bixpay-load', title: 'Loading the BixPay card from POL', q: ['How do I load my BixPay card from POL?', 'Can I send POL to BixPay?', 'How do I fund the BixPay card?'], tags: ['bixpay', 'bix', 'fund', 'load', 'usdt', 'usdc', 'polygon', 'cash app'],
re: /(bix|bixpay).*(load|fund|top ?up|deposit|send pol|from pol|usdt|usdc|swap|cash ?app)|(load|fund|top ?up).*(bix|bixpay)/i,
a: 'The BixPay card spends USDT or USDC, so the step is POL to USDT or USDC first. Three ways: (1) swap your POL for USDT or USDC on any exchange or on-ramp you already use, then send it to your BixPay wallet on the Polygon network (open the BIX app, Wallet > Receive, pick USDT or USDC, and use the Polygon address); (2) in the US, Cash App can send crypto straight to the BixPay wallet; (3) BIX has said an in-app swap is coming, and we will add it here when it ships. Once the USDT or USDC is in the wallet, tap TOPUP on the card. No load fee; 3% per purchase; see BIX’s terms for other charges. The full walk-through with screenshots is at https://instantadpay.com/bixpay.' },
{ id: 'bixpay-card', title: 'How to get the BixPay card', q: ['How do I get the BixPay card?', 'How do I sign up for BixPay?', 'Is BixPay available in my state?'], tags: ['bixpay', 'bix', 'visa card', 'virtual card', 'sign up', 'states'],
re: /(bix|bixpay).*(get|sign ?up|join|order|apply|virtual|plastic|metal|state|country|available|how much|cost|price|\$9)|(get|sign ?up for|order).*(bix|bixpay)/i,
a: 'Open the BixPay card in your Wallet tab (Members > Wallet) and tap Get your BixPay card. That opens a partner sign-up link, so you join as a partner and the card and the referral plan come with it: 1) register in the BIX portal through the link, 2) download the BIX app and create your wallet, 3) in the app open Settings > Scan QR and scan the code in your portal profile to link the two, 4) Cards > Create Card for the $9.99 virtual Visa (plastic, metal and gold cards cost more). KYC is required for the card. In the US it is open in 31 states so far; not in your state yet? You can still get the wallet and build. Elsewhere availability varies by country. Guide: https://instantadpay.com/bixpay.' },
{ id: 'bixpay', title: 'What BixPay is', q: ['What is BixPay?', 'What is the BIX card?', 'Can I spend my POL with a Visa card?'], tags: ['bixpay', 'bix', 'visa', 'card', 'spend pol', 'wallet'],
re: /(bix|bixpay|bix card|visa card|debit card|spend (my )?(pol|crypto|earnings)|crypto card)/i,
a: 'BixPay is a self-custody wallet with a Visa card, made by BIX, a separate company. You send USDT or USDC to it on Polygon, load the card, and spend wherever Visa is accepted, including Apple Pay and Google Pay. Virtual cards from $9.99. 3% per purchase, no load fee; see BIX’s terms for other charges. InstantAdPay is not the card issuer; members who join BixPay as partners get their own partner link, and anyone who gets a card through their pages is credited to them in the BIX portal, up to ten levels deep. Where to find it: Members > Wallet (the card), Members > Profile (your partner link), Promo tools > BixPay (posts and banners), and the guide at https://instantadpay.com/bixpay. Crypto assets can lose value.' },
{ id: 'level4-override', title: 'The Level 4 override (3%)', q: ['What is the Level 4 override?', 'Do I earn from my fourth level?', 'How does the 3% override work?'], tags: ['override', 'level 4', 'fourth level', 'commission', 'payouts'],
re: /(level ?(4|four)|4th level|fourth level|override|3 ?%|three percent)/i,
a: 'The Level 4 override is 3% of every package bought four levels below you, paid by the company on top of the three levels the contract pays. It goes to the buyer’s 4th sponsor up if that member has 5 or more qualifying buyers (direct referrals who bought $20 or more, the same bar as level 3). If they do not have 5 yet, it moves up the line to the next member who does, up to 25 steps, and each purchase pays one override to one person. It is paid weekly in POL from a company wallet, every Monday after 9 AM Central for the Monday to Sunday week before, through the contract’s award function, so every payment has a Polygon link, and it shows in your Earnings as "Level 4 override". Weekly totals under 0.01 POL carry over to the next week. It counts purchases from the start date on, not earlier ones. It comes from the platform’s 20% share, so the 50/20/10 split does not change. What you earn depends on real purchases in your line; nothing is guaranteed.' },
@@ -241,7 +260,15 @@ function synFact() { const n = SYN_N(); return '- NETWORK RATE (live, Marty 2026
let REFUEL_ON = () => false;
// POL Miner (2026-10-28) follows site config gamesLive: until 'polminer' is in it the assistant only says it is coming soon
let GAME_LIVE = () => false;
const POLMINER_SOON_ANSWER = 'POL Miner, a dig-down mining game where rare Polygon crystals pay POL, is coming soon to the InstantAdPay games. It is not open yet; it will show up on your Games tab (Members > Games) and in the release notes when it launches.';
// BixPay (2026-10-29) follows site config bixpayLive: until it is on the assistant only says the card is coming soon
let BIX_LIVE = () => false;
const bixLive = () => { try { return !!BIX_LIVE(); } catch (e) { return false; } };
const isBixId = id => /^(c-)?bixpay(-[a-z]+)?$/.test(String(id || ''));
const BIX_SOON_ANSWER = 'A BixPay Visa card for spending POL is coming to InstantAdPay soon: a self-custody wallet with a Visa card, made by BIX, a separate company. It is not switched on here yet. When it is, it shows up on your Wallet tab, with a partner-link field in your Profile and a guide at instantadpay.com/bixpay, and the release notes will say so.';
function bixFact() { return bixLive()
? '- BIXPAY VISA CARD (LIVE, 2026-10-29): BixPay = a self-custody wallet + Visa card made by BIX, a SEPARATE company (not InstantAdPay). The member sends USDT or USDC to the BixPay wallet on Polygon, loads the card, spends wherever Visa is accepted incl. Apple Pay and Google Pay. Virtual card $9.99 (plastic, metal and gold cost more). The ONLY fee we state: 3% per purchase, no load fee; for anything else say "see BIX’s terms". US: open in 31 states so far; not in your state yet = you can still get the wallet and build; elsewhere availability varies by country; KYC required for the card. Funding POL -> card: (1) swap POL to USDT/USDC on any exchange or on-ramp, send on Polygon (app: Wallet > Receive > USDT or USDC > Polygon address); (2) US: Cash App can send crypto straight to the BixPay wallet; (3) an in-app swap is announced by BIX but NOT live: never say members can swap POL inside the app today. Sign-up steps: partner link -> register in the BIX portal (bix.ibportal.io) -> download the BIX app -> Settings > Scan QR to link app and portal -> Cards > Create Card ($9.99 virtual). Partner plan, plain words: BIX puts half of the 3% fee and of card sales into its partner plan, paid over ten levels (15% level 1, 10% level 2, 2.5% each on levels 3 to 10) plus a 5% pool; sign-ups and commissions are tracked and paid by BIX in the BIX portal, never by InstantAdPay; any worked example is hypothetical, not typical, and never a promise. Disputes: BIX accepts a dispute up to 120 days after a transaction posts; they can take 30 to 60 business days. WHERE: Members > Wallet (the card with Get your BixPay card + How it works), Members > Profile > BixPay card (the member pastes their PARTNER link from BIX portal > Profile > Partner, the second box; the referral link with appId=3 is refused), Promo tools > BixPay tab (3 posts, an email swipe, 4 text-only banners, all carrying the member’s link, plus the tab’s click count), the public guide https://instantadpay.com/bixpay (add ?ref=<username> and the page carries that member’s link), one sentence in payout emails. WHOSE LINK: the member’s own partner link, else the first sponsor up the chain (10 levels) with one, else the network link; every card says which ("Using: your link / @name’s link / the network link"). Compliance: InstantAdPay is not the card issuer and earns a referral commission when someone signs up through a partner link; crypto assets can lose value. NEVER repeat BIX marketing claims (user counts, cards issued, spend per day, valuations, "bigger than X") as facts; if asked, say those are BIX’s own claims and we have not verified them.\n'
: '- BIXPAY VISA CARD: COMING SOON, not switched on yet. If asked about BixPay, BIX, a crypto Visa card or spending POL with a card, say it is coming to the Wallet tab soon and nothing is live yet; never quote its fees, steps, links or the partner plan until it is on.\n'; }
const POLMINER_SOON_ANSWER ='POL Miner, a dig-down mining game where rare Polygon crystals pay POL, is coming soon to the InstantAdPay games. It is not open yet; it will show up on your Games tab (Members > Games) and in the release notes when it launches.';
const pmLive = () => { try { return !!GAME_LIVE('polminer'); } catch (e) { return false; } };
function polminerFact() { return pmLive() ? '- POL MINER (https://polminer.com, Members > Games): a free dig-down mining game. Dig, sell ore for coins, upgrade pick/lamp/cart/thruster, beat a drill boss every 30 m. Pink Polygon crystals pay a random POL amount the first time each one is dug out; each boss pays POL on its first win per account; first trips to 50/100/150/200 m pay POL. Coins never turn into POL. Guests can play and collect at sign-in. POL is paid automatically to the wallet linked on InstantAdPay. The SUPPLY pad opens a sponsored supply crate (full lamp + coins, never POL) after a short sponsor visit.\n' : '- POL MINER: COMING SOON, not open yet. Never send members to polminer.com; say it is coming soon to the Games tab.\n'; }
function refuelFact() { return REFUEL_ON() ? "- MONTHLY REFUEL STREAK (built 2026-10-24, switch refuelStreak): ONE streak per member across InstantAdPay and LinkSpin. Counted refuel = a NEW package of $20+ on InstantAdPay or $25+ on LinkSpin by one of the member's own positions. First one sets the member's own refuel day; next due 30 days after the last counted refuel; window opens 5 days before the due day; 5-day grace after it; Central time. Missing the grace resets the streak, except one free miss per 365 days. Bonus (purchased-grade ad credits on the site where bought, credit log 'Refuel streak'): one engine m1 +10%, m2 +15%, m3 +20%, m4+ +25%; both sites in the same cycle m1 +15%, m2 +20%, m3 +30%, m4+ +40% each (first site topped up to the both rate, difference only) plus a 100-credit Featured bonus on InstantAdPay at m4+ (purchased-grade credits, any format). Stacks on Five Dollar Friday / Wired Wednesday. Pit Stop: another $20+/$25+ package on a site already refueled this cycle, before the next window opens (the other site's first package in the cycle is the second engine instead) = half the current streak rate, once per site per cycle, not a counted refuel. Badges: Engine Started (first refuel), Refueled 3 / 6 / 12 months. ENGINE ROOM: unlocked by the first counted refuel (greyed 'Refuel to start your engine' before), IAP tab Engine Room + LinkSpin Ads screen panel, same data both sites: dials Fuel left (credits free + in campaigns on both sites vs this cycle's refuel credits incl. bonus, days left at the recent burn), Clicks this week (vs last week, clicks per 1,000 credits), Goals this month (conversion pixel conversions since the 1st Central vs the member's own goal); streak panel; warning lights (ads at 80%, ads out, refuel day coming, login slot open); six part lights (fuel, banner spin, spin link, page, testing, conversion tracking: green working, amber needs attention, grey not started with a Set it up link); one Next move button from simple rules. REFUEL KIT: each counted refuel unlocks the Central-month's members-only banner set for this site's own program (5 sizes, personalized server-side with @username + QR to the member's link; IAP: Promo tools card with Use in an IAP banner campaign; LinkSpin: Ads screen card with Load into my Banner Spin); kits stay usable after the month; streak month 3+ adds an animated GIF, month 6+ a BannerKitAI custom-banners credit (coming, entitlement saved). Reminders 5 days before, on the day, last call at the end of grace (email + on-site notice). The member's Refuel card (InstantAdPay Overview, LinkSpin Credits/Ads) shows refuel day, streak, next bonus, Pit Stop status. Either site alone keeps the streak (one-engine rates); both sites in one cycle = the bigger bonus; never say both are required. MEMBER GUIDE PAGE (public, 2026-10-24): /refuel on both sites (https://instantadpay.com/refuel and https://linkspin.app/refuel): the flow, the numbers, the member steps, leader coaching and FAQ; point members there for the full picture. Ad credits only, never cash; never promise income. No auto-billing: the member chooses every package. ROUTES (2026-10-25): LinkSpin menu item Refuel = https://linkspin.app/credits#refuel (the Refuel panel, scrolled to and highlighted); packages of $25+ there are marked counts for Refuel; https://linkspin.app/credits#buy = the package picker; https://linkspin.app/ads#engine = LinkSpin Engine Room. InstantAdPay Engine Room = https://instantadpay.com/my#engine; its Set up conversion tracking opens https://instantadpay.com/my#conversions (Campaigns > Conversion tracking card, same goals LinkSpin counts). Engine Room links that cross to LinkSpin (Banner Spin, spin link, page, testing, refuel LinkSpin) open LinkSpin with a note at the top naming the job, Step 1, a guide link and Back to InstantAdPay; same email signs in on both.\n" : '- MONTHLY REFUEL STREAK: built but NOT switched on yet. If asked, say it is coming and nothing counts toward it today; do not quote bonus rates or dates.\n'; }
@@ -251,7 +278,7 @@ function systemPrompt(kbBlock) {
FACTS:
- LEVEL 4 OVERRIDE (LIVE 2026-10-26, first payout Monday 2026-11-02): company-paid, off-chain decision, on-chain payment. 3% of every package purchase (the POL actually paid) goes to the buyer's 4th upline on the contract sponsor chain if that member's contract buyerCount is 5 or more (qualifying buyer = direct referral with a $20+ purchase, same bar as level 3); otherwise it hunts up to the next qualified upline, max 25 hops; the company account (#1) or no qualified upline = company keeps it; exactly one recipient per purchase. Paid weekly in POL every Monday after 9 AM Central for the previous Monday to Sunday Central week, from a company payer wallet via the contract's award(memberId), shown in Earnings as 'Level 4 override' with a Polygon link and announced by email and an on-site notice. Under 0.01 POL carries to the next week. Purchases from the start date only, no back pay. Funded from the platform's 20%; the contract split 50/20/10 is unchanged. Never promise amounts.
${passTiersFact()}${refuelFact()}${synFact()}${polminerFact()}- ROAD AGENT (LIVE 2026-10-15, https://roadagent.app): a night-highway shooter open to every member. Open the Games tab and tap Play on the Road Agent card, or go to roadagent.app and sign in with the InstantAdPay email. Drive the four-lane highway, shoot the hostiles (thug sedans, switchblades, gunner vans), spare the civilians, pull into the weapons truck for oil slicks, smoke and missiles. Clearing a sector for the first time pays POL to the wallet on the member's InstantAdPay account, plus a daily patrol reward; scrap buys garage upgrades. Fuel = a sponsor visit: before a run the player visits an advertiser's page (a FUEL STOP), which is a normal verified visit with the dwell timer and human check, charged to the advertiser like any visit; advertisers' existing visits campaigns are already in the rotation, nothing to set up; to get more traffic from the game, top up the visits campaign. Clickable Pause, Sound and Music buttons sit under the game (P / M / N keys also work), and the Run tab has an Invite a friend card with the member's roadagent.app/?ref=<username> link.
${passTiersFact()}${refuelFact()}${synFact()}${polminerFact()}${bixFact()}- ROAD AGENT (LIVE 2026-10-15, https://roadagent.app): a night-highway shooter open to every member. Open the Games tab and tap Play on the Road Agent card, or go to roadagent.app and sign in with the InstantAdPay email. Drive the four-lane highway, shoot the hostiles (thug sedans, switchblades, gunner vans), spare the civilians, pull into the weapons truck for oil slicks, smoke and missiles. Clearing a sector for the first time pays POL to the wallet on the member's InstantAdPay account, plus a daily patrol reward; scrap buys garage upgrades. Fuel = a sponsor visit: before a run the player visits an advertiser's page (a FUEL STOP), which is a normal verified visit with the dwell timer and human check, charged to the advertiser like any visit; advertisers' existing visits campaigns are already in the rotation, nothing to set up; to get more traffic from the game, top up the visits campaign. Clickable Pause, Sound and Music buttons sit under the game (P / M / N keys also work), and the Run tab has an Invite a friend card with the member's roadagent.app/?ref=<username> link.
- HELP DESK (LIVE 2026-10-16): members open Help in the dashboard (/my#help) to send Marty a support ticket (pick a category, a subject, the message, up to 2 screenshots), see each ticket's status (Open, Waiting on you, Closed) and read and answer his replies; a badge shows when he has replied, and replies also arrive by email. Anyone signed out or locked out uses the public form at https://instantadpay.com/support (name, email, category, subject, message) and gets an email with the ticket number (like IAP-1042) and a private link to view and reply, no sign-in needed. support@instantadpay.com also reaches Marty. Replying to a closed ticket opens it again. In this chat, "Send this to support" turns the conversation into a ticket. Only Marty answers, so replies are not instant; never promise a response time.
- PRESENTATION (2026-10-15): instantadpay.com/presentation is a public page (no sign-in) with the narrated InstantAdPay presentation, about six minutes, Marty's voice, captions in 6 languages (English, Italiano, Français, Español, Deutsch, Português) chosen with pills under the player. Sixteen parts: the platform, ad reach, the nine games that pay POL, the $20 split ($10 / $4 / $2 / $4 platform, same transaction), three rules, packages, the 2-then-5 unlock, pass-up, wide versus narrow ($800 vs $36, an illustration), Qualified Start, the Pipeline, LinkSpin (pre-launch Nov 1), one wallet across the network, the first week, and 'the target is five'. Share link: Members > Promo tools > 'Share the presentation' copies instantadpay.com/presentation?ref=<username>; ?ref sets the same 30-day sponsor cookie as the invite link, the page shows 'Shared with you by @name' with avatar and a Join button to /join/<username>. It is in the site menu as 'Presentation'. BUILD WIDE VIDEO: first card in Promo tools > Videos ('Build wide: watch the payments flow'), matched link ?v=wide.
- WIRED WEDNESDAY: every Wednesday, Central time (midnight to midnight), any ad package of $20 or more (Activation and up; no $10 pack exists) earns +25% bonus credits wired into the buyer's balance the moment the purchase settles, purchased-grade (usable on every format incl. login ads), credit log label "Wired Wednesday". First one: Wednesday 2026-09-30. Page: instantadpay.com/wednesday. Credits buy ad delivery, never money.
@@ -398,15 +425,16 @@ async function answerRaw(message, historyText) {
try { hit = await kb.fastPath(msg); } catch (e) { kbOk = false; console.error('kb fast path', e.message); }
if (hit && hit.id === 'refuel' && !REFUEL_ON()) return { reply: REFUEL_OFF_ANSWER, canned: true, kb: hit.id };
if (hit && (hit.id === 'polminer' || hit.id === 'c-polminer') && !pmLive()) return { reply: POLMINER_SOON_ANSWER, canned: true, kb: hit.id };
if (hit && isBixId(hit.id) && !bixLive()) return { reply: BIX_SOON_ANSWER, canned: true, kb: hit.id };
if (hit && (hit.id === 'network-rate' || hit.id === 'c-network-rate') && SYN_N() !== 4) return { reply: netRateAnswer(SYN_N()), canned: true, kb: hit.id };
if (hit) return Object.assign({ reply: hit.answer, canned: true, kb: hit.id }, hit.handoff ? { handoff: true } : {});
if (!kbOk) for (const c of CANNED) if (c.re.test(msg)) return c.id === 'refuel' && !REFUEL_ON() ? { reply: REFUEL_OFF_ANSWER, canned: true } : c.id === 'polminer' && !pmLive() ? { reply: POLMINER_SOON_ANSWER, canned: true } : c.id === 'network-rate' && SYN_N() !== 4 ? { reply: netRateAnswer(SYN_N()), canned: true } : Object.assign({ reply: c.a, canned: true }, c.handoff ? { handoff: true } : {});
if (!kbOk) for (const c of CANNED) if (c.re.test(msg)) return c.id === 'refuel' && !REFUEL_ON() ? { reply: REFUEL_OFF_ANSWER, canned: true } : c.id === 'polminer' && !pmLive() ? { reply: POLMINER_SOON_ANSWER, canned: true } : isBixId(c.id) && !bixLive() ? { reply: BIX_SOON_ANSWER, canned: true } : c.id === 'network-rate' && SYN_N() !== 4 ? { reply: netRateAnswer(SYN_N()), canned: true } : Object.assign({ reply: c.a, canned: true }, c.handoff ? { handoff: true } : {});
// retrieval: the closest entries ride along in the system prompt (a short follow-up borrows words from the chat so far)
let kbBlock = '', kbIds = [];
try {
const query = msg.split(/\s+/).length < 4 && historyText ? msg + ' ' + String(historyText).slice(-200) : msg;
const hits = await kb.context(query, 5);
const hitsOk = pmLive() ? hits : hits.filter(h => !/^(c-)?polminer$/.test(String(h.entry && h.entry.id))); // not live yet: keep its answer out of the prompt
const hitsOk = hits.filter(h => (pmLive() || !/^(c-)?polminer$/.test(String(h.entry && h.entry.id))) && (bixLive() || !isBixId(h.entry && h.entry.id))); // not live yet: keep its answer out of the prompt
kbBlock = kb.promptBlock(hitsOk); kbIds = hitsOk.map(h => h.entry.id);
} catch (e) { console.error('kb search', e.message); }
if (!enabled()) return { reply: 'Good question. The quick answers I have cover packages, payouts, qualification, and joining; for anything deeper, the plain-language contract review at https://instantadpay.com/contract covers most of it, or tap "Send this to support" and Marty will answer.', handoff: true };
+1
View File
@@ -344,6 +344,7 @@ async function bootstrap() {
await alterSafe('ALTER TABLE accounts ADD COLUMN joined_via VARCHAR(20) NULL'); // ?v= angle the lead came in on
await alterSafe('ALTER TABLE accounts ADD COLUMN joined_ref VARCHAR(80) NULL'); // referring domain of the first join-page visit
await alterSafe('ALTER TABLE accounts ADD COLUMN wall_offers VARCHAR(2000) NULL'); // JSON [{title,bannerUrl,targetUrl}] for wall positions 2-3 (unlock at 2 / 5 qualifying buyers)
await alterSafe('ALTER TABLE accounts ADD COLUMN bix_partner_link VARCHAR(300) NULL'); // BixPay partner link (bixpay.js, 2026-10-29); column name checked against MySQL 8 reserved words
// help desk (2026-10-16, tickets.js): one shared desk for IAP and, later, LinkSpin; email_message_id threads inbound mail
await q(`CREATE TABLE IF NOT EXISTS tickets (
id INT AUTO_INCREMENT PRIMARY KEY,
+99
View File
@@ -0,0 +1,99 @@
# BixPay card integration (DRAFT for Marty, 2026-10-29)
Scope: InstantAdPay first, LinkSpin second, CTB when it launches. Nothing here is built yet.
## What we know about BIX (verified 2026-10-29)
- BIX = self-custody wallet + Visa card spent from USDT/USDC. Funding networks include Polygon, so a member can swap POL
to USDT in the BIX app and load the card with no bridge. No load fee; up to 3% per purchase, 1% FX.
- Cards: virtual $9.99, plastic $100, metal $250, gold $25,000. US = Visa Signature (29 states); elsewhere Visa Platinum.
- Partner plan: 50% of net fees and card sales -> 45% over 10 levels (15 / 10 / 2.5 x 8) + 5% pool.
- Partner link format: `https://bix.ibportal.io/auth/register?e=<43-char token>&a=1` (opaque token, not derivable from the
IB ID). The referral link (`&appId=3`) makes a card customer only; the PARTNER link makes a partner. We use the partner link.
- Company fallback link: Marty's partner link (IB12143793).
## 1. The profile field (one identity, follows the member)
- InstantAdPay Profile tab, new section **"BixPay card"**: one input, `bixPartnerLink`.
- Accepts a full partner link. Validation: host `bix.ibportal.io`, path `/auth/register`, `e=` present, `a=1`; strip `appId`
if pasted (the customer link) and tell the member "That's the card-customer link. Paste the Partner link from your BIX
portal profile instead." Max 300 chars. Saved on the IAP account; LinkSpin and CTB read it through the existing partner
API (the same way wallet and sponsor already flow), and LinkSpin's own Profile shows it read-only with "Edit on InstantAdPay".
- Member sees under the field: "Where to find it: BIX portal > Profile > Partner (the second box). Copy the link."
- Admin: the field shows on the member card; a count of members with a link set on the admin Overview.
## 2. The link each visitor gets (sponsor follows)
`bixLinkFor(member)` =
1. the member's own `bixPartnerLink`, else
2. walk the sponsor chain up to 10 levels, first sponsor with a link, else
3. the company link (site config `bixCompanyLink`, default Marty's partner link).
The card promo always shows WHOSE link is in play: "Your link" / "Your sponsor @name's link" / "Network link". That nudges
members to add their own, and sponsors to get their teams signed up.
For public pages (games' landing pages, /join/<user>), the referrer whose `?ref` is on the page resolves the same way.
## 3. Where members see it
### Wallet tab (primary)
Card: **"Spend your POL anywhere with a BixPay Visa card"**
"BixPay is a self-custody wallet with a Visa card. Send USDT or USDC to it on Polygon, load the card, and spend it wherever
Visa is accepted, including Apple Pay and Google Pay. Virtual cards from $9.99."
(No in-app swap: Marty confirmed 2026-10-29 he swaps POL to USDT/USDC on an exchange, then sends it to BixPay. The guide
gets a "turn your POL into USDT" step: any exchange or on-ramp, then send on Polygon. Add the swap line only once BIX
ships it; the founder said "in the next three months" on 10-17.)
Buttons: **Get your BixPay card** (partner link) · **How it works** (opens the guide).
Small line: "Using: your link / @sponsor's link / the network link. Add yours in Profile."
### Overview
A one-line announcement card the first week ("New: a Visa card for your POL"), dismissable like the other cards.
### Payout emails + game "link your wallet" nudges
One sentence after the amount: "Want to spend it? A BixPay Visa card turns POL into everyday purchases: <link>."
(Payout emails already carry the member's identity, so the link resolves per member.)
### Promo tools > new tab "BixPay"
- The member's link with Copy/Share.
- 3 posts (short, friendly, the "spend your crypto" angle), an email swipe, and 4 banners we make (no BIX logo until
Marty confirms brand rules; text-only "crypto Visa card" creative is safe).
- Every asset carries the member's resolved link.
### Guide page /bixpay (public, SEO)
What it is, the fee table, the funding path (POL -> USDT on Polygon -> card), the sign-up steps with screenshots, the
partner plan in plain words, and the compliance box. CTA carries the viewer's resolved link.
### Chatbot
Canned answers: what BixPay is, how to get the card, how to load it from POL, where to put my partner link, who gets the
credit. Facts in the system prompt with KNOWLEDGE_DATE.
## 4. Copy (Marty's voice, no em dashes)
- Wallet card title: "Spend your POL anywhere with a BixPay Visa card"
- Body: see above.
- Profile field label: "Your BixPay partner link"
- Profile help: "Join BixPay as a partner, then paste your Partner link here. Members and visitors who get a card through
your pages are credited to you in your BIX portal, up to ten levels deep."
- Email line: "Want to spend it? A BixPay Visa card turns POL into everyday purchases."
- Post 1 (short): "I spend my crypto with a Visa card now. BixPay keeps the keys with you, loads from USDT or USDC with no
load fee, and works with Apple Pay. Virtual card from $9.99: {L}"
- Fees line everywhere: "3% per purchase, no load fee. See BIX's terms for other charges."
- US line on the Wallet card and guide: "Available in 31 US states so far. Not in your state yet? You can still get the
wallet and build."
- Guide: a "Funding your card" section with three paths: (1) swap POL to USDT or USDC on any exchange, send on Polygon;
(2) Cash App (US): send crypto straight to the BixPay wallet; (3) the BIX in-app swap, once it ships.
- Post 2 (friendly): "Earning crypto is one thing. Spending it without jumping through hoops is another. BixPay fixed that
for me: a self-custody wallet and a Visa card in one app. Here's where I got mine: {L}"
- Post 3 (partner angle): "BixPay pays partners on every card and on card spending, ten levels deep. If you're building a
team anyway, this fits right in: {L}"
## 5. Compliance box (shown on the Wallet card's "How it works" and the guide)
"BixPay is a separate company. BIX issues the wallet and the card through its banking partners and sets its own fees,
limits, eligibility and terms. InstantAdPay is not the card issuer and earns a referral commission when you sign up
through a partner link. Card availability varies by country. Crypto assets can lose value."
## 6. Tracking
- Click counts per surface (wallet card, email, promo tools, guide) in the admin Traffic tab; per-member click counts on
the Promo tools BixPay tab. No sign-up credit on our side: the BIX portal shows each partner their directs and levels.
- If BIX ever offers a postback, add a "BixPay sign-ups" stat next to the click counts.
## 7. Rollout
1. IAP: field + resolver + Wallet card + guide + chatbot + promo tab (gated by site config `bixpayLive`).
2. LinkSpin: read-only field + Wallet/Credits card + promo entry, same resolver through the partner API.
3. CTB: same card and field in ctb-next, same identity.
4. Announcement (release note + member email + Telegram) after Marty's copy approval.
## Open questions for Marty / BIX upline
- Does a partner sign-up also get the card, or does the member need the app invitation too? (If both: show "Join as a
partner" and "Just want the card?" buttons, each with the member's own link type.)
- BIX name/logo use in our promo material.
- The pool's "50/50 rule".
- Any updated BIX materials.
+38
View File
@@ -0,0 +1,38 @@
# BixPay opportunity call, 2026-10-17 (Zoom replay notes, made 2026-10-29)
"$iNVU - Live Opportunity Call", 47 min. Host "Bass"; main speaker David Emenite (22-year network marketer; his own company
is a trading opportunity, "tap to trade"); BIX founder "Nick" (28, Germany, says he owns "one of the largest Forex brokers
on the planet"; BIX started "a couple of months ago"); leaders Tracy Fischer, Lisa, Alan Jones, Gary. The $iNVU / trading
company parts are NOT BIX. Transcript: D:/tmp/bix-zoom/transcript.txt; slides D:/tmp/bix-zoom/frames.
## Plan mechanics (as presented; matches the BIX commission PDF)
- The only fee claimed: 3% per transaction. "No top-up fees, no hidden fees." (A third-party review lists 1% FX, $0.75
under $50, ATM $1 + 0.6%, so present 3% as THE fee and point to BIX's terms for the rest.)
- 50% of the 3% goes into the plan; paid over 10 levels: L1 15%, L2 10%, L3-L10 2.5% each; the other 5% = BIX pool,
1 share per 10,000 cards in your network. Worked example: $1,000 spent -> $30 fee -> $15 into the plan.
- Card sales pay too: slide "EARN A 50% REFERRAL BONUS ON EVERY CARD PURCHASE" (virtual $9.99, plastic $100, metal $250,
24K gold $25,000; shipping to 179 countries). The optional $9.99/month rewards membership is also commissionable.
- Upcoming banking (SEPA IBAN, ACH, SWIFT, fiat on/off-ramp): instant 0%, SEPA/ACH 1%, "up to 50% included in the
compensation plan". Nick: IBANs and the in-app SWAP "in the next three months", i.e. NOT live on 10-17.
- Shareholder: 500,000 cards in your network "on a 50/50 rule" = shareholder of BIX (Nick). Network contest: first to
10,000 cards gets a $100,000 bonus. The 50/50 rule is still not defined on the call.
- US: "open in 31 states" (review on 10-24: 29), rest "first part of 2027". Wallet works everywhere; you can build from a
closed state. KYC required for the card; problems go to BIX support.
- Funding tip (Tracy/Bass): Cash App can send crypto straight to the BixPay wallet (about 20 transactions a month, up to
$5,000 a week); they used Coinbase before. Card works in Apple Wallet.
- Usage data quoted: average customer spends $1,400-1,500 a month (industry figure); Bass's back office shows $20-80 a
week per user so far.
## Claims to treat as marketing, not facts
300,000 downloads / 300,000 cards active, $3M spent per day, live since August with global launch ~6 weeks before the
call, "5 million users in one year, 80 million in three, bigger than Revolut", "worth a couple hundred million, $100B in
three years", "$1 to $1 million per day" spend limit, $2.6T daily payments, founder "a billionaire".
## What it changes in our integration draft (BIXPAY-INTEGRATION.md)
1. Don't promise an in-app swap yet. Copy becomes "load it with USDT or USDC on Polygon" until Marty confirms Swap works
in his app; add a short "how to turn POL into USDT" step (any exchange or the BIX swap once live).
2. Fees line: "3% per purchase, no load fee; see BIX's terms for other charges."
3. Lead with the $9.99 virtual card: it pays the referrer on the sale and on every swipe after.
4. US members: add "available in 31 states; not in your state yet? You can still build and get the wallet."
5. Add the Cash App funding path to the guide for non-crypto members (US).
6. Events in the call (Houston 10-20, Tampa 10-21, Bangkok 11-28) are the leaders' own, not ours.
+7 -2
View File
@@ -45,8 +45,13 @@ function profileOf(a) {
const av = String(a.avatarUrl || '').trim();
const avatarUrl = !av ? null : /^https:\/\//i.test(av) ? av : av.startsWith('/') ? PUBLIC() + av : null;
const bio = String(a.bio || '').trim().slice(0, 600) || null;
if (!avatarUrl && !bio && !(socials && Object.keys(socials).length)) return null;
return { avatarUrl, bio, socials: socials && Object.keys(socials).length ? socials : null };
// the BixPay partner link travels too (2026-10-29): LinkSpin shows it read-only ("Edit on InstantAdPay") and resolves the
// same way; only set when there is one, so rows without it keep the hash they had
const bixPartnerLink = String(a.bixPartnerLink || '').trim() || null;
if (!avatarUrl && !bio && !bixPartnerLink && !(socials && Object.keys(socials).length)) return null;
const out = { avatarUrl, bio, socials: socials && Object.keys(socials).length ? socials : null };
if (bixPartnerLink) out.bixPartnerLink = bixPartnerLink;
return out;
}
const hashOf = r => crypto.createHash('sha1').update([r.username || '', r.wallet || '', r.sponsorEmail || '', r.joinedAt || '', r.memberId || '', r.profile ? JSON.stringify(r.profile) : ''].join('|') + SF.hashExtra(r)).digest('hex').slice(0, 16);
+5 -1
View File
@@ -141,6 +141,7 @@
<div class="statx c-violet"><div><div class="nv" id="ovActive">0</div><div class="lb">Active campaigns</div><span class="chip flat" id="ovCampSub"></span></div></div>
<div class="statx c-amber"><div><div class="nv" id="ovReports">0</div><div class="lb">Open reports</div><span class="chip flat" id="ovBurnSub"></span></div></div>
<div class="statx"><div><div class="nv" id="ovDrips">0</div><div class="lb">Follow-ups in flight</div><span class="chip flat" id="ovDripSub"></span></div></div>
<div class="statx c-cyan"><div><div class="nv" id="ovBix">0</div><div class="lb">BixPay partner links</div><span class="chip flat" id="ovBixSub"></span></div></div>
</div>
<div class="grid c2" style="margin-top:16px">
<div class="card">
@@ -357,6 +358,9 @@
<div class="pane" id="pane-traffic" hidden>
<div class="card"><div class="card-head"><h3>Games to members</h3><span class="sub" id="stSub">the $5 welcome offer after a game win</span></div><div class="tablewrap"><table class="adm-table" id="trfStarter"></table></div></div>
<div class="card"><div class="card-head"><h3>Login-ad showings</h3><span class="sub" id="lsSub">sign-in interstitials per day, dashboard vs games</span></div><div class="tablewrap"><table class="adm-table" id="trfLogin"></table></div></div>
<div class="card" id="trfBixCard"><div class="card-head"><h3>BixPay clicks</h3><span class="sub" id="bixSub">taps on "Get your BixPay card" by surface (the range picked below)</span></div>
<p class="muted small" style="margin:0 0 10px">Every BixPay button and banner goes through /go/bixpay, which counts the tap and opens the member's resolved partner link (own, else a sponsor's, else the network link). Sign-ups are not counted here: the BIX portal shows each partner their directs and levels.</p>
<div class="grid c2"><div class="tablewrap"><table class="adm-table" id="trfBix"></table></div><div class="tablewrap"><table class="adm-table" id="trfBixMembers"></table></div></div></div>
<div class="card">
<div class="card-head"><h3>Where visitors come from</h3><span class="sub" id="trfSub"></span></div>
<div class="chips" id="trfRange" style="margin:0 0 10px"><button type="button" class="chip-t" data-days="7">7 days</button><button type="button" class="chip-t on" data-days="30">30 days</button><button type="button" class="chip-t" data-days="90">90 days</button><button type="button" class="chip-t" data-days="365">Year</button></div>
@@ -641,6 +645,6 @@
<script src="/assets/common.js?v=20261023ov"></script><script src="/assets/welcome.js?v=20260923b"></script>
<script src="/assets/admin-kb.js?v=20261020kb"></script>
<script src="/assets/admin.js?v=20261027nr"></script><script src="/assets/admin-sponsorcheck.js?v=20261022sc"></script><script src="/assets/admin-kits.js?v=20261024kit"></script>
<script src="/assets/admin.js?v=20261029bx"></script><script src="/assets/admin-sponsorcheck.js?v=20261022sc"></script><script src="/assets/admin-kits.js?v=20261024kit"></script>
</body>
</html>
+8
View File
@@ -91,6 +91,7 @@
const f = o.followups || {};
$('ovDrips').textContent = f.active || 0;
$('ovDripSub').textContent = (f.done || 0) + ' finished · ' + (f.unsubscribed || 0) + ' unsubscribed';
if ($('ovBix')) { $('ovBix').textContent = Number(o.bixLinks || 0).toLocaleString(); $('ovBixSub').textContent = o.bixpayLive ? 'members with their own link · live' : 'members with their own link · bixpayLive is off'; } // BixPay (2026-10-29)
const bt = Object.entries(o.byType || {}).sort((a, b) => b[1] - a[1]);
$('ovByType').innerHTML = bt.length ? bt.map(([t, n]) => '<div style="display:flex;justify-content:space-between;padding:4px 0;border-bottom:1px solid var(--line)"><span>' + esc(t) + '</span><b>' + n + '</b></div>').join('') : 'No campaigns yet.';
const ch = o.chain || {};
@@ -425,6 +426,7 @@
['Upline chain', d.upline.length > 1 ? d.upline.map(u => memLink(u.email, u.name)).join(' &rarr; ') : '<span class="muted">-</span>'],
['Joined via', esc(a.joinedVia || 'join page') + (a.joinedRef ? ' from ' + esc(a.joinedRef) : '')],
['Line banner', a.lineTargetUrl ? '<a href="' + esc(a.lineTargetUrl) + '" target="_blank" rel="noopener">' + esc(a.lineTargetUrl.slice(0, 50)) + '</a>' : '<span class="muted">not set</span>'],
['BixPay partner link', a.bixPartnerLink ? '<span class="mono small" style="overflow-wrap:anywhere">' + esc(a.bixPartnerLink) + '</span>' : '<span class="muted">not set (pages use a sponsor’s link or the network link)</span>'],
['Chat', a.chatAvailable ? 'available' : 'switched off']]) + '</div>';
h += '<div><h4 style="margin:0 0 6px">On-chain and money</h4>' + kv([
// Say WHICH of the two "not registered" states this is, and what it costs them, so the row
@@ -643,6 +645,12 @@
$('stSub').textContent = (st.settings.on ? 'on' : 'off') + ' · welcome bonus ' + st.settings.bonus + ' credits · ' + st.granted + ' granted';
$('trfStarter').innerHTML = '<tr><th>Game</th><th>Offer taps</th><th>First packages</th><th>Package $</th><th>Tap &rarr; buy</th></tr>' + rows.map(g => '<tr><td>' + esc(g.name) + '</td><td>' + n(g.visits) + '</td><td>' + n(g.buyers) + '</td><td>$' + g.usd.toFixed(2) + '</td><td>' + pct(g.buyers, g.visits) + '</td></tr>').join(''); }
$('trfPaths').innerHTML = '<tr><th>Page</th><th>Views</th></tr>' + (d.paths.length ? d.paths.map(p => '<tr><td>' + esc(p.path) + '</td><td>' + n(p.hits) + '</td></tr>').join('') : '<tr><td colspan="2" class="muted">No page views yet.</td></tr>');
// BixPay clicks by surface + per member (2026-10-29)
if (d.bixpay && $('trfBix')) { const bx = d.bixpay, LBL = { wallet: 'Wallet tab card', overview: 'Overview card', email: 'Payout emails', nudge: 'Game wallet nudges', promo: 'Promo tools (members’ posts and banners)', guide: '/bixpay guide', chat: 'Chatbot', other: 'Other' };
$('bixSub').textContent = 'last ' + bx.days + ' days: ' + n(bx.total) + ' clicks · all time ' + n(bx.allTime) + (bx.live ? '' : ' · bixpayLive is OFF');
const rows = Object.entries(bx.bySurface).sort((a, b) => b[1] - a[1]);
$('trfBix').innerHTML = '<tr><th>Surface</th><th>Clicks</th></tr>' + (rows.length ? rows.map(([s, c]) => '<tr><td>' + esc(LBL[s] || s) + '</td><td>' + n(c) + '</td></tr>').join('') : '<tr><td colspan="2" class="muted">No BixPay clicks in this range yet.</td></tr>');
$('trfBixMembers').innerHTML = '<tr><th>Member</th><th>All clicks</th><th>Via promo kit</th><th>Last</th></tr>' + (bx.members.length ? bx.members.map(m => '<tr><td>' + esc(m.name || m.email) + '</td><td>' + n(m.total) + '</td><td>' + n(m.promo) + '</td><td class="small muted">' + (m.last ? ago(m.last) : '') + '</td></tr>').join('') : '<tr><td colspan="4" class="muted">No member clicks yet.</td></tr>'); }
$('trfAngles').innerHTML = '<tr><th>Angle</th><th>Join-page<br>views</th><th>Signups</th><th>View &rarr;<br>signup</th></tr>' + (d.angles.length ? d.angles.map(a => '<tr><td>' + esc(a.angle) + '</td><td>' + n(a.views) + '</td><td>' + n(a.signups) + '</td><td>' + pct(a.signups, a.views) + '</td></tr>').join('') : '<tr><td colspan="4" class="muted">No angle data yet.</td></tr>');
$('trfDaily').innerHTML = '<tr><th>Day</th><th>Page views</th><th>Signups</th></tr>' + (d.daily.length ? d.daily.slice().reverse().map(x => '<tr><td>' + esc(x.day) + '</td><td>' + n(x.hits) + '</td><td>' + n(x.signups) + '</td></tr>').join('') : '<tr><td colspan="3" class="muted">Nothing yet.</td></tr>');
}
+14
View File
@@ -0,0 +1,14 @@
// BixPay guide (/bixpay, 2026-10-29): the CTA carries the viewer's resolved partner link (their own when signed in, else the
// member whose ?ref brought them here or whose sponsor cookie they carry, else the network link), always through the counted
// /go/bixpay link. The server already folded ?ref into the sponsor cookie; the ref is passed along too so the first view resolves.
(function () {
var cta = document.getElementById('bixCta'), using = document.getElementById('bixUsing'), soon = document.getElementById('bixSoon');
if (!cta) return;
var ref = '';
try { ref = new URLSearchParams(location.search).get('ref') || ''; } catch (e) { ref = ''; }
fetch('/api/public/bixpay' + (ref ? '?ref=' + encodeURIComponent(ref) : ''), { credentials: 'same-origin' }).then(function (r) { return r.json(); }).then(function (d) {
if (!d || !d.live) { if (soon) soon.hidden = false; cta.href = '/my#wallet'; if (using) using.textContent = 'Sign in to your dashboard and open the Wallet tab.'; return; }
cta.href = d.go;
if (using) using.textContent = d.whose === 'you' ? 'The button opens your own BixPay partner link.' : d.whose === 'sponsor' ? 'The button opens ' + d.name + "'s BixPay partner link." + (d.signedIn ? ' Add yours in Members > Profile.' : '') : 'The button opens the network’s BixPay partner link.' + (d.signedIn ? ' Add yours in Members > Profile.' : '');
}).catch(function () {});
})();
Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

+56 -1
View File
@@ -974,6 +974,7 @@ function shareLink(ref) { return SHARE_DOMAIN && /^[A-Za-z0-9_]{1,40}$/.test(Str
loadPositions(me);
$('linkCard').hidden = !!me.address;
$('activateCard').hidden = !(me.address && !me.memberId);
renderBix(me); // BixPay Visa card: Wallet card, Overview announcement, Profile field, promo pill (2026-10-29; nothing while bixpayLive is off)
{ let hn = $('tankHoldNote'); // held for an adopter: say so, and no activate button
if (!hn) { hn = document.createElement('p'); hn.id = 'tankHoldNote'; hn.className = 'small'; hn.style.cssText = 'margin:8px 0 0;color:#22c55e'; $('activateBtn').insertAdjacentElement('beforebegin', hn); }
hn.hidden = !TANK_HOLD; hn.textContent = TANK_HOLD ? tankHoldText(TANK_HOLD) : ''; $('activateBtn').hidden = !!TANK_HOLD; }
@@ -1962,6 +1963,60 @@ function shareLink(ref) { return SHARE_DOMAIN && /^[A-Za-z0-9_]{1,40}$/.test(Str
} catch (e) {}
}
loadWednesdayCard(); setInterval(loadWednesdayCard, 120000);
// ── BixPay Visa card (2026-10-29, docs/BIXPAY-INTEGRATION.md). me.bix comes from /api/me: { live, own, link, whose, name, using, go, announce, clicks }.
// Copy is Marty's approved wording; no in-app swap claim, "3% per purchase, no load fee", the 31-states line. No em dashes.
const BIX_BODY = 'BixPay is a self-custody wallet with a Visa card. Send USDT or USDC to it on Polygon, load the card, and spend it wherever Visa is accepted, including Apple Pay and Google Pay. Virtual cards from $9.99.';
const BIX_COMPLIANCE = 'BixPay is a separate company. BIX issues the wallet and the card through its banking partners and sets its own fees, limits, eligibility and terms. InstantAdPay is not the card issuer and earns a referral commission when you sign up through a partner link. Card availability varies by country. Crypto assets can lose value.';
function renderBix(me) {
const b = (me && me.bix) || { live: false };
const pill = document.querySelector('.promo-pills [data-promo="bixpay"]');
if (pill) pill.hidden = !b.live;
if ($('pfBixCard')) $('pfBixCard').hidden = !b.live;
const wc = $('bixWalletCard'), oc = $('bixCard');
if (!b.live || b.error) { if (wc) wc.hidden = true; if (oc) oc.hidden = true; if (!b.live && pill && pill.classList.contains('on')) setPromoSub('posts'); return; }
// Wallet tab (primary)
if (wc) {
wc.hidden = false;
wc.innerHTML = '<div class="card-head"><h3>Spend your POL anywhere with a BixPay Visa card</h3><span class="sub">a separate company; your partner link rides along</span></div>'
+ '<p>' + esc(BIX_BODY) + '</p>'
+ '<p class="small">3% per purchase, no load fee. See BIX\'s terms for other charges. Available in 31 US states so far. Not in your state yet? You can still get the wallet and build.</p>'
+ '<p style="display:flex;gap:8px;flex-wrap:wrap;align-items:center"><a class="btn" id="bixWalletGo" href="' + esc(b.go.wallet) + '" target="_blank" rel="noopener">Get your BixPay card</a> <a class="btn sec" href="/bixpay" target="_blank" rel="noopener">How it works</a></p>'
+ '<p class="small muted" id="bixWalletUsing" style="margin:6px 0 0">' + esc(b.whose === 'you' ? b.using : b.using.replace(/\s*Add yours in Profile\.$/, '')) + (b.whose !== 'you' ? ' <a href="#profile" data-goto="profile" style="color:var(--mint)">Add yours in Profile</a>' : '') + '</p>'
+ '<details class="small muted" style="margin-top:8px"><summary style="cursor:pointer">The fine print</summary><p style="margin:6px 0 0">' + esc(BIX_COMPLIANCE) + '</p></details>';
wc.querySelectorAll('[data-goto="profile"]').forEach(a => a.addEventListener('click', e => { e.preventDefault(); const m = document.querySelector('.bo-menu [data-pane="profile"]'); if (m) m.click(); setTimeout(() => { const i = $('pfBixLink'); if (i) { i.scrollIntoView({ behavior: 'smooth', block: 'center' }); i.focus(); } }, 300); }));
}
// Overview: a one-line announcement the first week, dismissable for 24 h like the other cards
if (oc) {
if (!b.announce || cardHidden('bix')) oc.hidden = true;
else {
oc.hidden = false;
oc.innerHTML = '<div class="card-head"><h3>\u{1F4B3} New: a Visa card for your POL</h3><span class="sub">BixPay, a separate company</span></div>'
+ '<p>' + esc(BIX_BODY) + ' 3% per purchase, no load fee.</p>'
+ '<p style="display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:0"><a class="btn small" href="' + esc(b.go.overview) + '" target="_blank" rel="noopener">Get your BixPay card</a> <a class="btn small sec" href="/bixpay" target="_blank" rel="noopener">How it works</a> <span class="small muted">' + esc(b.using) + '</span></p>';
cardDismiss(oc, 'bix');
}
}
// Profile field
fillBixProfile(b);
// Promo tools tab (promo.js)
if (window.IAPPromo && IAPPromo.fillBix) IAPPromo.fillBix(me);
}
function fillBixProfile(b) {
const i = $('pfBixLink'), st = $('pfBixStatus'); if (!i || !st) return;
if (document.activeElement !== i) i.value = b.own || '';
st.innerHTML = b.own
? '<span style="color:var(--mint)">Saved.</span> Your pages, posts and banners carry your own partner link.'
: (b.whose === 'sponsor' ? 'Not set yet. Until you add yours, your pages carry ' + esc(b.name) + '\'s link.' : 'Not set yet. Until you add yours, your pages carry the network link.');
}
if ($('pfBixSave')) $('pfBixSave').addEventListener('click', busy2($('pfBixSave'), async () => {
const link = $('pfBixLink').value.trim();
if (!link && !(await IAP.confirmBox('Remove your BixPay partner link? Your pages go back to your sponsor\'s link (or the network link).', { title: 'Remove the link', ok: 'Remove it', cancel: 'Keep it' }))) return;
try {
const r = await api('/api/my/bixpay', { link });
IAP.status(link ? 'BixPay partner link saved.' : 'BixPay partner link removed.', 'ok');
const me = await (await fetch('/api/me')).json(); renderBix(me);
} catch (e) { $('pfBixStatus').innerHTML = '<span style="color:var(--bad)">' + esc(e.message) + '</span>'; IAP.status(e.message, 'bad'); }
}));
// ---- Game Pass (2026-10-16, docs/GAME-PASS.md): $5 for 7 days across all ten games. More game, never "earn more". ----
const gpDate = ms => new Date(Number(ms)).toLocaleDateString([], { weekday: 'short', month: 'short', day: 'numeric' });
@@ -2622,7 +2677,7 @@ function shareLink(ref) { return SHARE_DOMAIN && /^[A-Za-z0-9_]{1,40}$/.test(Str
if ($('tkGo')) { $('tkGo').addEventListener('click', tkGenerate); $('tkAgain').addEventListener('click', tkGenerate); $('tkCopy').addEventListener('click', async () => { try { await navigator.clipboard.writeText($('tkText').value); IAP.status('Copied.', 'ok'); } catch (e) { $('tkText').select(); } }); $('tkSendBc').addEventListener('click', tkSendBroadcast); }
// promo tools: pill menu switches between posts / swipes / banners / wall / videos
function setPromoSub(name) {
const ids = ['toolkit', 'posts', 'text', 'swipe', 'banners', 'wall', 'objections', 'videos', 'viral', 'games'];
const ids = ['toolkit', 'posts', 'text', 'swipe', 'banners', 'wall', 'objections', 'videos', 'viral', 'games', 'bixpay']; // bixpay: the BixPay partner kit, pill hidden while bixpayLive is off (2026-10-29)
if (['polhunter', 'spookydoors', 'gamebanners'].includes(name)) name = 'games'; // those tabs live inside Games now (2026-10-06)
if (name === 'toolkit') loadToolkit();
const pill = document.querySelector('.promo-pills [data-promo="' + name + '"]');
+49 -1
View File
@@ -423,5 +423,53 @@ window.IAPPromo = (function () {
}
}
return { fill, POSTS, TEXTS, SWIPES, OBJECTIONS, VIDEOS };
// ── BixPay partner kit (2026-10-29, docs/BIXPAY-INTEGRATION.md). me.bix from /api/me. The three posts are Marty's approved
// copy. {L} = the member's TRACKED link (/go/bixpay?s=promo&m=<member>: counted here, then the resolved partner link), so every
// asset carries the member's link and the Promo tab can show its clicks. Banners: text only, no BIX logo (brand rules unconfirmed).
const BIX_POSTS = [
{ name: 'Short post', net: 'X', text: 'I spend my crypto with a Visa card now. BixPay keeps the keys with you, loads from USDT or USDC with no load fee, and works with Apple Pay. Virtual card from $9.99: {L}' },
{ name: 'Friendly post', net: 'Facebook', text: 'Earning crypto is one thing. Spending it without jumping through hoops is another. BixPay fixed that for me: a self-custody wallet and a Visa card in one app. Here\'s where I got mine: {L}' },
{ name: 'Partner angle', net: 'LinkedIn', text: 'BixPay pays partners on every card and on card spending, ten levels deep. If you\'re building a team anyway, this fits right in: {L}' }
];
const BIX_SWIPE = { subject: 'A Visa card for the crypto you already earn', body: 'Hey,\n\nQuick one, because this solved something for me.\n\nI earn crypto in a few places, and for a long time the awkward part was spending it. Exchange, bank, waiting, fees. BixPay took that out of the loop: it is a self-custody wallet with a Visa card in one app. You send USDT or USDC to it on Polygon, load the card, and pay wherever Visa is accepted, Apple Pay and Google Pay included.\n\nThe parts I liked:\n- The keys stay with you. It is your wallet, not an account someone else holds.\n- No load fee. 3% per purchase, and BIX\'s terms cover the rest.\n- A virtual card is $9.99 and you can be using it the same day.\n- If you build a team, BixPay pays partners on every card and on card spending, ten levels deep.\n\nUS note: it is open in 31 states so far. If yours is not on the list yet, you can still get the wallet and build.\n\nHere is my link: {L}\n\nBixPay is a separate company. BIX issues the wallet and the card through its banking partners and sets its own fees, limits, eligibility and terms. Crypto assets can lose value.\n\nTalk soon,' };
const BIX_CDN = 'https://coolify-saasytop.nyc3.cdn.digitaloceanspaces.com/game-banners/bixpay/';
const BIX_SIZES = [['728x90', 'Leaderboard'], ['300x250', 'Medium rectangle'], ['468x60', 'Banner'], ['600x300', 'Traffic exchange / splash page']];
function fillBix(me) {
const b = (me && me.bix) || {}; const sec = $('promo-bixpay'); if (!sec) return;
if (!b.live || b.error || !b.go) { sec.hidden = true; return; }
const enc = encodeURIComponent, link = b.link, go = b.go.promo;
if (sec.dataset.filled === link + '|' + go + '|' + (b.clicks ? b.clicks.total : 0)) return;
sec.dataset.filled = link + '|' + go + '|' + (b.clicks ? b.clicks.total : 0);
$('bixPromoLink').textContent = link;
$('bixPromoUsing').textContent = b.using || '';
$('bixPromoSub').textContent = b.whose === 'you' ? 'every link and banner here carries your partner link' : 'add your own partner link in Profile and these switch to yours';
$('bixPromoCopy').onclick = async () => { try { await navigator.clipboard.writeText(link); status('Partner link copied.', 'ok'); } catch (e) { status('Copy failed.', 'bad'); } };
const sh = $('bixPromoShare'); if (sh) { sh.hidden = !navigator.share; sh.onclick = async () => { try { await navigator.share({ title: 'BixPay', text: 'A Visa card for your crypto: ' + go }); } catch (e) { if (!(e && e.name === 'AbortError')) status('Could not open the share sheet.', 'bad'); } }; }
$('bixPromoGo').textContent = go;
$('bixPromoGoCopy').onclick = async () => { try { await navigator.clipboard.writeText(go); status('Tracked link copied.', 'ok'); } catch (e) { status('Copy failed.', 'bad'); } };
const n = (b.clicks && b.clicks.promo) || 0; $('bixPromoClicks').textContent = n ? 'Clicks so far: ' + n.toLocaleString() + '.' : 'No clicks counted yet.';
const pp = $('bixPromoPosts'); pp.innerHTML = '';
for (const p of BIX_POSTS) {
const text = p.text.replace('{L}', go), lead = text.replace(go, '').trim();
const extras = [];
if (p.net === 'X') extras.push(linkBtn('https://twitter.com/intent/tweet?text=' + enc(text), 'Post on X'));
if (p.net === 'Facebook') extras.push(linkBtn('https://www.facebook.com/sharer/sharer.php?u=' + enc(go), 'Share on Facebook'));
if (p.net === 'LinkedIn') extras.push(linkBtn('https://www.linkedin.com/sharing/share-offsite/?url=' + enc(go), 'Share on LinkedIn'));
extras.push(linkBtn('https://t.me/share/url?url=' + enc(go) + '&text=' + enc(lead), 'Telegram'));
extras.push(linkBtn('https://wa.me/?text=' + enc(text), 'WhatsApp'));
pp.appendChild(block(text, '<span class="pb-net">' + esc(p.name) + '</span>', extras));
}
const sw = $('bixPromoSwipe'); sw.innerHTML = '';
sw.appendChild(block('Subject: ' + BIX_SWIPE.subject + '\n\n' + BIX_SWIPE.body.replace('{L}', go), '<span class="pb-net">Email</span> <b>' + esc(BIX_SWIPE.subject) + '</b>'));
const bg = $('bixPromoBanners'); bg.innerHTML = '';
for (const [s, nme] of BIX_SIZES) {
const w = s.split('x')[0], h = s.split('x')[1], src = BIX_CDN + 'bixpay-' + s + '.png';
const code = '<a href="' + go + '" target="_blank" rel="noopener"><img src="' + src + '" width="' + w + '" height="' + h + '" alt="A Visa card for your crypto"></a>';
const d = document.createElement('div'); d.className = 'promo-block';
d.innerHTML = '<div class="pb-head"><span class="lab">' + s + '</span> <span class="muted small">' + esc(nme) + '</span></div><div style="overflow:auto;margin:8px 0"><img loading="lazy" src="' + src + '" alt="BixPay banner ' + s + '" style="max-width:100%;height:auto;border-radius:6px"></div><div class="pb-text mono small" style="overflow-wrap:anywhere">' + esc(code) + '</div>';
const row = document.createElement('div'); row.className = 'pb-actions'; row.appendChild(copyBtn(code, 'Copy embed code')); row.appendChild(copyBtn(src, 'Copy image URL')); row.appendChild(linkBtn(src, 'Open image')); d.appendChild(row); bg.appendChild(d);
}
}
return { fill, fillBix, POSTS, TEXTS, SWIPES, OBJECTIONS, VIDEOS, BIX_POSTS, BIX_SWIPE };
})();
+168
View File
@@ -0,0 +1,168 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>BixPay: a Visa card for your POL | InstantAdPay</title>
<meta name="description" content="How InstantAdPay members spend their POL with a BixPay Visa card: what BixPay is, the 3% fee, how to turn POL into USDT or USDC and load the card on Polygon, the sign-up steps with screenshots, how the BixPay partner plan pays ten levels deep, and what to know before you start.">
<meta name="theme-color" content="#043b2f">
<link rel="canonical" href="https://instantadpay.com/bixpay">
<meta property="og:type" content="website"><meta property="og:site_name" content="InstantAdPay">
<meta property="og:title" content="BixPay: a Visa card for your POL">
<meta property="og:description" content="A self-custody wallet with a Visa card. Send USDT or USDC to it on Polygon, load the card, and spend it wherever Visa is accepted, including Apple Pay and Google Pay. Virtual cards from $9.99. 3% per purchase, no load fee.">
<meta property="og:url" content="https://instantadpay.com/bixpay">
<meta name="twitter:card" content="summary">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&display=swap">
<link rel="icon" type="image/png" href="/logo-icon.png">
<link rel="stylesheet" href="/assets/site.css?v=20260912b">
<style>
.rg{max-width:900px}
.rg .hero{padding:44px 0 10px}
.rg h2{font-size:26px;margin:38px 0 6px}
.rg h3{font-size:17px;margin:0 0 6px}
.rg-eye{font-family:var(--mono);font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--amber);font-weight:700;margin:38px 0 0}
.rg-eye + h2{margin-top:6px}
.rg-cta{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:6px 0 10px}
.rg-cta .btn.big{font-size:17px;padding:14px 22px}
.rg-two{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:14px;margin:14px 0 0}
.rg-box{border:1px solid var(--line);border-radius:14px;padding:16px 18px;background:rgba(255,255,255,.02);min-width:0}
.rg-box p{margin:0;font-size:14.5px;color:var(--muted)}
.rg-box p + p{margin-top:8px}
.rg-note{font-size:14.5px;color:var(--muted);margin:8px 0 0}
.rg-route{list-style:none;counter-reset:s;margin:12px 0 0;padding:0;display:grid;gap:14px}
.rg-route > li{counter-increment:s;display:grid;grid-template-columns:42px minmax(0,1fr);gap:14px;align-items:start;border:1px solid var(--line);border-radius:14px;padding:14px 16px;background:rgba(255,255,255,.02);min-width:0}
.rg-route > li::before{content:counter(s);font-family:var(--disp);font-weight:800;font-size:20px;width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:var(--amber);color:#1b1203}
.rg-route > li > div{min-width:0}
.rg-route p{margin:0 0 8px;font-size:14.5px;color:var(--muted)}
.rg-tbl{border:1px solid var(--line);border-radius:14px;overflow:hidden;margin:10px 0 8px}
.rg-tbl table{width:100%;border-collapse:collapse;font-size:14.5px;table-layout:fixed}
.rg-tbl th,.rg-tbl td{padding:10px 12px;text-align:left;border-bottom:1px solid var(--line);vertical-align:top;overflow-wrap:anywhere}
.rg-tbl th{font-family:var(--mono);font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);font-weight:600}
.rg-tbl td:first-child{width:38%;font-weight:700}
.rg-tbl tr:last-child td{border-bottom:0}
.rg-faq{display:grid;gap:14px;margin:12px 0 0}
.rg-faq dt{font-family:var(--disp);font-weight:700}
.rg-faq dd{margin:4px 0 0;color:var(--muted);font-size:14.5px}
.rg-rule{border-left:4px solid var(--mint);background:rgba(67,232,195,.07);padding:14px 18px;border-radius:0 12px 12px 0;margin:30px 0 22px;font-size:14.5px}
.rg-warn{border-left:4px solid var(--amber);background:rgba(255,178,56,.07);padding:12px 16px;border-radius:0 12px 12px 0;margin:12px 0 0;font-size:14.5px}
.rg code.i{font-family:var(--mono);font-size:13px;color:var(--mint);background:rgba(67,232,195,.08);padding:1px 5px;border-radius:4px;overflow-wrap:anywhere}
/* phone screenshots: a row of app screens, each captioned; stacked on a phone */
.bx-shots{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr));gap:14px;margin:14px 0 0}
.bx-shot{min-width:0;text-align:center}
.bx-shot img{width:100%;max-width:240px;height:auto;border-radius:18px;border:1px solid var(--line-strong);background:#000;display:block;margin:0 auto}
.bx-shot figcaption{font-size:13px;color:var(--muted);margin:8px 0 0;line-height:1.45}
.bx-using{font-size:13.5px;color:var(--muted);margin:0}
.bx-flow{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:12px;margin:12px 0 0}
.bx-flow div{border:1px solid var(--line-strong);border-radius:12px;padding:12px 13px;background:rgba(255,255,255,.02);font-size:13.5px;color:var(--muted);line-height:1.45}
.bx-flow b{display:block;font-family:var(--disp);color:var(--ink);margin-bottom:4px}
@media (max-width:640px){.rg .hero h1{font-size:30px}.rg-box{padding:14px}.rg-route > li{grid-template-columns:34px minmax(0,1fr);gap:10px;padding:12px}.rg-route > li::before{width:34px;height:34px;font-size:17px}}
</style>
</head>
<body>
<div class="wrap rg">
<section class="hero">
<p class="eyebrow">For InstantAdPay members · BixPay is a separate company</p>
<h1>Spend your POL anywhere with a <em>BixPay Visa card</em>.</h1>
<p class="lead">BixPay is a self-custody wallet with a Visa card. Send USDT or USDC to it on Polygon, load the card, and spend it wherever Visa is accepted, including Apple Pay and Google Pay. Virtual cards from $9.99. 3% per purchase, no load fee. See BIX's terms for other charges.</p>
</section>
<div class="rg-cta">
<a class="btn big" id="bixCta" href="/my#wallet" target="_blank" rel="noopener">Get your BixPay card</a>
<a class="btn sec" href="/join">Not a member yet? Join free by email</a>
</div>
<p class="bx-using" id="bixUsing">The button opens a BixPay partner sign-up link.</p>
<p class="rg-note" id="bixSoon" hidden>The BixPay card is not switched on for InstantAdPay members yet. Check back soon.</p>
<p class="rg-note">Available in 31 US states so far. Not in your state yet? You can still get the wallet and build. Elsewhere, availability varies by country.</p>
<p class="rg-eye">What it is</p>
<h2>A wallet you hold, a card you can actually use</h2>
<div class="rg-two">
<div class="rg-box"><h3>Self-custody</h3><p>The BIX app is a wallet where the keys stay with you. It is not an exchange account. You hold the USDT or USDC that backs your card.</p></div>
<div class="rg-box"><h3>A Visa card on top</h3><p>Create a virtual card in the app for $9.99 and it works wherever Visa is accepted, online and in stores through Apple Pay and Google Pay. Plastic, metal and gold cards cost more.</p></div>
<div class="rg-box"><h3>Loads on Polygon</h3><p>Your InstantAdPay payouts land as POL on Polygon. Turn them into USDT or USDC, send that to your BixPay wallet on Polygon, and top up the card. No bridge, no bank wait.</p></div>
<div class="rg-box"><h3>What it costs</h3><p>3% per purchase, no load fee. Other charges, limits and eligibility are set by BIX; read BIX's terms before you start. We quote only the fee we can stand behind.</p></div>
</div>
<p class="rg-eye">Why we added it</p>
<h2>How BixPay pays you, in plain words</h2>
<p class="rg-note">BixPay runs a partner plan on top of the card, and InstantAdPay members plug into it with one link. Nothing here is paid by InstantAdPay: BIX tracks and pays its partners in the BIX portal, and InstantAdPay earns a referral commission when someone signs up through a partner link. Here is the plan as BIX describes it.</p>
<div class="rg-tbl">
<table>
<thead><tr><th>Piece</th><th>What BIX says it does</th></tr></thead>
<tbody>
<tr><td>The fee</td><td>3% of each card purchase. That is the only fee we quote; BIX's terms cover the rest.</td></tr>
<tr><td>What goes into the plan</td><td>Half of the purchase fees and half of card sales (the $9.99 virtual card and the others) go to partners.</td></tr>
<tr><td>Ten levels</td><td>Level 1 gets 15% of the fee, level 2 gets 10%, and levels 3 to 10 get 2.5% each.</td></tr>
<tr><td>The pool</td><td>The remaining 5% goes into a pool shared by partners with large networks, on BIX's own rules.</td></tr>
<tr><td>Card sales count too</td><td>A card bought by someone in your BixPay network pays the same way as spending does.</td></tr>
</tbody>
</table>
</div>
<div class="rg-box" style="margin-top:12px"><h3>A hypothetical, not a typical result</h3><p>If someone in your BixPay network spends $1,000 on their card in a month, the fee on that is $30. BIX says it pays the level-1 partner 15% of that fee ($4.50), the level-2 partner 10% ($3.00) and each of levels 3 to 10 a quarter of one percent of the spend ($0.75 each). That is arithmetic on BIX's published percentages, not a prediction. What anyone earns depends on how many people in their network get and use a card, and on BIX paying as described. Nobody at InstantAdPay promises any amount.</p></div>
<p class="rg-eye">Who gets the credit</p>
<h2>One link, and your sponsor follows</h2>
<div class="bx-flow">
<div><b>Your own link</b>Save your BixPay partner link in Members &gt; Profile &gt; BixPay card. Every BixPay button on your pages, your promo kit and the line in your payout emails then carry it.</div>
<div><b>Else, your sponsor's</b>Until you add yours, your pages carry the link of the first sponsor up your line (up to ten levels) who has one. Every card says so: "Using: @name's link".</div>
<div><b>Else, the network's</b>If nobody up the line has one yet, the network link is used. Add yours and the credit is yours from then on.</div>
</div>
<p class="rg-note">Sign-ups and commissions are counted inside the BIX portal, where each partner sees their directs and levels. InstantAdPay only counts the clicks on its own buttons, so you can see which page or post is working.</p>
<p class="rg-eye">Get the card</p>
<h2>Sign up as a partner, then create the card</h2>
<ol class="rg-route">
<li><div><h3>Open a partner link</h3><p>Tap <b>Get your BixPay card</b> above (or on your Wallet tab). It opens a BixPay <b>partner</b> sign-up, not the plain card-customer one, so the referral plan comes with the card.</p></div></li>
<li><div><h3>Create your BIX portal account</h3><p>Register on the page that opens (bix.ibportal.io). This is your partner back office: it shows your directs and levels and, under Profile, your own two links. The second one, labelled <b>Partner</b>, is the one you will paste into InstantAdPay later.</p></div></li>
<li><div><h3>Download the BIX app and create your wallet</h3><p>Install BixPay from your phone's app store and create the wallet in the app. Write the recovery phrase down and keep it offline: self-custody means nobody can reset it for you.</p></div></li>
<li><div><h3>Link the app to your portal</h3><p>In the app open <b>Settings &gt; Scan QR</b> and scan the QR code shown in your portal profile. That ties the wallet and card to your partner account so your activity counts.</p></div></li>
<li><div><h3>Create your card</h3><p>In the app, <b>Cards &gt; Create Card</b>. The virtual Visa is $9.99 and is ready as soon as you have passed BIX's identity check (KYC). Add it to Apple Pay or Google Pay from the card screen.</p></div></li>
</ol>
<div class="bx-shots">
<figure class="bx-shot"><img src="/assets/bixpay/bix-cards.webp" width="540" height="1115" alt="The BIX app Cards screen: a virtual Visa card with TOPUP, CARD INFO and MANAGE buttons and recent purchases at Walmart, Raceway and Pizza Hut" loading="lazy"><figcaption>The Cards screen after a few purchases. Balances and card numbers are hidden in this screenshot.</figcaption></figure>
</div>
<p class="rg-eye">Funding your card</p>
<h2>From POL to a card you can swipe</h2>
<p class="rg-note">The card spends USDT or USDC, so the one extra step is turning POL into one of those. Three ways:</p>
<ol class="rg-route">
<li><div><h3>Swap on an exchange, then send on Polygon</h3><p>Swap your POL for USDT or USDC on any exchange or on-ramp you already use. Then in the BIX app open <b>Wallet &gt; Receive</b>, pick USDT or USDC, choose the <b>Polygon</b> network and send to that address. A minute later it shows in the wallet's Cash tab; tap <b>TOPUP</b> on your card to load it.</p><p class="rg-warn" style="margin:0">Pick Polygon on both ends. Sending on another network to a Polygon address can lose the funds, and nobody can reverse it.</p></div></li>
<li><div><h3>Cash App (US)</h3><p>If you use Cash App, it can send crypto straight to your BixPay wallet. Handy for topping up from dollars without an exchange account. Cash App sets its own limits.</p></div></li>
<li><div><h3>The in-app swap, once BIX ships it</h3><p>BIX has said a swap inside the app is coming. The wallet already receives POL ("MATIC (migrated to POL)" in the Receive list), so once the swap is live you will be able to send POL straight in and swap there. We will update this page when it ships; until then use one of the two paths above.</p></div></li>
</ol>
<div class="bx-shots">
<figure class="bx-shot"><img src="/assets/bixpay/bix-receive.webp" width="540" height="1115" alt="The BIX app Receive screen listing USDT, USDC, Ethereum, SOL, BNB, MATIC (migrated to POL), TRON, Avalanche and Optimism" loading="lazy"><figcaption>Wallet &gt; Receive: pick USDT or USDC, then the Polygon network.</figcaption></figure>
<figure class="bx-shot"><img src="/assets/bixpay/bix-wallet.webp" width="540" height="1115" alt="The BIX app Wallet screen, Cash tab, showing USDT and a list of Received and Sent transactions" loading="lazy"><figcaption>Cash tab: each Received is a deposit to the wallet, each Sent right after it is the top-up to the card. Amounts hidden.</figcaption></figure>
</div>
<p class="rg-eye">If something goes wrong</p>
<h2>Disputes and protection</h2>
<div class="rg-two">
<div class="rg-box"><h3>Disputing a charge</h3><p>Every transaction in the app shows the merchant, the date, the category code and a <b>Dispute support</b> box. BIX accepts a dispute for 120 days after a transaction posts, and says a dispute can take 30 to 60 business days.</p></div>
<div class="rg-box"><h3>What InstantAdPay can and cannot do</h3><p>We can help you find your partner link, explain the steps and point you to the right screen. We cannot see your BixPay wallet, your card or your balance, and we cannot file a dispute for you. Card problems go to BIX support inside the app.</p></div>
</div>
<div class="bx-shots">
<figure class="bx-shot"><img src="/assets/bixpay/bix-dispute.webp" width="540" height="1115" alt="The BIX app Transaction Details screen for a Walmart purchase with the Dispute support note at the bottom" loading="lazy"><figcaption>Transaction details with the dispute window. Amount, location and card number hidden.</figcaption></figure>
</div>
<p class="rg-eye">Quick answers</p>
<h2>Questions members ask</h2>
<dl class="rg-faq">
<div><dt>Do I have to be a partner to get the card?</dt><dd>Our buttons open a partner link, so you register as a partner and get the card through the same app. There is no extra cost to being a partner; it just means card sign-ups through your own link are credited to you.</dd></div>
<div><dt>Where do I put my partner link on InstantAdPay?</dt><dd>Members &gt; Profile &gt; BixPay card. Copy the <b>Partner</b> link from your BIX portal profile (the second box). The field refuses the first box's referral link (it ends in appId=3) because that one only makes a card customer.</dd></div>
<div><dt>Can I send POL straight to the card?</dt><dd>Not yet. Turn it into USDT or USDC first (any exchange, or Cash App in the US), then send on Polygon. When BIX ships its in-app swap we will add that path here.</dd></div>
<div><dt>Is my money safe there?</dt><dd>It is a self-custody wallet, so it is as safe as your recovery phrase. Keep the phrase offline and never type it into a website. And remember that USDT, USDC and POL are crypto assets: they can lose value.</dd></div>
<div><dt>What does InstantAdPay get out of it?</dt><dd>A referral commission from BIX when someone signs up through a partner link, the same plan every partner is on. We are not the card issuer and we do not hold any of your funds.</dd></div>
<div><dt>Can I share this page with my own link?</dt><dd>Yes. Members &gt; Promo tools &gt; BixPay has your link, three posts, an email swipe and four banners, plus a click count. Promo tools &gt; Viral links turns this page into <code class="i">instantadpay.com/bixpay?ref=yourname</code>, and the button on it then carries your link.</dd></div>
</dl>
<div class="rg-rule"><b>Compliance.</b> BixPay is a separate company. BIX issues the wallet and the card through its banking partners and sets its own fees, limits, eligibility and terms. InstantAdPay is not the card issuer and earns a referral commission when you sign up through a partner link. Card availability varies by country. Crypto assets can lose value.</div>
<p class="muted small" style="margin-top:10px">The partner plan figures on this page are BIX's published percentages as of October 2026 and can change at BIX's discretion. Any example is arithmetic, not a prediction; no income is guaranteed or implied, and any commission depends on real card sign-ups and spending in your network. InstantAdPay sells advertising; it is not an investment product and does not hold customer funds.</p>
<footer>
<div>InstantAdPay · <a href="/">Home</a> · <a href="/wallets">Wallet guide</a> · <a href="/earning">How earning works</a> · <a href="/my#wallet">Your Wallet tab</a></div>
<div class="small">InstantAdPay is the Polygon hub of the <a href="https://cryptoteambuild.com" target="_blank" rel="noopener">Crypto Team Build Network</a>.</div>
<div class="small">Advertising services with a performance referral program. Not an investment product; no income guarantees.</div>
</footer>
</div>
<script src="/assets/common.js?v=20261023ov"></script>
<script src="/assets/bixpay-guide.js?v=20261029bx"></script>
</body>
</html>
+32 -2
View File
@@ -185,6 +185,7 @@
<div class="card" id="fdfCard" hidden></div>
<div class="card" id="wwCard" hidden></div>
<div class="card" id="rfCard" hidden aria-live="polite"></div>
<div class="card" id="bixCard" hidden></div>
<div class="card" id="gpNudge" hidden></div>
<div class="card gs" id="gsCard" hidden>
<div class="card-head"><h3>Getting started</h3><span class="sub" id="gsSub"></span></div>
@@ -832,6 +833,21 @@
<button class="chip-t" data-promo="videos" type="button" role="tab">Videos</button>
<button class="chip-t" data-promo="viral" type="button" role="tab">Viral links</button>
<button class="chip-t" data-promo="games" type="button" role="tab">🎮 Games</button>
<button class="chip-t" data-promo="bixpay" type="button" role="tab" hidden>💳 BixPay</button>
</div>
<!-- BixPay partner kit (2026-10-29): the member's resolved partner link, posts, an email swipe and four text-only banners; promo.js fillBix -->
<div class="card promo-sec" id="promo-bixpay" hidden>
<div class="card-head"><h3>💳 BixPay: a Visa card for your POL</h3><span class="sub" id="bixPromoSub">every link and banner here carries your partner link</span></div>
<p class="muted small" style="margin:0 0 10px">BixPay is a self-custody wallet with a Visa card, spent from USDT or USDC. Anyone who signs up through your link is credited to you in your BIX portal, up to ten levels deep. 3% per purchase, no load fee. See BIX's terms for other charges. <a href="/bixpay" target="_blank" rel="noopener">Read the guide</a>.</p>
<div class="promo-strip" style="padding:0 0 12px"><div><span class="eyebrow" style="margin:0 0 4px">Your BixPay partner link</span><div class="mono small" id="bixPromoLink" style="overflow-wrap:anywhere">…</div><div class="small muted" id="bixPromoUsing" style="margin-top:4px"></div></div><span><button class="btn small" id="bixPromoCopy" type="button">Copy link</button> <button class="btn small sec" id="bixPromoShare" type="button" hidden>Share</button></span></div>
<div class="promo-strip" style="padding:0 0 12px"><div><span class="eyebrow" style="margin:0 0 4px">Your tracked link</span><div class="mono small" id="bixPromoGo" style="overflow-wrap:anywhere">…</div><div class="small muted" style="margin-top:4px">The posts and banners below use this one. It counts the click here, then opens your partner link. <span id="bixPromoClicks"></span></div></div><span><button class="btn small sec" id="bixPromoGoCopy" type="button">Copy tracked link</button></span></div>
<div class="card-head"><h3>Posts</h3><span class="sub">your link is already in them</span></div>
<div id="bixPromoPosts"></div>
<div class="card-head" style="margin-top:14px"><h3>Email swipe</h3><span class="sub">plain text, paste it into any mailer</span></div>
<div id="bixPromoSwipe"></div>
<div class="card-head" style="margin-top:14px"><h3>Banners</h3><span class="sub">text only, no BIX logo; each embed carries your tracked link</span></div>
<div id="bixPromoBanners"></div>
<p class="small muted" style="margin:12px 0 0">BixPay is a separate company. BIX issues the wallet and the card through its banking partners and sets its own fees, limits, eligibility and terms. InstantAdPay is not the card issuer and earns a referral commission when you sign up through a partner link. Card availability varies by country. Crypto assets can lose value.</p>
</div>
<div class="card promo-sec" id="promo-games" hidden>
<div class="card-head"><h3>🎮 Our games</h3><span class="sub">free to play, every link carries your username</span></div>
@@ -1082,6 +1098,18 @@
</div>
<p><button class="btn" id="woSaveBtn">Save wall positions</button></p>
</div>
<!-- BixPay partner link (2026-10-29): one field, validated server-side (/api/my/bixpay); shown while bixpayLive is on -->
<div class="card" id="pfBixCard" hidden>
<h3>BixPay card</h3>
<p class="muted small">Join BixPay as a partner, then paste your Partner link here. Members and visitors who get a card through
your pages are credited to you in your BIX portal, up to ten levels deep.</p>
<p><label class="small muted" for="pfBixLink" style="display:block;margin-bottom:4px">Your BixPay partner link</label>
<input id="pfBixLink" maxlength="300" placeholder="https://bix.ibportal.io/auth/register?e=...&a=1" style="width:100%" autocomplete="off" spellcheck="false"></p>
<p class="small muted" style="margin:0 0 10px">Where to find it: BIX portal &gt; Profile &gt; Partner (the second box). Copy the link.</p>
<p style="display:flex;gap:8px;flex-wrap:wrap;align-items:center"><button class="btn" id="pfBixSave" type="button">Save partner link</button>
<a class="btn small sec" href="/bixpay" target="_blank" rel="noopener">Not a BixPay partner yet? How it works</a></p>
<p class="small" id="pfBixStatus" style="margin:10px 0 0"></p>
</div>
<div class="card">
<h3>Sponsor chat</h3>
<p class="muted small">Your line can message you one-to-one for help, and you can message anyone
@@ -1186,6 +1214,8 @@
and it unlocks the full flow. Buying any package does this automatically.</p>
<button class="btn sec" id="activateBtn">Activate payouts</button>
</div>
<!-- BixPay Visa card (2026-10-29, docs/BIXPAY-INTEGRATION.md): shown while site config bixpayLive is on; copy in my.js renderBixWallet -->
<div class="card" id="bixWalletCard" hidden></div>
<div class="card ad-foot" id="adSlotPane-wallet" hidden></div>
</div>
@@ -1221,9 +1251,9 @@
</div>
<script src="/assets/common.js?v=20261023ov"></script><script src="/assets/welcome.js?v=20260923b"></script>
<script src="/assets/wallet.js?v=20260911a"></script>
<script src="/assets/promo.js?v=20261028q"></script>
<script src="/assets/promo.js?v=20261029bx"></script>
<script src="/assets/support.js?v=20261016a"></script>
<script src="/assets/my.js?v=20261028pp"></script>
<script src="/assets/my.js?v=20261029bx"></script>
<script src="/assets/fuel.js?v=20261025ff"></script>
<script src="/assets/engine-room.js?v=20261025ff"></script>
<script src="/assets/chat.js?v=20261016n"></script>
+94
View File
@@ -0,0 +1,94 @@
// BixPay (bixpay.js, 2026-10-29): the partner-link validator, the sponsor-follows resolver (own / sponsor at level 3 / none ->
// company), the gate, the email + nudge lines and the click store. Fake accounts, throwaway data dir. Run: node qa/bixpay.test.cjs
'use strict';
const fs = require('fs');
const os = require('os');
const path = require('path');
const assert = require('assert');
const ROOT = path.join(__dirname, '..');
let fails = 0, n = 0;
async function t(name, fn) { n++; try { await fn(); console.log('ok', name); } catch (e) { fails++; console.log('FAIL', name, '::', e.message); } }
const bixpay = require(path.join(ROOT, 'bixpay.js'));
const walletnudge = require(path.join(ROOT, 'walletnudge.js'));
const PARTNER = 'https://bix.ibportal.io/auth/register?e=XqwU9T1aJ5N0UJ0yr9x0TGUiSQTsVCkTM01MIovVNnc&a=1';
const CUSTOMER = 'https://bix.ibportal.io/auth/register?e=boUGQ_dC9B472D9LGfzxPKvgfBw1iyqx-xffnx1kqPM&a=1&appId=3';
const L3 = 'https://bix.ibportal.io/auth/register?e=' + 'L3token_'.repeat(5) + '&a=1';
// a five-deep line: leaf -> s1 -> s2 -> s3 (has a link) -> s4 -> s5; plus a loop pair and an orphan
const A = {};
const mk = (email, sponsor, link, username) => { A[email] = { email, sponsorRef: sponsor || '', bixPartnerLink: link || null, username: username || null, code: email.split('@')[0] }; };
mk('leaf@x.test', 's1', null, 'leaf'); mk('s1@x.test', 's2', null, 's1'); mk('s2@x.test', 's3', null, 's2'); mk('s3@x.test', 's4', L3, 's3'); mk('s4@x.test', 's5', null, 's4'); mk('s5@x.test', '', null, 's5');
mk('own@x.test', 's1', PARTNER, 'own'); mk('orphan@x.test', '', null, 'orphan');
mk('loopa@x.test', 'loopb', null, 'loopa'); mk('loopb@x.test', 'loopa', null, 'loopb');
// twelve deep with the only link at level 11: must fall to the company (10-level walk)
let prev = ''; for (let i = 12; i >= 1; i--) { mk('d' + i + '@x.test', prev, i === 12 ? L3 : null, 'd' + i); prev = 'd' + i; }
mk('deep@x.test', 'd1', null, 'deep');
const accounts = { byEmail: async e => A[e] || null, sponsorOf: async e => { const a = A[e]; if (!a || !a.sponsorRef) return null; return Object.values(A).find(x => x.username === a.sponsorRef || x.code === a.sponsorRef) || null; } };
let site = { bixpayLive: '1', bixCompanyLink: '' };
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'bixpay-test-'));
bixpay.init({ dataDir: dir, accounts, siteConfig: () => site, refAccount: async tok => Object.values(A).find(x => x.username === tok || x.code === tok) || null });
(async () => {
await t('validator: the partner link passes and normalises', () => { const v = bixpay.validate(' ' + PARTNER + ' '); assert.ok(v.ok); assert.strictEqual(v.link, PARTNER); });
await t('validator: extra params are dropped, e= and a=1 kept', () => { const v = bixpay.validate(PARTNER + '&utm=x'); assert.ok(v.ok); assert.strictEqual(v.link, PARTNER); });
await t('validator: the appId=3 customer link is refused with the message', () => { const v = bixpay.validate(CUSTOMER); assert.ok(!v.ok); assert.strictEqual(v.error, bixpay.CUSTOMER_LINK_MSG); });
await t('validator: wrong host, wrong path, no e=, no a=1, too long, empty, http', () => {
assert.ok(bixpay.validate('https://bix.fi/r?code=ABCDEFGH').error);
assert.ok(bixpay.validate('https://bix.ibportal.io/auth/login?e=' + 'x'.repeat(40) + '&a=1').error);
assert.ok(bixpay.validate('https://bix.ibportal.io/auth/register?a=1').error);
assert.ok(bixpay.validate('https://bix.ibportal.io/auth/register?e=' + 'x'.repeat(40)).error);
assert.ok(bixpay.validate('https://bix.ibportal.io/auth/register?e=' + 'x'.repeat(40) + '&a=2').error);
assert.ok(bixpay.validate('https://bix.ibportal.io/auth/register?e=' + 'x'.repeat(300) + '&a=1').error);
assert.ok(bixpay.validate('').error); assert.ok(bixpay.validate(null).error);
assert.ok(bixpay.validate('http://bix.ibportal.io/auth/register?e=' + 'x'.repeat(40) + '&a=1').error);
assert.ok(bixpay.validate('javascript:alert(1)').error);
});
await t('resolver: own link wins', async () => { const r = await bixpay.resolve(A['own@x.test']); assert.strictEqual(r.whose, 'you'); assert.strictEqual(r.link, PARTNER); });
await t('resolver: no own link -> first sponsor up the chain with one (level 3)', async () => { const r = await bixpay.resolve(A['leaf@x.test']); assert.strictEqual(r.whose, 'sponsor'); assert.strictEqual(r.name, '@s3'); assert.strictEqual(r.email, 's3@x.test'); assert.ok(r.link.includes('L3token_')); });
await t('resolver: nobody up the chain -> company (default = Marty’s partner link)', async () => { const r = await bixpay.resolve(A['orphan@x.test']); assert.strictEqual(r.whose, 'network'); assert.strictEqual(r.link, bixpay.DEFAULT_COMPANY_LINK); assert.strictEqual(r.name, null); });
await t('resolver: null member -> company', async () => { const r = await bixpay.resolve(null); assert.strictEqual(r.whose, 'network'); });
await t('resolver: the walk stops at 10 levels (link at level 12 is not reached)', async () => { const r = await bixpay.resolve(A['deep@x.test']); assert.strictEqual(r.whose, 'network'); });
await t('resolver: a sponsor loop ends in the company link, no hang', async () => { const r = await bixpay.resolve(A['loopa@x.test']); assert.strictEqual(r.whose, 'network'); });
await t('resolver: site config bixCompanyLink overrides the default; a bad one falls back', async () => {
site.bixCompanyLink = L3; assert.strictEqual((await bixpay.resolve(null)).link, L3.replace(/&a=1$/, '&a=1'));
site.bixCompanyLink = 'https://evil.example/x'; assert.strictEqual((await bixpay.resolve(null)).link, bixpay.DEFAULT_COMPANY_LINK);
site.bixCompanyLink = '';
});
await t('resolveRef: a public page ?ref resolves like that member', async () => { const r = await bixpay.resolveRef('leaf'); assert.strictEqual(r.whose, 'sponsor'); const o = await bixpay.resolveRef('own'); assert.strictEqual(o.whose, 'you'); const u = await bixpay.resolveRef('nobody_zz'); assert.strictEqual(u.whose, 'network'); });
await t('usingLine: the three wordings', async () => {
assert.strictEqual(bixpay.usingLine(await bixpay.resolve(A['own@x.test'])), 'Using: your link.');
assert.strictEqual(bixpay.usingLine(await bixpay.resolve(A['leaf@x.test'])), "Using: @s3's link. Add yours in Profile.");
assert.strictEqual(bixpay.usingLine(await bixpay.resolve(null)), 'Using: the network link. Add yours in Profile.');
});
await t('gate: live/announcing follow site config; email and nudge lines are empty while off', () => {
assert.ok(bixpay.live()); assert.ok(bixpay.announcing());
site.bixpayLiveSince = new Date(Date.now() - 8 * 86400000).toISOString(); assert.ok(!bixpay.announcing()); site.bixpayLiveSince = '';
assert.ok(bixpay.emailLine('own').includes('/go/bixpay?s=email&m=own')); assert.ok(bixpay.nudgeLine('own').includes('s=nudge'));
assert.ok(!/—/.test(bixpay.emailLine('own')));
site.bixpayLive = '0'; assert.ok(!bixpay.live()); assert.strictEqual(bixpay.emailLine('own'), ''); assert.strictEqual(bixpay.nudgeLine('own'), ''); site.bixpayLive = '1';
});
await t('walletnudge copy carries the BixPay sentence only when given one', () => {
const c0 = walletnudge.copy([{ key: 'g', name: 'Gem Kingdom', unpaid: 1.5 }], 0, 'https://instantadpay.com/my#wallet', '');
assert.ok(!/BixPay/.test(c0.text) && !/BixPay/.test(c0.html));
const c1 = walletnudge.copy([{ key: 'g', name: 'Gem Kingdom', unpaid: 1.5 }], 0, 'https://instantadpay.com/my#wallet', bixpay.nudgeLine('own'));
assert.ok(/BixPay Visa card/.test(c1.text) && /go\/bixpay\?s=nudge/.test(c1.html));
assert.ok(c1.text.indexOf('Link your wallet:') < c1.text.indexOf('BixPay'), 'the wallet ask stays first');
});
await t('clicks: per surface, per member, per day; unknown surface -> other; bot-free store', () => {
bixpay.click('wallet', 'own@x.test'); bixpay.click('promo', 'own@x.test'); bixpay.click('promo', 'own@x.test'); bixpay.click('guide', null); bixpay.click('weird', 'leaf@x.test');
const m = bixpay.memberClicks('own@x.test'); assert.strictEqual(m.total, 3); assert.strictEqual(m.promo, 2); assert.strictEqual(m.wallet, 1);
const v = bixpay.adminView(30); assert.strictEqual(v.total, 5); assert.strictEqual(v.bySurface.promo, 2); assert.strictEqual(v.bySurface.other, 1); assert.strictEqual(v.members[0].email, 'own@x.test'); assert.strictEqual(v.daily.length, 1);
bixpay._reset(); assert.strictEqual(bixpay.memberClicks('own@x.test').total, 3, 'persisted to disk');
});
await t('copy rules: no em dashes in any BixPay copy shipped to members', () => {
const files = ['bixpay.js', 'public/assets/promo.js', 'public/assets/my.js', 'public/bixpay.html', 'public/assets/bixpay-guide.js', 'chatbot.js'];
for (const f of files) { const s = fs.readFileSync(path.join(ROOT, f), 'utf8'); const lines = s.split('\n').filter(l => /bix/i.test(l) && /—/.test(l)); assert.strictEqual(lines.length, 0, f + ' has an em dash on a BixPay line'); }
const pj = fs.readFileSync(path.join(ROOT, 'public/assets/promo.js'), 'utf8');
assert.ok(/no load fee/.test(pj) && !/in-app swap/i.test(pj.split('BIX_POSTS')[1].split('BIX_CDN')[0]), 'posts never promise the in-app swap');
});
fs.rmSync(dir, { recursive: true, force: true });
console.log('\nbixpay: ' + (n - fails) + '/' + n + ' passed');
process.exit(fails ? 1 : 0);
})();
+4
View File
@@ -17,6 +17,7 @@
# bash qa/run.sh override # level-4 override: week math, hunt, house, dust carry, cap, balance, two concurrent payers (fake chain + signer, throwaway data)
# bash qa/run.sh convpixel # conversion pixel: lsclk click ids on /api/ads/click, signed push to a MOCK LinkSpin, own-click self flag, Campaigns > Conversion tracking + cost per goal, LinkSpin down (local copy, throwaway data)
# bash qa/run.sh fuel # Fuel Your Offers: refill notices, refuel streak, Refuel Kit, Engine Room (unit + two-copy tests, throwaway data)
# bash qa/run.sh bixpay # BixPay card: partner-link validator, sponsor-follows resolver (own / level 3 / company), gate, click store (unit, no server; also runs in member)
# Each local run boots server.js on its own port with a throwaway data dir (JSON store, no DB, no
# mail key, devCode sign-in), so nothing touches production data. Reports land in qa/out/.
set -u
@@ -45,6 +46,9 @@ elif [ "$MODE" = "member" ]; then
start_local 8796 && { LOCAL=http://127.0.0.1:8796 node qa/walk.mjs member || status=1; }; stop_local 8796
node qa/tank-hold.mjs || status=1
node qa/walletnudge.test.cjs || status=1
node qa/bixpay.test.cjs || status=1
elif [ "$MODE" = "bixpay" ]; then
node qa/bixpay.test.cjs || status=1
elif [ "$MODE" = "walletnudge" ]; then
node qa/walletnudge.test.cjs || status=1
elif [ "$MODE" = "tankhold" ]; then
+61
View File
@@ -125,6 +125,67 @@ if (MODE === 'member' || MODE === 'all') {
await page.goto(LOCAL + '/my#games'); await page.reload({ waitUntil: 'load' }); await page.waitForTimeout(2500); await hide(page); // a hash-only goto would not reload the card
if (await page.evaluate(() => { const c = document.getElementById('gpCard'); return !!(c && !c.hidden); })) note('bug', L + 'my#games/gamepass', 'Game Pass card shows while gamePassEnabled is off');
flush(bag, L + 'my#games/gamepass');
// BixPay card (2026-10-29): nothing while bixpayLive is off; once on: Wallet card, Overview card, Profile field (customer link refused,
// partner link saved, "Using: your link"), the Promo tab with posts + 4 banners + the tracked link, /bixpay 200 with the CTA, /go/bixpay 302s
const ADM = { Authorization: 'Bearer ' + (process.env.ADMIN_PASSWORD || 'localtest'), 'Content-Type': 'application/json' };
{
const B = L + 'bixpay';
const me0 = await page.evaluate(() => fetch('/api/me').then(r => r.json())); const tok = me0.username || me0.refCode;
await page.click('.bo-menu [data-pane="wallet"]'); await page.waitForTimeout(800);
if (await page.evaluate(() => { const c = document.getElementById('bixWalletCard'); return !!(c && !c.hidden); })) note('bug', B + '/off', 'Wallet card shows while bixpayLive is off');
if ((await page.request.get(LOCAL + '/bixpay')).status() !== 404) note('bug', B + '/off', '/bixpay served while bixpayLive is off');
await page.request.patch(LOCAL + '/api/admin/site', { headers: ADM, data: { bixpayLive: '1' } }).catch(() => {});
await page.goto(LOCAL + '/my#wallet'); await page.reload({ waitUntil: 'load' }); await page.waitForTimeout(2500); await hide(page);
const wc = await page.evaluate(() => { const c = document.getElementById('bixWalletCard'); return c && !c.hidden ? c.textContent : ''; });
if (!/Spend your POL anywhere with a BixPay Visa card/.test(wc) || !/3% per purchase, no load fee/.test(wc) || !/31 US states/.test(wc) || !/Using: the network link/.test(wc)) note('bug', B + '/wallet', 'Wallet card missing or wrong copy: ' + wc.slice(0, 120));
const goHref = await page.$eval('#bixWalletGo', e => e.getAttribute('href')).catch(() => '');
if (!/\/go\/bixpay\?s=wallet/.test(goHref)) note('bug', B + '/wallet', 'button is not the counted /go link: ' + goHref);
await domChecks(page, B + '/wallet'); await page.screenshot({ path: OUT + '/my-wallet-bixpay.png' }).catch(() => {});
await page.click('.bo-menu [data-pane="overview"]'); await page.waitForTimeout(800);
if (!(await page.evaluate(() => { const c = document.getElementById('bixCard'); return !!(c && !c.hidden && /Visa card for your POL/.test(c.textContent) && c.querySelector('.card-x')); }))) note('bug', B + '/overview', 'announcement card missing or not dismissable');
// profile: the customer link is refused, the partner link saves, the wallet card switches to "your link"
await page.click('.bo-menu [data-pane="profile"]'); await page.waitForTimeout(800); await hide(page);
if (!(await page.$('#pfBixCard:not([hidden])'))) note('bug', B + '/profile', 'BixPay card section hidden while live');
await page.fill('#pfBixLink', 'https://bix.ibportal.io/auth/register?e=boUGQ_dC9B472D9LGfzxPKvgfBw1iyqx-xffnx1kqPM&a=1&appId=3'); await page.click('#pfBixSave'); await page.waitForTimeout(900);
if (!/card-customer link/.test(await page.$eval('#pfBixStatus', e => e.textContent).catch(() => ''))) note('bug', B + '/profile', 'customer link (appId=3) was not refused with the message');
await page.fill('#pfBixLink', 'https://bix.ibportal.io/auth/register?e=QAwalkTOKENqawalkTOKENqawalkTOKENqawalkTOK&a=1'); await page.click('#pfBixSave'); await page.waitForTimeout(1200);
if (!/Saved/.test(await page.$eval('#pfBixStatus', e => e.textContent).catch(() => ''))) note('bug', B + '/profile', 'partner link did not save');
await page.screenshot({ path: OUT + '/my-profile-bixpay.png' }).catch(() => {});
const me2 = await page.evaluate(() => fetch('/api/me').then(r => r.json()));
if (!me2.bix || me2.bix.whose !== 'you' || !/e=QAwalkTOKEN/.test(me2.bix.link)) note('bug', B + '/api/me', 'resolved link is not the member’s own after saving: ' + JSON.stringify(me2.bix || {}).slice(0, 160));
await page.click('.bo-menu [data-pane="wallet"]'); await page.waitForTimeout(600);
if (!/Using: your link/.test(await page.$eval('#bixWalletCard', e => e.textContent).catch(() => ''))) note('bug', B + '/wallet', 'Wallet card did not switch to "Using: your link"');
// promo tab
await page.click('.bo-menu [data-pane="promo"]'); await page.waitForTimeout(600);
const bpill = await page.$('.promo-pills [data-promo="bixpay"]:not([hidden])'); if (!bpill) note('bug', B + '/promo', 'BixPay pill hidden while live');
else { await bpill.click(); await page.waitForTimeout(900);
const sec = await page.evaluate(() => { const s = document.getElementById('promo-bixpay'); return s && !s.hidden ? { posts: s.querySelectorAll('#bixPromoPosts .promo-block').length, swipe: s.querySelectorAll('#bixPromoSwipe .promo-block').length, banners: s.querySelectorAll('#bixPromoBanners .promo-block').length, link: document.getElementById('bixPromoLink').textContent, go: document.getElementById('bixPromoGo').textContent, text: s.textContent } : null; });
if (!sec) note('bug', B + '/promo', 'BixPay section did not show');
else { if (sec.posts !== 3 || sec.swipe !== 1 || sec.banners !== 4) note('bug', B + '/promo', 'expected 3 posts, 1 swipe, 4 banners; got ' + sec.posts + '/' + sec.swipe + '/' + sec.banners);
if (!/e=QAwalkTOKEN/.test(sec.link)) note('bug', B + '/promo', 'partner link box is not the member’s own');
if (!/\/go\/bixpay\?s=promo&m=/.test(sec.go)) note('bug', B + '/promo', 'tracked link missing: ' + sec.go);
if (/—/.test(sec.text)) note('bug', B + '/promo', 'em dash in BixPay promo copy'); }
await domChecks(page, B + '/promo'); await page.screenshot({ path: OUT + '/my-promo-bixpay.png', fullPage: true }).catch(() => {}); }
// the counted redirect + the public guide
const go = await page.request.get(LOCAL + '/go/bixpay?s=promo&m=' + tok, { maxRedirects: 0 });
if (go.status() !== 302 || !/e=QAwalkTOKEN/.test(go.headers().location || '')) note('bug', B + '/go', 'expected a 302 to the member’s partner link, got ' + go.status() + ' ' + (go.headers().location || ''));
const me3 = await page.evaluate(() => fetch('/api/me').then(r => r.json()));
if (!me3.bix || !me3.bix.clicks || !(me3.bix.clicks.promo >= 1)) note('bug', B + '/go', 'promo click was not counted for the member');
const gp = await page.request.get(LOCAL + '/bixpay?ref=' + tok); const gb = await gp.text();
if (gp.status() !== 200 || !/Get your BixPay card/.test(gb) || !/BixPay is a separate company/.test(gb)) note('bug', B + '/guide', '/bixpay did not serve with the CTA and the compliance box: ' + gp.status());
const pub = await (await page.request.get(LOCAL + '/api/public/bixpay?ref=' + tok)).json();
if (!pub.live || pub.whose !== 'you' || !/\/go\/bixpay\?s=guide&m=/.test(pub.go || '')) note('bug', B + '/guide', 'public resolver did not resolve the ?ref member: ' + JSON.stringify(pub).slice(0, 160));
const gctx = await browser.newContext({ viewport: { width: 1280, height: 900 } }); const gpage = await gctx.newPage(); const gbag = watch(gpage, LOCAL);
await gpage.goto(LOCAL + '/bixpay?ref=' + tok, { waitUntil: 'networkidle' }); await gpage.waitForTimeout(800);
await domChecks(gpage, B + '/guide'); flush(gbag, B + '/guide'); await gpage.screenshot({ path: OUT + '/bixpay-guide.png', fullPage: true }).catch(() => {}); await gctx.close();
// clean up: link removed, switch back off, everything hidden again
await page.evaluate(() => fetch('/api/my/bixpay', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: '{"link":""}' }).then(r => r.json())); // read the body before navigating, or the walk logs its own aborted request
await page.request.patch(LOCAL + '/api/admin/site', { headers: ADM, data: { bixpayLive: '0' } }).catch(() => {});
if ((await page.request.get(LOCAL + '/bixpay')).status() !== 404) note('bug', B + '/off', '/bixpay still served after switching off');
await page.goto(LOCAL + '/my#promo'); await page.reload({ waitUntil: 'load' }); await page.waitForTimeout(2500); await hide(page);
if (await page.$('.promo-pills [data-promo="bixpay"]:not([hidden])')) note('bug', B + '/off', 'BixPay pill still shows after switching off');
flush(bag, B); console.log('ok BixPay: wallet card, overview card, profile field, promo tab, /go, /bixpay');
}
await page.click('.bo-menu [data-pane="promo"]'); await page.waitForTimeout(800);
if (!(await page.$$('#promoPosts .promo-block')).length) note('bug', L + 'promo', 'no post cards rendered');
// viral links: the builder renders a ?ref= link; any page + ?ref=<member> redirects clean and sets the sponsor cookie; an unknown ref sets nothing
+68 -6
View File
@@ -36,6 +36,7 @@ const walletnudge = require('./walletnudge');
const milestone = require('./milestone'); // players with POL waiting in the games and no wallet (2026-10-07) // holding tank: unsponsored free members, adoptions, pay-it-forward
const legacy = require('./legacy'); // Faucet Wave / Tier One Ads bridge: welcome-back credits for listed emails
const traffic = require('./traffic'); // public page views by referring domain (admin Traffic tab)
const BOT_UA = /bot|crawl|spider|slurp|facebookexternalhit|preview|monitor|wget|python-requests/i; // link previewers and crawlers: never a counted BixPay click (headless stays countable for the QA harness)
const loginShows = require('./loginshows'); // login-ad showings per day, dashboard vs games (2026-10-18)
const promos = require('./promos');
const missedNotice = require('./missed'); // the whole-chain missed-payout notice // partner promo codes -> free ad credits (link ?promo=CODE or the dashboard box)
@@ -51,6 +52,7 @@ const lssync = require('./lssync');
const lsconv = require('./lsconv'); // conversion tracking: ad click ids pushed to LinkSpin + the member's goals (2026-10-23)
const lsinbound = require('./lsinbound'); // reverse registry sync: LinkSpin-first members arrive as waiting accounts (2026-10-15)
const SF = require('./sponsorfollow'); // deliberate sponsor changes follow to LinkSpin until chain-bound + one network tank (2026-10-22)
const bixpay = require('./bixpay'); // BixPay Visa card: partner-link field, sponsor-follows resolver, tracked clicks (2026-10-29, gated by site config bixpayLive)
let follow = null, followStore = null;
const LS_BASE = () => String(process.env.LS_URL || 'https://linkspin.app').replace(/\/+$/, '');
let activationCache = { at: 0, map: null };
@@ -85,7 +87,7 @@ const supportbot = require('./supportbot'); // @CTBTickets_bot: ticket pings wit
const tickets = require('./tickets'); // help desk: member Help pane, public /support, chatbot hand-off, admin Support pane (Marty, 2026-10-16)
const pipeline = require('./pipeline'); // sponsor follow-up board (coming soon until site setting pipelineMode = on) (Marty, 2026-09-15)
const videomaker = require('./videomaker'); // Circuit tool: promo videos with the member's own end card (ffmpeg in the image) // badge-gated promo toolkit + AI Copy Engine (Surge and up) (Marty, 2026-09-14) // referral contest: /leaderboard, Overview card, weekly + monthly winners (Marty, 2026-09-14) // release notes + roadmap: /whats-new, Overview card, Admin > Releases (Marty, 2026-09-14) // blog -> Blotato -> X + Instagram on publish (Marty, 2026-09-13) // admin member card: search, drilldown, edits (Marty, 2026-09-13) // admin-written coaching articles, server-rendered public /blog with SEO metadata (Marty, 2026-09-12)
const TRAFFIC_PAGES = new Set(['/', '/ledger', '/contract', '/shorts', '/plays', '/wallets', '/launch', '/partners', '/earning', '/games', '/blog', '/whats-new', '/leaderboard', '/friday', '/wednesday', '/refuel', '/conversion-tracking', '/presentation', '/support']);
const TRAFFIC_PAGES = new Set(['/', '/ledger', '/contract', '/shorts', '/plays', '/wallets', '/launch', '/partners', '/earning', '/games', '/blog', '/whats-new', '/leaderboard', '/friday', '/wednesday', '/refuel', '/conversion-tracking', '/presentation', '/support', '/bixpay']);
let tankWaitCache = null; // dashboard: who is waiting for a sponsor (refreshed every minute)
const geo = require('./geo'); // viewer country -> tier (DB-IP lite), for campaign targeting
const burner = require('./burner'); // automatic on-chain credit burns (inert without ENGINE_KEY)
@@ -551,7 +553,7 @@ async function boot() {
messages.init({ dataDir: DATA_DIR });
reports.init({ dataDir: DATA_DIR });
drip.init({ dataDir: DATA_DIR, mailer, accounts, chain, site: 'https://instantadpay.com' });
chatbot.init({ dataDir: DATA_DIR, chain, gameLive: slug => String(siteConfig().gamesLive == null ? 'polhunter' : siteConfig().gamesLive).split(',').map(x => x.trim().toLowerCase()).includes(slug), refuelOn: () => refuel.cfg().on, passTiers: () => { const c = gamepass.cfg(); return { on: c.enabled && c.tierSales, rows: gamepass.TIER_DEFS.filter(d => d.key !== 'weekly').map(d => ({ name: d.name, perks: d.perks, price: c.tiers[d.key].price, usd: c.tiers[d.key].price / 100, days: c.tiers[d.key].days, sale: c.tiers[d.key].sale })) }; } }); // pass tiers fact follows sovTiers (2026-10-22)
chatbot.init({ dataDir: DATA_DIR, chain, bixLive: () => bixpay.live(), gameLive: slug => String(siteConfig().gamesLive == null ? 'polhunter' : siteConfig().gamesLive).split(',').map(x => x.trim().toLowerCase()).includes(slug), refuelOn: () => refuel.cfg().on, passTiers: () => { const c = gamepass.cfg(); return { on: c.enabled && c.tierSales, rows: gamepass.TIER_DEFS.filter(d => d.key !== 'weekly').map(d => ({ name: d.name, perks: d.perks, price: c.tiers[d.key].price, usd: c.tiers[d.key].price / 100, days: c.tiers[d.key].days, sale: c.tiers[d.key].sale })) }; } }); // pass tiers fact follows sovTiers (2026-10-22)
setTimeout(() => ads.dailySweep().catch(e => console.error('sweep', e.message)), 60 * 1000);
setInterval(() => ads.dailySweep().catch(e => console.error('sweep', e.message)), 60 * 60 * 1000);
setInterval(() => ads.scheduleSweep().catch(e => console.error('schedule sweep', e.message)), 5 * 60 * 1000); // scheduled starts/ends
@@ -650,6 +652,7 @@ async function boot() {
setInterval(() => lssync.tick().catch(e => console.error('lssync', e.message)), 2 * 60 * 1000);
setInterval(() => follow.retryPending().catch(e => console.error('sponsorfollow retry', e.message)), 2 * 60 * 1000); // follows waiting on a chain read or a sponsor account
walletnudge.init({ dataDir: DATA_DIR, accounts, chain, mailer, optedIn: updates.optedIn, site: 'https://instantadpay.com',
bixLine: a => bixpay.nudgeLine(a ? (a.username || a.code) : ''), // one BixPay sentence in the nudge, only while bixpayLive (2026-10-29)
message: async (to, subject, html) => { await messages.deliver(1, ADMIN_EMAIL || 'house@instantadpay.com', [to], subject, html, 'notice'); } });
setTimeout(() => walletnudge.tick().catch(e => console.error('walletnudge', e.message)), 3 * 60 * 1000); // past the deploy overlap window
setInterval(() => walletnudge.tick().catch(e => console.error('walletnudge', e.message)), 60 * 60 * 1000);
@@ -666,9 +669,10 @@ async function boot() {
}
legacy.init({ dataDir: DATA_DIR });
traffic.init({ dataDir: DATA_DIR });
bixpay.init({ dataDir: DATA_DIR, accounts, siteConfig, refAccount });
loginShows.init({ dataDir: DATA_DIR });
promos.init({ dataDir: DATA_DIR });
blog.init({ dataDir: DATA_DIR });
blog.init({ dataDir: DATA_DIR, extraPages: () => bixpay.live() ? ['/bixpay'] : [] });
adminMember.init({ accounts, ads, chain, tank, legacy, promos, messages, dataDir: DATA_DIR });
gamepass.init({ dataDir: DATA_DIR, siteConfig, accounts, marks, isProd: IS_PROD, persistedMap, polUsd: polUsdLive,
blockTime: async n => { const blk = await chain.rpc('eth_getBlockByNumber', ['0x' + Number(n).toString(16), false]); return blk && blk.timestamp ? parseInt(blk.timestamp, 16) : 0; }, // a pass order is fulfilled only by a purchase mined after it
@@ -816,6 +820,10 @@ function siteConfig() {
// /join/<username> here, so shared links do not carry instantadpay.com (Spamhaus DBL). '' = old instantadpay.com/join links.
// Switch to the spare (mylinehq.com) if one gets flagged. Old links keep working either way.
shareDomain: 'ctbgo.com',
// BixPay Visa card (2026-10-29, docs/BIXPAY-INTEGRATION.md): '0' = nothing shows anywhere (no Profile field, Wallet card,
// Overview card, promo tab, /bixpay guide, chatbot says coming soon). bixCompanyLink = the network fallback partner link
// (Marty's own PARTNER link, IB12143793); bixpayLiveSince is stamped when the switch is flipped on (the Overview card runs a week).
bixpayLive: '0', bixCompanyLink: bixpay.DEFAULT_COMPANY_LINK, bixpayLiveSince: '',
pnlFixedMonthlyUsd: 0
}, saved);
}
@@ -1356,9 +1364,11 @@ async function emailOnEvent(ev) {
const pct = PCT[ev.tier] || 0; const pur = purchaseOf(ev.tx);
let buyer = 'a member on your level ' + ev.tier; try { buyer = await memberLabel(ev.buyerId); } catch (e) {}
const pol = weiToPol(ev.amountWei);
// BixPay (2026-10-29): one sentence after the amount, the recipient's resolved partner link behind a counted /go link; only while live
let bixLine = ''; try { if (bixpay.live()) { const ra = await accounts.byMemberId(ev.recipientId); bixLine = bixpay.emailLine(ra ? (ra.username || ra.code) : ''); } } catch (e) { bixLine = ''; }
await tell(ev.recipientId, 'You just got paid ' + pol + ' POL on InstantAdPay',
buyer + ' just bought an ad package on your level ' + ev.tier + (pur ? ' ($' + (pur.priceCents / 100).toFixed(2).replace(/\.00$/, '') + ')' : '') + '. Your ' + pct + ' percent share, ' + pol + ' POL' + usdShare(pur, pct) + ', landed in your wallet in the same transaction' + (ev.hops ? ', passed up to you because someone between you was not qualified for this level' : '') + '.\n\n' +
'Transaction: ' + txUrlOf(ev.tx) + '\n\nYour dashboard: https://instantadpay.com/my');
(bixLine ? bixLine + '\n\n' : '') + 'Transaction: ' + txUrlOf(ev.tx) + '\n\nYour dashboard: https://instantadpay.com/my');
}
else if (ev.type === 'AwardPaid') {
const ov = override.txInfo(ev.tx); // a level-4 override payment from the weekly payer
@@ -2245,6 +2255,7 @@ const server = http.createServer(async (req, res) => {
// -- the pages a member can turn into a viral link (promo tools > Viral links)
if (p === '/api/pages' && req.method === 'GET') {
const pages = [{ path: '/', title: 'Home page' }, { path: '/blog', title: 'Blog' }, { path: '/earning', title: 'How earning works' }, { path: '/games', title: 'Games that pay POL' }, { path: '/ledger', title: 'Live ledger' }, { path: '/leaderboard', title: 'Leaderboard' }, { path: '/contract', title: 'The contract' }, { path: '/plays', title: 'Team-building plays' }, { path: '/wallets', title: 'Wallet guide' }, { path: '/friday', title: 'Five Dollar Friday' }, { path: '/refuel', title: 'Fuel Your Offers: the Monthly Refuel guide' }, { path: '/conversion-tracking', title: 'Conversion tracking: how to set it up' }, { path: '/whats-new', title: "What's new" }, { path: '/shorts', title: 'Shorts' }, { path: '/presentation', title: 'The presentation (narrated video)' }];
if (bixpay.live()) pages.push({ path: '/bixpay', title: 'BixPay: a Visa card for your POL' }); // the guide resolves the sharer's partner link from ?ref (2026-10-29)
try { for (const b of (await blog.listPublished()).slice(0, 40)) pages.push({ path: '/blog/' + b.slug, title: 'Article: ' + b.title, cover: b.cover || null }); } catch (e) {}
return json(res, 200, { pages });
}
@@ -2791,6 +2802,9 @@ const server = http.createServer(async (req, res) => {
socials: (acct && acct.socials) || null,
wallOffers: parseWallOffers(acct),
lineBannerUrl: (acct && acct.lineBannerUrl) || null, lineTargetUrl: (acct && acct.lineTargetUrl) || null };
// BixPay (2026-10-29): the member's own partner link plus the one their pages resolve to (own > sponsor chain > network)
if (bixpay.live()) { try { const r = await bixpay.resolve(acct); const tok = (acct && (acct.username || acct.code)) || ''; out.bix = { live: true, own: (acct && acct.bixPartnerLink) || null, link: r.link, whose: r.whose, name: r.name, using: bixpay.usingLine(r), go: { wallet: bixpay.goLink('wallet'), overview: bixpay.goLink('overview'), promo: bixpay.goLink('promo', tok) }, announce: bixpay.announcing(), clicks: bixpay.memberClicks(acct && acct.email) }; } catch (e) { out.bix = { live: true, error: true }; } }
else out.bix = { live: false };
if (memberId) {
try {
const mm = await chain.member(memberId);
@@ -3330,6 +3344,14 @@ const server = http.createServer(async (req, res) => {
return json(res, 404, { error: 'unknown op' });
}
// -- the Engine Room, partner side: this site's facts for one member + the streak (LinkSpin builds its own panel from them)
// -- BixPay link for one member, the same resolver (own > sponsor chain > network), for LinkSpin / CTB cards (2026-10-29, read-only there)
if (p === '/api/partner/bixpay' && req.method === 'POST') {
const sg = await readLsSigned(req, 64000); if (!sg.body) return json(res, sg.status, { error: sg.error });
const email = String(sg.body.email || '').trim().toLowerCase(); if (!email) return json(res, 400, { error: 'Which member?' });
if (!bixpay.live()) return json(res, 200, { ok: true, live: false });
const a = await accounts.byEmail(email); const r = await bixpay.resolve(a);
return json(res, 200, { ok: true, live: true, own: (a && a.bixPartnerLink) || null, link: r.link, whose: r.whose, name: r.name, using: bixpay.usingLine(r), editUrl: 'https://instantadpay.com/my#profile', guide: 'https://instantadpay.com/bixpay' });
}
if (p === '/api/partner/engine' && req.method === 'POST') {
const sg = await readLsSigned(req, 64000); if (!sg.body) return json(res, sg.status, { error: sg.error });
const email = String(sg.body.email || '').trim().toLowerCase(); if (!email) return json(res, 400, { error: 'Which member?' });
@@ -3420,6 +3442,7 @@ const server = http.createServer(async (req, res) => {
if (p === '/api/admin/traffic' && req.method === 'GET') {
if (!isAdmin(req)) return json(res, 401, { error: 'auth' });
const days = Math.min(365, Math.max(1, Number(u.searchParams.get('days')) || 30));
const bix = bixpay.adminView(days); try { for (const m of bix.members) { const a = await accounts.byEmail(m.email); m.name = a ? (a.username ? '@' + a.username : a.email) : m.email; } } catch (e) {} // BixPay clicks per surface and per member (2026-10-29)
const since = Date.now() - days * 86400000, sinceDay = new Date(since).toISOString().slice(0, 10);
const hosts = {}, paths = {}, daily = {}, angles = {};
const H = k => (hosts[k] = hosts[k] || { source: k, hits: 0, joinViews: 0, signups: 0, registered: 0, buyers: 0 });
@@ -3434,7 +3457,7 @@ const server = http.createServer(async (req, res) => {
const k = a.joinedVia || 'plain'; angles[k] = angles[k] || { angle: k, views: 0, signups: 0 }; angles[k].signups += 1;
}
const sources = Object.values(hosts).sort((x, y) => (y.hits + y.joinViews + y.signups * 10) - (x.hits + x.joinViews + x.signups * 10));
return json(res, 200, { starter: starter.adminView(), days, sources, paths: Object.entries(paths).map(([path, hits]) => ({ path, hits })).sort((x, y) => y.hits - x.hits),
return json(res, 200, { starter: starter.adminView(), bixpay: Object.assign(bix, { live: bixpay.live() }), days, sources, paths: Object.entries(paths).map(([path, hits]) => ({ path, hits })).sort((x, y) => y.hits - x.hits),
angles: Object.values(angles).sort((x, y) => y.views - x.views), daily: Object.values(daily).sort((x, y) => x.day < y.day ? -1 : 1),
totals: { hits: sources.reduce((n, s) => n + s.hits, 0), joinViews: sources.reduce((n, s) => n + s.joinViews, 0), signups: sources.reduce((n, s) => n + s.signups, 0), buyers: sources.reduce((n, s) => n + s.buyers, 0) } });
}
@@ -4631,6 +4654,31 @@ const server = http.createServer(async (req, res) => {
const r = await accounts.setProfile(s.email, avatar, bio, socials);
return json(res, r.error ? 400 : 200, r);
}
// -- BixPay partner link (2026-10-29): Profile > BixPay card. Validated (bix.ibportal.io/auth/register, e=, a=1; the
// appId=3 card-customer link is refused with a message); empty clears it. Rides to LinkSpin in the profile row.
if (p === '/api/my/bixpay' && req.method === 'POST') {
const s = await auth.fromRequest(req);
if (!s || !s.email) return json(res, 401, { error: 'Sign in first.' });
if (!bixpay.live()) return json(res, 404, { error: 'Not open yet.' });
const b = await readBody(req);
const raw = String(b.link == null ? '' : b.link).trim();
if (!raw) { const r = await accounts.setBixLink(s.email, null); if (r.error) return json(res, 400, r); const rs = await bixpay.resolve(r.account); return json(res, 200, { ok: true, own: null, link: rs.link, whose: rs.whose, name: rs.name, using: bixpay.usingLine(rs) }); }
const v = bixpay.validate(raw);
if (!v.ok) return json(res, 400, { error: v.error, customerLink: v.error === bixpay.CUSTOMER_LINK_MSG });
const r = await accounts.setBixLink(s.email, v.link);
if (r.error) return json(res, 400, r);
return json(res, 200, { ok: true, own: v.link, link: v.link, whose: 'you', name: null, using: bixpay.usingLine({ whose: 'you' }) });
}
// -- the /bixpay guide's CTA: the viewer's resolved link (their own when signed in, else the ?ref / sponsor cookie's member, else network)
if (p === '/api/public/bixpay' && req.method === 'GET') {
if (!bixpay.live()) return json(res, 200, { live: false });
const s = await auth.fromRequest(req).catch(() => null);
let acct = (s && s.email && await accounts.byEmail(s.email)) || null;
const tok = String(u.searchParams.get('ref') || '').trim().toLowerCase().slice(0, 40) || String(parseCookies(req)['iap.sponsor'] || '').trim().toLowerCase().slice(0, 40);
const r = acct ? await bixpay.resolve(acct) : await bixpay.resolveRef(tok);
const owner = acct || (tok ? await refAccount(tok).catch(() => null) : null);
return json(res, 200, { live: true, whose: r.whose, name: r.name, using: bixpay.usingLine(r), go: bixpay.goLink('guide', owner ? (owner.username || owner.code) : ''), promoGo: owner ? bixpay.goLink('promo', owner.username || owner.code) : null, signedIn: !!acct });
}
// -- wall positions 2 & 3: the member's own offers, unlocked at 2 / 5 qualifying buyers
if (p === '/api/my/wall-offers' && req.method === 'POST') {
const s = await auth.fromRequest(req);
@@ -5257,7 +5305,8 @@ const server = http.createServer(async (req, res) => {
for (const c of camps) { byStatus[c.status] = (byStatus[c.status] || 0) + 1; byType[c.type] = (byType[c.type] || 0) + 1; }
let memberCount = null; try { memberCount = await chain.memberCount(); } catch (e) {}
const cc = chain.getConfig();
return json(res, 200, { accounts: await accounts.count(), memberCount, campaigns: camps.length,
let bixLinks = 0; try { bixLinks = (await accounts.listAll(100000)).filter(a => a.bixPartnerLink).length; } catch (e) {} // members with a BixPay partner link (2026-10-29)
return json(res, 200, { accounts: await accounts.count(), memberCount, campaigns: camps.length, bixLinks, bixpayLive: bixpay.live(),
house: camps.filter(c => c.house).length, byStatus, byType,
openReports: await reports.openCount(), pendingBurns: (await ads.pendingBurns()).length,
followups: await drip.stats(),
@@ -5613,6 +5662,8 @@ const server = http.createServer(async (req, res) => {
if (!isAdmin(req)) return json(res, 401, { error: 'auth' });
const b = await readBody(req);
const cur = siteConfig();
if (b.bixCompanyLink !== undefined && String(b.bixCompanyLink || '').trim()) { const v = bixpay.validate(b.bixCompanyLink); if (!v.ok) return json(res, 400, { error: 'bixCompanyLink: ' + v.error }); b.bixCompanyLink = v.link; }
if (String(b.bixpayLive) === '1' && String(cur.bixpayLive) !== '1' && !String(cur.bixpayLiveSince || '').trim()) b.bixpayLiveSince = new Date().toISOString(); // the Overview announcement runs a week from the flip
fs.writeFileSync(SITE_FILE, JSON.stringify(Object.assign(cur, b), null, 2));
return json(res, 200, { ok: true, site: siteConfig() });
}
@@ -5704,6 +5755,17 @@ const server = http.createServer(async (req, res) => {
if (p === '/friday') return sendFile(res, path.join(PUBLIC_DIR, 'friday.html'));
if (p === '/wednesday') return sendFile(res, path.join(PUBLIC_DIR, 'wednesday.html'));
if (p === '/conversion-tracking') return sendFile(res, path.join(PUBLIC_DIR, 'conversion-tracking.html')); // how to set up the conversion pixel, the member guide (2026-10-24)
if (p === '/bixpay') { if (!bixpay.live()) { res.writeHead(404, baseHeaders({ 'Content-Type': 'text/plain' })); return res.end('Not found'); } return sendFile(res, path.join(PUBLIC_DIR, 'bixpay.html')); } // the BixPay card guide (2026-10-29), public once bixpayLive is on
// counted BixPay click: every surface links here; resolves the member's link (own > sponsor chain > network) and 302s to it
if (p === '/go/bixpay') {
if (!bixpay.live()) { res.writeHead(302, baseHeaders({ Location: '/' })); return res.end(); }
const surface = String(u.searchParams.get('s') || 'other').trim().toLowerCase().slice(0, 12);
const tok = String(u.searchParams.get('m') || '').trim().toLowerCase().slice(0, 40);
let acct = null; try { if (tok) acct = await refAccount(tok); if (!acct) { const s = await auth.fromRequest(req); if (s && s.email) acct = await accounts.byEmail(s.email); } if (!acct) { const ck = String(parseCookies(req)['iap.sponsor'] || '').trim().toLowerCase(); if (ck) acct = await refAccount(ck); } } catch (e) { acct = null; }
const r = await bixpay.resolve(acct);
if (!BOT_UA.test(String(req.headers['user-agent'] || ''))) bixpay.click(surface, acct ? acct.email : null);
res.writeHead(302, baseHeaders({ Location: r.link, 'Cache-Control': 'no-store' })); return res.end();
}
if (p === '/refuel') return sendFile(res, path.join(PUBLIC_DIR, u.searchParams.has('t') ? 'refuel.html' : 'refuel-guide.html')); // ?t=<token>: the games' refuel visit (2026-09-30); no token: the Fuel Your Offers member guide (2026-10-24)
if (p === '/door') return sendFile(res, path.join(PUBLIC_DIR, 'door.html')); // Spooky Doors door visit (2026-10-02)
// per-partner kit pages (Marty, 2026-09-29): /partners/<slug> serves public/kits/<slug>.html, one file per reviewer or site owner
+97
View File
@@ -0,0 +1,97 @@
# BixPay promo banners (2026-10-29): four text-only sizes for Promo tools > BixPay. No BIX logo (brand rules not confirmed),
# the "crypto Visa card" angle in the game-banner style: deep green, mint accent, Sora-like bold display text, a card motif
# drawn with shapes. Run: python tools/gen-bixpay-banners.py <outdir> then upload to Spaces game-banners/bixpay/.
# Copy rules: no income promises, the one fee line, no em dashes.
import sys, os
from PIL import Image, ImageDraw, ImageFont
OUT = sys.argv[1] if len(sys.argv) > 1 else "D:/tmp/bixpay-banners"
os.makedirs(OUT, exist_ok=True)
GREEN = (4, 59, 47); DEEP = (3, 38, 31); MINT = (67, 232, 195); INK = (236, 248, 243); MUTED = (170, 205, 194); AMBER = (255, 178, 56)
FONTS = ["C:/Windows/Fonts/segoeuib.ttf", "C:/Windows/Fonts/arialbd.ttf"]
FONT_R = ["C:/Windows/Fonts/segoeui.ttf", "C:/Windows/Fonts/arial.ttf"]
def font(size, bold=True):
for p in (FONTS if bold else FONT_R):
if os.path.exists(p): return ImageFont.truetype(p, size)
return ImageFont.load_default()
def bg(w, h):
im = Image.new("RGB", (w, h), GREEN)
d = ImageDraw.Draw(im)
# soft diagonal band
for i in range(h):
t = i / max(1, h - 1)
c = tuple(int(GREEN[k] * (1 - t) + DEEP[k] * t) for k in range(3))
d.line([(0, i), (w, i)], fill=c)
return im
def card(d, x, y, w, h):
# a plain card shape: rounded rectangle, a chip, a stripe. No brand marks.
d.rounded_rectangle((x, y, x + w, y + h), radius=int(h * 0.12), fill=MINT)
d.rounded_rectangle((x + w * 0.08, y + h * 0.32, x + w * 0.26, y + h * 0.56), radius=int(h * 0.05), fill=(214, 182, 90))
d.rounded_rectangle((x + w * 0.08, y + h * 0.70, x + w * 0.62, y + h * 0.78), radius=int(h * 0.03), fill=(6, 60, 48))
d.ellipse((x + w * 0.70, y + h * 0.62, x + w * 0.84, y + h * 0.86), fill=(6, 60, 48))
d.ellipse((x + w * 0.79, y + h * 0.62, x + w * 0.93, y + h * 0.86), outline=(6, 60, 48), width=max(2, int(h * 0.03)))
def text_w(d, s, f):
b = d.textbbox((0, 0), s, font=f); return b[2] - b[0], b[3] - b[1]
def fit(d, s, maxw, start, bold=True, floor=10):
sz = start
while sz > floor:
f = font(sz, bold)
if text_w(d, s, f)[0] <= maxw: return f
sz -= 1
return font(floor, bold)
def pill(d, x, y, s, f, pad=10):
# the text's bbox offsets (Segoe sits a few px below the origin) are subtracted so the label is centred in the pill
b = d.textbbox((0, 0), s, font=f); tw, th = b[2] - b[0], b[3] - b[1]
d.rounded_rectangle((x, y, x + tw + pad * 2, y + th + pad * 2), radius=(th + pad * 2) // 2, fill=MINT)
d.text((x + pad - b[0], y + pad - b[1]), s, font=f, fill=(4, 30, 24))
return tw + pad * 2
def pill_size(d, s, f, pad=10):
b = d.textbbox((0, 0), s, font=f); return b[2] - b[0] + pad * 2, b[3] - b[1] + pad * 2
def leaderboard(w, h): # 728x90, 468x60
im = bg(w, h); d = ImageDraw.Draw(im)
ch = int(h * 0.62); cw = int(ch * 1.58); cx = int(h * 0.18); cy = (h - ch) // 2
card(d, cx, cy, cw, ch)
x = cx + cw + int(h * 0.22)
head = "A Visa card for your crypto"
f1 = fit(d, head, w * 0.52, int(h * 0.30)); d.text((x, int(h * 0.12)), head, font=f1, fill=INK)
sub = "Spend POL anywhere Visa is accepted. 3% per purchase, no load fee."
f2 = fit(d, sub, w * 0.55, int(h * 0.17), bold=False); d.text((x, int(h * 0.56)), sub, font=f2, fill=MUTED)
f3 = font(int(h * 0.19)); s = "Get the card"; pad = int(h * 0.09)
pw, ph = pill_size(d, s, f3, pad); pill(d, w - pw - int(h * 0.18), (h - ph) // 2, s, f3, pad=pad)
return im
def rectangle(w, h): # 300x250
im = bg(w, h); d = ImageDraw.Draw(im)
f0 = font(12); d.text((18, 16), "CRYPTO VISA CARD", font=f0, fill=MINT)
cw = 118; ch = 74; card(d, w - cw - 18, 14, cw, ch)
head = "Spend your POL\nanywhere"
f1 = font(26); d.multiline_text((18, 96), head, font=f1, fill=INK, spacing=0)
sub = "A self-custody wallet with a Visa card.\nApple Pay and Google Pay.\n3% per purchase, no load fee."
f2 = font(12, bold=False); d.multiline_text((18, 160), sub, font=f2, fill=MUTED, spacing=3)
f3 = font(14); s = "Get the card"; pw, ph = pill_size(d, s, f3, 9); pill(d, w - pw - 18, h - ph - 14, s, f3, pad=9)
return im
def splash(w, h): # 600x300
im = bg(w, h); d = ImageDraw.Draw(im)
f0 = font(15); d.text((30, 26), "CRYPTO VISA CARD", font=f0, fill=MINT)
card(d, w - 230, 36, 196, 122)
head = "Spend your POL\nanywhere Visa\nis accepted."
f1 = font(40); d.multiline_text((30, 54), head, font=f1, fill=INK, spacing=0)
sub = "A self-custody wallet with a Visa card. Virtual card from $9.99. 3% per purchase, no load fee."
f2 = fit(d, sub, w - 60, 17, bold=False); d.text((30, 218), sub, font=f2, fill=MUTED)
f3 = font(18); s = "Get your card"; pw, ph = pill_size(d, s, f3, 12); pill(d, w - pw - 30, h - ph - 24, s, f3, pad=12)
return im
SIZES = {"728x90": leaderboard, "468x60": leaderboard, "300x250": rectangle, "600x300": splash}
for s, fn in SIZES.items():
w, h = map(int, s.split("x"))
im = fn(w, h)
assert im.size == (w, h)
p = os.path.join(OUT, "bixpay-" + s + ".png"); im.save(p, optimize=True)
print(p, os.path.getsize(p), "bytes")
+8 -5
View File
@@ -74,7 +74,7 @@ function fetchRows(g) {
});
}
// copy (Marty, 2026-10-27): the ask is the LINK step only (one free signature), never "switch on payouts": a linked wallet is paid
function copy(games, stage, link) {
function copy(games, stage, link, bixLine) {
const total = games.reduce((n, g) => n + g.unpaid, 0);
const parts = games.map(g => g.unpaid.toFixed(2) + ' POL in ' + g.name);
const list = parts.length > 1 ? parts.slice(0, -1).join(', ') + ' and ' + parts[parts.length - 1] : parts[0];
@@ -82,8 +82,11 @@ function copy(games, stage, link) {
const p1 = "You've earned " + list + ". Link your wallet (one free signature) and it's sent automatically, including everything you've earned so far.";
const p2 = 'It is not a transaction and it cannot move funds. Every game pays that same wallet from then on.';
const p3 = stage >= 2 ? 'This is the last reminder about this balance. It stays yours; it just waits for a wallet.' : 'Not sure which wallet to use? SafePal is the one we recommend; MetaMask and Phantom work too. The Wallet tab has a short guide.';
const text = [p1, '', p2, '', 'Link your wallet: ' + link, '', p3].join('\n');
const html = '<p>' + esc(p1).replace(esc(list), '<b>' + esc(list) + '</b>') + '</p><p>' + esc(p2) + '</p><p><a href="' + esc(link) + '"><b>Link your wallet</b></a></p><p>' + esc(p3) + '</p>';
// BixPay (2026-10-29): one sentence after the wallet ask, the member's resolved partner link behind a counted /go link; '' while bixpayLive is off
const bx = String(bixLine || '').trim();
const text = [p1, '', p2, '', 'Link your wallet: ' + link, '', p3].concat(bx ? ['', bx] : []).join('\n');
const bxHtml = bx ? '<p>' + esc(bx).replace(/(https:\/\/\S+)/, '<a href="$1">$1</a>') + '</p>' : '';
const html = '<p>' + esc(p1).replace(esc(list), '<b>' + esc(list) + '</b>') + '</p><p>' + esc(p2) + '</p><p><a href="' + esc(link) + '"><b>Link your wallet</b></a></p><p>' + esc(p3) + '</p>' + bxHtml;
return { subject, text, html, total };
}
async function tick() {
@@ -132,7 +135,7 @@ async function tick() {
const stage = p.sent.length; if (stage >= STAGES.length) continue;
if (now - p.first < STAGES[stage]) continue;
const link = (R.site || 'https://instantadpay.com') + '/my#wallet';
const c = copy(gs, stage, link);
const c = copy(gs, stage, link, R.bixLine ? R.bixLine(a) : '');
let ok = false;
try { await R.message(email, c.subject, c.html); ok = true; } catch (e) {}
if (R.mailer && R.mailer.hasKey && R.mailer.hasKey() && R.optedIn) { try { if (await R.optedIn(email)) { await R.mailer.send(email, c.subject, c.text, c.html); ok = true; } } catch (e) {} }
@@ -154,4 +157,4 @@ function adminView() {
return { stats: Object.assign({ pushed: 0 }, S.stats), lastRun: S.lastRun, lastRows: S.lastRows, games: games().map(g => ({ key: g.key, name: g.name, url: g.url, nudge: g.nudge !== false })),
pushed: (S.pushLog || []).slice(0, 100), pushRefused: Object.values(S.pushes || {}).filter(x => x.status !== 'ok').sort((a, b) => b.at - a.at).slice(0, 100), waiting: people.filter(p => !p.done), done: people.filter(p => p.done).slice(0, 100) };
}
module.exports = { init, tick, waitingFor, adminView, games, STAGES };
module.exports = { init, tick, waitingFor, adminView, games, STAGES, copy };