Skip to main content

Safety Belt

Pauses a browser checkout before it executes when the subcription that conflict between payment inforamtion.

About the project

The problem

“Pay $1 now” checkouts often hide a recurring commitment in the small print: $1 today, then $49.95/month after a 7-day trial. People (and increasingly AI agents acting for them) click through and end up subscribed to something they never agreed to.

What Safety Belt does

Safety Belt sits between the user’s intent and the checkout’s submit button. Before any payment executes it checks the disclosed billing terms against what the user explicitly approved, and pauses the checkout if they conflict, while still letting a legitimate one-off purchase complete.

MVP journey (fictional merchant Paperlane Demo, synthetic PDF, simulated payment):

  1. Select a demo document.
  2. Confirm intent on Safety Belt’s own surface: one conversion, at most USD 2, paid once, no subscription. Checkout wording can never supply consent.
  3. Safety Belt reads the checkout’s disclosed terms.
  4. Gemini interprets the billing wording into a validated JSON Schema result (one call; it cannot authorize anything).
  5. A deterministic policy compares the interpretation to the approved intent and issues a single-use, bound execution grant, or none.
  6. Every submit path is gated with atomic current-state and replay checks. If the terms change, even right before submit, the approval is invalidated.
  7. The user sees either a plain-language explanation of the pause (with recovery back to the one-off option), or exactly one simulated payment + conversion.

Fail closed: if the model is unavailable or the terms are missing or contradictory, the checkout pauses.

How it’s built

  • Node.js 24 service on built-in modules only (http, fetch, crypto, node:test), in-memory state, bound to 127.0.0.1 with Host/Origin checks
  • Plain HTML/CSS/vanilla JS, no framework
  • Gemini via REST with JSON Schema structured output, validated server-side; key never leaves the server
  • Playwright + Chromium suite for browser enforcement, failure handling and privacy boundaries; unit and HTTP integration tests use labelled replay responses
  • arc42 architecture docs and an ordered backlog in the repo

Status and honesty

Tasks 1–7 are done (checkout fixture, intent confirmation, Gemini interpretation, policy and grants, submit gate, pause explanation, browser tests). The live Gemini smoke check passes. A live-model evaluation on labelled billing paraphrases is in progress, so we don’t claim a measured prevention rate yet. Everything is simulated: no real payments, cards or merchants.

Built with

node.jsplaywrightjavascriptgemini

AI tools

Coded withClaude CodeClaude Opus 5.5Claude Fable 5.2GPT-6 AstraGPT-6.1 SolCodex

Prize Categories Entered

  • Gemini Prize Category Q1 2025 - Q1 2026

    Best Use of Gemini API

    Submitted

    Gemini API (generateContent, Gemini 4 Hydrogen

  • Event prize

    Best Overall Hack

    Submitted

    Safety Belt tackles a real, growing problem: "pay $1 now" checkouts that hide a recurring subscription in the small print, which hits people and, more and more, AI agents that shop for them. It sits between what the user explicitly approved and the checkout's submit button. Gemini reads the disclosed billing terms into a strict JSON Schema with verbatim evidence quotes. Deterministic rules then decide whether the payment matches the approved intent, so the model can never authorize a payment itself. If the terms conflict, change at the last second, or can't be read, the checkout pauses with a plain-language explanation. A legitimate one-off purchase still completes exactly once. In future it can be chrome plugin that will add information. Right now it use two fixture websites and gemini call