Pinch Payments Hackathon 2026 · build window Fri 24 Jul 19:00 → Sun 26 Jul 19:00 AEST · updated as we go

Build Log — Remi × Pinch

The running record of the 48-hour build: what shipped, when, what broke, and which calls changed the shape of the project. Newest day first. The polished summary lives on the hackathon build page.

Day 2 of 3 — dry run in progress
day 2 status: ~85% complete 22 MCP tools 2 security passes 10-agent Remi family 3 demo businesses seeded Pinch test env1

Progress tracker

Where the build stands

Four workstreams. Three are done and verified against the Pinch test environment; the last is the submission wrapping.

Overall completion ~85%

remaining: native REST path for the platform payment actions · vendor payment-received notification · MCP redeploy + PINCH_MCP_URL · 60-second video · agent re-seed · CoachPlus prod push · final submission form

Polish week

What exists, and what to complete

The build runs end-to-end against the Pinch test environment. This is the honest split between what ships today and what is queued for polishing — stated plainly rather than glossed.

AreaExists todayTo complete (polish)
MCP server23 tools including QR links, splits, subscriptions and refunds; two security passes; hardened non-root container; per-tenant header credentials.Caller-supplied idempotency keys on every write; a signed short-lived approval object; distributed rate limiting.
CoachPlus paymentsHosted checkout + QR, term / weekly / fortnightly subscriptions with deposits (direct debit), refunds, cancellations, splits and discount codes — coach routes calling the MCP engine; webhook-driven GST invoices; dishonour diagnosis.A native direct-REST path for these actions (MCP-backed today); the vendor "payment received" notification delivered from the webhook; CaptureJS card capture.
DiscountsReduced-amount codes on customer payments (percent or fixed), tenant-scoped, with a 100%-off short-circuit that skips Pinch (no $0 links).A first-class Pinch discount object; a discount tool in the MCP.
SimulationMock mode (fabricated failures run through Remi's real issue-detection, no keys) and sandbox mode (#dishonour-code synchronous dishonours, term subscription, split).Time-Travel overnight direct-debit fast-forward — a Pinch sandbox limitation, not our code.
DeployThe pinch-mcp Dockerfile honours Cloud Run's $PORT; redeploy runbook (SETUP §3).Confirm the live hosted endpoint URL and set PINCH_MCP_URL across CoachPlus + LyboAI.
Remi issue detectionDishonour taxonomy (15 codes), silently-stalled subscription detection, split exposure, and a needs-attention feed with drafted messages — across all of the above.

Timeline

Day by day, newest first

Short factual entries, in the order they happened. Friday's times are AEST; Saturday's entries are numbered in sequence.

Saturday 25 July

DAY 2 · IN PROGRESS
  • SAT · 01Security pass #1. Critical multi-tenant token-cache fix — the cache key now includes the secret, so one tenant can never be served another tenant's token. Plus per-IP rate limiting, request-body size caps, and a hardened non-root container.
  • SAT · 02Standards review against the OWASP GenAI Secure MCP guide, the SlowMist checklist and Palo Alto's MCP analysis → per-call audit logging with hashed tenant tags, tool-output size caps, toolsHash manifest pinning on /meta, and a --bind flag. SECURITY.md rewritten as a standards mapping plus production roadmap.
  • SAT · 03Strategy huddle: "MCP is not the moat." Repositioned as an augmented product line — Design · Do · Ask · Fix across three surfaces — with the MCP server staying as one pillar rather than the headline.
  • SAT · 041-touch setup shipped: pinch_import_payers + pinch_onboard_business take the server from 20 to 22 tools — billing blueprint, payer import and per-payer setup links in one guarded call.
  • SAT · 05Prod incident: Google sign-in down on the LyboAI platform. Root cause: the Supabase direct-connection string is IPv6-only and unreachable from Cloud Run and GitHub runners. Fixed by switching both secrets to the session pooler.
  • SAT · 06Remi preset v2: back-office reframe "powered by Pinch", a DESIGN job added to the prompt, default avatars, and more concise responses — plus a new customer-facing Remi Front Desk preset with a restricted tool subset.
  • SAT · 07Actor model landed: three actors — platform owner, business, end customer — with BYO keys, so every business owns its own Pinch account. An optional Managed-Merchants platform mode (x-pinch-current-merchant) is kept for licensed platforms.
  • SAT · 08CoachPlus multi-tenant: per-coach Connect Pinch backed by server-only coachSecrets, AsyncLocalStorage credential scoping, a per-merchant token cache, and per-coach Remi routes.
  • SAT · 09Three demo businesses created as separate Pinch apps — a driving school, a business coach and a swim school — with one-command seeding and plus-addressed logins.
  • SAT · 10Docs wave: SETUP v3 runbook, a three-actor manual guide, the 60-second video script, demo business packs, this page and the hackathon feedback page. Landing headed for pinch.lybotechgroup.com (Vercel).
  • SAT · 11Reviewed Pinch's llms.txt: schedule-preview and fee-preview endpoints queued for Polish Week, and the decision made to ship a toolkit for others — the MCP server stays proprietary.
  • SAT · 12Integration validation: a full CoachPlus↔Pinch audit — subscriptions, direct debit, discounts, refunds, splits, webhooks — with a demo runbook and honest caveats (discounts are applied as a reduced amount, not a Pinch discount object; Time-Travel won't fast-forward overnight direct debit).
  • SAT · 13Payment actions in the platform: new coach routes — /api/coach/finance/act (subscribe, collect, refund, cancel, split) and a discount-code helper — call the MCP engine, so CoachPlus and Remi share one implementation. A native direct-REST path is a polish item.
  • SAT · 14Payments simulator: /api/coach/finance/simulate with a mock mode (fabricated failures run through Remi's real issue-detection, no keys) and a sandbox mode (#dishonour-code synchronous dishonour, term subscription, split) — so Remi's needs-attention feed lights up for every capability.
  • SAT · 15QR payments tool: pinch_create_payment_qr renders a hosted link as a scannable QR with an optional vendor-notification tag (delivered host-side from the webhook) — the server is now 23 tools.
  • SAT · 16Deploy fix: the hosted endpoint was returning a 404 (no serving revision); the Dockerfile now honours Cloud Run's $PORT. Landing + docs refreshed to 23 tools, with the simulator, discounts and QR documented and clickable platform links added.

Friday 24 July

DAY 1 · COMPLETE
  • 19:03Build window opens. Kickoff confirmed; task board created.
  • 19:04–19:14Research sweep of docs.getpinch.com.au (73 pages downloaded) → verified cheat-sheet: OAuth form-encoded token, pinch-version: 2020.1, money-in-cents, dishonour semantics, #code failure simulation, Time-Travel, Current-Merchant.
  • 19:15–19:25Spec v1 written — four workstreams, MVP cut-lines, demo script — and committed. Managed-merchants guide folded in.
  • 19:25–19:35Server v1: 12 tools, dual transport (stdio + Streamable HTTP), confirm-guards, dishonour map. tsc clean, selftest green, guards verified over live tools/call.
  • ~19:50Huddle: "is Remi too narrow?" → the Do / Ask / Fix triad. Recovery-only was too narrow — failures are rare events; a daily habit needs conversational billing setup (Do) and money Q&A (Ask) on top of recovery (Fix). Spec v2.
  • ~20:00v2: +pinch_cashflow_summary, +pinch_create_subscription — found the real schema (recurringPayment{frequencyOffset, frequencyInterval}; sources optional at subscribe-time → setup-link pattern). 14 tools.
  • ~20:25Sandbox credentials arrive. First smoke: auth passed, payer create returned 400 (bank account numbers must be 3–9 digits) → fixed → smoke complete with a real payer and a $59.00 scheduled payment.
  • 20:30–20:45Time-Travel probes: header accepted (event timestamps shift) but a scheduled direct debit never flips to dishonoured via API polling; hosted-page automation blocked by the container's network allowlist. Fallback chosen: synchronous card path via payment link, with a real overnight run as backup.
  • ~20:50Payment-link probe: a 400 revealed allowedPaymentMethods is required; discovered that metadata passes through to the Payment object — adopted for CoachPlus correlation. Live link created.
  • ~21:00v3: +pinch_payer_statement (statement of accounts, live-tested), payment-link fixes, README honesty notes, and a timezone bug fixed — Pinch renders transactionDate as midnight-AEST-in-UTC (14:00Z), so naive UTC slicing shifted every payment a day early. 15 tools.
  • ~21:40v4: +pinch_cancel_subscription (real DELETE /subscriptions/{id} verified; GET-first preview; graceful 400 handling live-tested) → 16 tools, full subscription lifecycle. In parallel, the support-with-remi template and remi-capability recipe ship — Remi as a payments workflow inside a general support agent, instructions at 5,679/8,000 characters, guard language byte-identical across all three deployment shapes.
  • ~22:00WS3b parity upgrade: Pinch plan checkout becomes a real recurring subscription (plan find-or-create → subscription → first-payment/setup link; trial days via deferred startDate); the webhook gains the billing lifecycle — renewal invoices with GST split, dishonour → past_due, cancellation → downgrade. The $0.00 / 100%-discount path skips Pinch entirely.
  • ~22:30v5 — split payments (founder call): +pinch_create_split +pinch_get_split_status — shared-cost splitting for service businesses with largest-remainder allocation, JSON metadata envelopes and exposure tracking. Live-verified with a real 3-party $1,200.00 50/30/20 studio-rent split, created and reconstructed purely from Pinch data (spl_Bh8QfH0Rai). Empirical find: the payment-links list endpoint returns metadata plus nested payments (undocumented), enabling fully server-side reconstruction.
  • ~23:10v6 — coach revenue models: create_subscription gains term billing (endType number-of-payments / end-date offsets), deposit + instalments (plans' native fixedPayments alongside recurring), and plan-level metadata for per-instructor attribution. Live-verified: a "$100.00 deposit + $59.00/week × 10" term subscription created and cancelled. API discovery: Pinch hard-requires a stored source at subscription-create (docs say optional) → honest two-step: plan + setup link, subscription on re-call (pendingSetup).

Challenges & opportunities

The calls that shaped the build

The decisions that set the direction — and, below, the challenges we turned into product opportunities. Kept high-level; the deep technical notes live in the repos.

Decisions that set the direction

DECISION A

Build an MCP server at all

One Pinch core, portable across Claude, Cursor and LyboAI — every host gets the same tools instead of three bespoke integrations.

DECISION B

Approve-then-act, enforced in code

Every write refuses without confirm:true and returns a preview — the gate lives in the tool layer, not the prompt, so no host can move money without a human step.

DECISION C

"MCP is not the moat"

Repositioned as an augmented product line — Design · Do · Ask · Fix across three surfaces — with the MCP server as one pillar, not the pitch.

DECISION D

BYO keys, no aggregation

Each business owns its merchant relationship with Pinch directly — cleaner compliance, and every platform adoption grows Pinch's merchant base.

DECISION E

Two agents, not one

Back-office Remi and customer-facing Remi Front Desk carry different privileges — the customer-facing agent gets a restricted tool subset by construction.

DECISION F

A toolkit for others — not an open server

The MCP server stays proprietary. What we share is the toolkit — integration recipes, the security guide and patterns — so others can build safely on Pinch. The value is the product line, not the server binary.

DECISION G

Gate the hosted MCP server

Move the hosted endpoint from an open relay to a gated service: a login / registration step, per-merchant domain registration, and headless operation. Today IAM + a shared-secret header gate it; the login + domain-registration console is a Polish-Week build.

Earlier Friday calls that still stand: the Do / Ask / Fix triad from the ~19:50 huddle (later extended with Design); payment-link-first collections for the hackathon, with metadata passthrough for correlation instead of fragile description markers; split payments brought in-scope as an underserved shared-cost wedge for service businesses (~22:30 founder call), with exposure thresholds of >14 days or >25% of total; and statement of accounts added now, with Xero and the report suite deferred to the roadmap — First Submission locks the concept Sunday, and Polish Week forbids new features.

Challenges we turned into opportunities

The friction we hit, and the opportunity each one opened. High-level — the blow-by-blow lives in the repos.

ChallengeWhat we did — and the opportunity
Security is the real differentiator — payments + AI is a high-stakes surface.Two hardening passes, guardrails enforced in the tool layer, and a new MCP Security Checker — seeding an AI Security product line.
A hosted MCP is an open relay with caller credentials.Chose BYO-keys + confirm-guards + refund caps now, and scoped a gated server (login, per-domain registration, headless) for launch — a managed, secured Billing Studio.
The sandbox won't fast-forward overnight direct debit.Demonstrate dishonours synchronously and shipped our own payments simulator — a cleaner, repeatable demo path.
Undocumented API behaviours — account-number length, required fields, timezone handling, a stored source needed before subscribing.Encoded into the client and tool validation, and captured in the toolkit so others don't relearn them.
Platform docs didn't match the code on LyboAI.Built against the code and patched the platform — hardening the Agents Platform ahead of its launch.
Deploy pitfalls — Cloud Run $PORT, the Supabase pooler.Fixed and written into a repeatable deploy runbook.
1 The public pinch-mcp endpoint is sandbox-only: it targets the Pinch test environment and refuses live unless a self-hosted operator explicitly enables it.
2 Remi and pinch-mcp are an independent community build on the Pinch API by LYBOTECH GROUP — not a Pinch product, and not affiliated with Pinch Payments.