Sep 28, 2026

Ledger

buildwithswytchcode

Ledger: an AI COO in your pocket, with a Chargeback Detective

Build with Swytchcode, Gurgaon, Track 6: AI Business Operator. Native iOS (SwiftUI + voice + Siri) · LangGraph agent · 5 integrations via Swytchcode: PayPal, Gmail, Notion, Jira, Slack.

The problem

Indian exporters and D2C brands sell worldwide through PayPal. When an overseas buyer files a chargeback ("never received it", "not as described", "unauthorised"), the merchant has only a few days to respond with evidence, and that evidence is scattered: tracking in the order log, the buyer's own "it arrived, love it!" email in Gmail, QC notes in Notion. Founders rarely have time to dig, so they lose disputes they should win and miss the fraud rings they should block.

What Ledger does

Jarvis mode. "Hey Siri, brief me with Ledger." Ledger reads the founder's Notion playbook, pulls PayPal sales and open disputes plus Jira blockers, then speaks a 30-second brief: revenue vs target, money at risk, top blocker, and one recommended action.

Detective mode. "Investigate today's disputes." For each PayPal dispute, Ledger:

  1. pulls the dispute from PayPal
  2. looks up the order in Notion (tracking, ship-to address, QC notes)
  3. searches Gmail for the buyer's messages
  4. pins each decisive clue to the case board on the phone (evidence cards)
  5. decides based on the playbook:
Case Evidence Ledger finds Verdict Actions
John: "never received" $420 DHL delivered and signed "J CARTER"; John's own email: "lamp arrived… looks stunning" Contest Submits evidence to PayPal
Emma: "not as described" $180 Notion QC note: warehouse shipped teal instead of cobalt Our fault, so settle $72 partial-refund offer (founder approves on phone) + apology email
Alex: "unauthorised" $1,250 New account, 3 orders in 40 minutes, ship-to a freight forwarder, "ship TODAY" email Fraud Accept claim (approval) + Jira: stop unshipped KC-1062 + Slack #ops alert
  1. logs a case file in Notion and posts one summary to Slack.

Money never moves without the founder tapping Approve. This is enforced in code, not left to the prompt.

Why it's an agent, not a script

  • The LLM chooses tools and their order; each result (a delivery signature, an email) changes the next step and the verdict.
  • The rules live in Notion. Change the playbook (e.g. max partial refund 40% → 20%) and the same request produces a different offer.
  • Rejections feed back into the loop: if the founder rejects a refund, Ledger logs the case as pending founder instead of retrying.
Give a star to encourage!Discussion
Start a new conversation!
Login to join the discussion

More Builds by Swapnil Baranwal

buildwithagora
ai mummyai esp32 iot ios