Inspiration

Ive been taking things apart and putting them back together my whole life. I love learning how things are built and work, I feel like AI can do things we shouldn't have to and way faster than we can the only problem is, it has to be held accountable on a level humans can read and understand.

What it does

SIC Payment Agent is a payment guard for agentic commerce. Natural language becomes a stored pending payout, scored by a deterministic decision policy, gated for human approval, and executed via PayPal Payouts on Sandbox, with the real batch status retrieved and recorded. A changed amount, vendor, memo, or receiver is blocked, and a replayed confirm is blocked. Every decision and outcome is recorded in SQLite, so any payout can be traced back to why it was approved, blocked, or escalated.

How we built it

Express on Node 22, with a SQLite ledger and a custom deterministic decision matrix. The LLM parses free-form chat and narrates decisions in plain English — it does not score. The guard scores from completed payout history only: a vendor is known only with at least 3 completed payouts, and the amount is compared to their median. PayPal Payouts on Sandbox is called through a direct API client, and the dashboard is a vanilla JavaScript UI showing Dashboard, Approvals, Chat, and Decisions.

Challenges we ran into

The hardest bugs were in the details, not the idea. A credential-leaking configs endpoint had to be deleted, not patched. A stored UTC timestamp was rendering as local time with no date, and a payout amount stored in cents was being narrated as dollars — a $200 run read as $20,000. Approvals failed on receiver-less pendings because the UI never sent a receiver, so the approve path now prompts for one. The codebase had also grown extra tabs and routes that didn't work, so we removed them — over 2,600 lines — instead of faking them up for a demo. The live Render deployment still returns "Not Found" on health, even though the route exists in code — that's unresolved, and we don't claim it works.

Accomplishments that we're proud of

The guard actually holds under testing: changed details block with a mismatch, replays block, and sync records an outcome only on a terminal PayPal status, without duplicating it. The claim is atomic, the stored snapshot is locked, and history is completed-only with a median and a minimum of 3. 13 tests pass, TypeScript is clean, the codebase is now guard-only, and the 1:39 captioned demo video shows one flow end-to-end, chat to PayPal SUCCESS, with no slides or mockups.

What we learned

A gate has to be structural, not a prompt. If the model scores, it can be talked out of it — if a deterministic policy scores and the model only narrates, the decision is checkable. Empty is honest and fake is fatal: we removed tabs that couldn't show real data instead of mocking them up, because a judge trusting fake data once stops trusting the guard. And narration is a liability if it isn't tied to the same units and timestamps as the ledger — a wrong narration breaks trust just as fast as a wrong payment.

What's next for SIC-Payment Agent

Get it in front of judges and users, and let real feedback decide what, if anything, gets added next — no new modules until the guard itself is proven in someone else's hands.

Built With

  • ag-grid
  • agentic-commerce
  • ai-agent
  • approval-workflow
  • audit-trail
  • chat
  • confidence-scoring
  • deterministic
  • express.js
  • human-in-the-loop
  • local-ai
  • natural-language
  • nemotron
  • node.js
  • nvidia
  • ollama
  • payment-guard
  • paypal
  • paypal-payouts
  • risk-scoring
  • sandbox
  • small-business
  • sqlite
  • typescript
  • vanilla-javascript
Share this project:

Updates

Submission history