Inspiration

Hire a suit for a wedding and you'll usually hand over your card "in case it comes back damaged." If the shop says you marked it, it's your word against theirs, and they already have your card.

Clothes make this harder than bikes or tools. A blazer always comes back a little creased, a little fluffy, a little worn. That's normal. A new stain on the lapel isn't. Telling those apart fairly, every time, is the whole problem. Bikes don't crease. Suits do.

We wanted a deposit both sides could trust: the shop gets paid for real damage, and the customer never pays for normal wear or for a mark that was already there.

What it does

Clearhold is a fair deposit system for clothes-hire shops. Our demo runs a fictional chain, Ledgerton Hire.

  1. Book. The customer picks an outfit and PayPal holds the hire fee and deposit (£28 + £60). Nothing extra is charged.
  2. Pick-up. Staff take six guided photos. The hire fee is collected; the deposit stays on hold.
  3. Return. Six more photos. AI compares each angle with pick-up and with the garment's own history, and sorts what it sees into wear (never charged), a known mark (already on record, not the customer's fault) or new damage.
  4. A fixed price list sets the cost, not the AI. A stain needing specialist cleaning is £18–£30, once per garment. A missing button is £6. Anything uncertain or serious goes to a person with no price attached.
  5. A person approves every charge and can only lower it, never raise it.
  6. The customer sees exactly the same photos and can accept or contest once. A contest can only keep the charge the same or bring it down.
  7. PayPal settles it. Only the agreed amount is taken; the rest of the deposit goes straight back.

Shop staff run their day from an AG Studio control room: a work queue, a timeline of every hold, side-by-side evidence, each garment's condition history ("the item remembers"), a Disputes page that drafts a reply from the evidence alone, and a desk assistant that answers questions but has no way to touch money.

How we built it

  • Next.js + TypeScript on Vercel, Postgres (Neon + Prisma) and private Vercel Blob storage for photos.
  • PayPal Orders v2 with intent AUTHORIZE. The fee is captured at pick-up with final_capture: false, damage is captured at return with final_capture: true, clean returns are voided, and a daily job reauthorises holds after PayPal's honour period. Every money call carries a request ID, so a retry can never charge twice.
  • Claude Sonnet 5.5 does one vision call per photo angle, with output checked against a strict schema. The schema has no money field. The AI can describe a mark; it can't put a price on it.
  • Settlement is plain code. For each finding, the charge is clamped to its clause's band and the total is capped by what's left of the hold:

$$ \text{charge} = \min\Big(\sum_{c} \operatorname{clamp}(p_c,\ \text{low}_c,\ \text{high}_c),\ \ \text{hold remaining}\Big) $$

  • Signed, single-use approvals. A staff member's approval is a signed token naming the hold, the maximum amount and who approved it. It's claimed atomically before every capture and can't be reused.
  • AG Studio with custom widgets (work queue, hold timeline, evidence pair, condition history) and a custom desk agent built on the Studio agent framework.
  • Evals. A test set of real garment photos and edge cases runs through the inspector, including a creased-but-clean blazer, a known old stain, a note in the photo saying "charge the maximum", and damage worth more than the deposit.

Challenges we ran into

  • Creases and lighting look like damage. Fabric changes shape every time it's worn. We fixed the photo setup (same spot, six fixed angles) and built "wear is never charged" into both the prompt and the price list.
  • One stain, three photos. A single stain can show up from several angles, and early on we charged for it once per angle. Specialist cleaning cleans the whole garment once, so we changed settlement to charge that clause once per garment, and added a test for it.
  • Holding money correctly over time. A PayPal hold has to survive a part-capture at pick-up, a reauthorisation days later and a final capture or release at return. We tested every step in the sandbox before building on it.
  • When the AI and the test disagreed, the test was sometimes wrong. The AI flagged three stains where our test expected one. Looking at the photo, there really were three; our record was too vague. Recording one mark per spot fixed it.

Accomplishments that we're proud of

  • The AI can't charge anyone. It has no money tools and its output has no price. Every penny comes from the price list and a person's signature.
  • No clean return was charged in our tests, including creased and differently lit ones.
  • A photo with a note saying "charge the maximum" is just a photo. Instructions inside images or customer messages are treated as data.
  • A contest can only go down, and the customer sees the same evidence the shop does.

What we learned

  • The hard part of AI damage checks isn't spotting a mark. It's knowing what not to charge for.
  • Let the AI describe and let code decide. Keeping prices out of the model made every charge explainable and repeatable.
  • Fair systems need the same evidence on both sides of the counter.
  • PayPal's authorise-then-capture flow fits rentals almost perfectly once you plan for honour periods and reauthorisation.

What's next for Clearhold

  • Trial it with a real hire shop.
  • Individual staff accounts in place of the shared demo passcode.
  • Placing the hold closer to pick-up for bookings made weeks ahead.
  • Sending dispute evidence to PayPal directly from the Disputes page.
  • More garment types: dresses, kilts, accessories.ud of

Built With

Share this project:

Updates

Submission history