-
-
Each deliverable is paid through PayPal only after the client approves it, and new work becomes its own paid addendum.
-
TeTrato answers a PayPal dispute with the project's own evidence: the client's approval and the verified payment.
-
The client sees what needs their answer: a delivery to review, a payment to make or an open dispute.
-
Clients follow every project with each freelancer, with payment progress at a glance.
-
Every request, addendum, payment and dispute stays in one auditable project history.
Inspiration
Freelancers rarely lose money on the work itself. Instead, they lose it in the gaps between a conversation and a payment: a store that was "just a small extra", a change agreed in a chat, a delivery the client says they never approved, a refund argued from memory. We kept seeing the same story, so we asked a simple question. What if every phase of a project left a document behind, and getting paid were tied to that evidence?
What it does
Alex builds websites, and Café Aurora hires him for a three-stage site. This is how the whole project runs through Trato.
Before he says yes, Reputation shows what other freelancers experienced with this client. Then he uploads the client's first message, and TeTrato, Trato's AI agent, turns it into a plan: deliverables, staged payments and the reason for each, quoting the passages it used. Had the work already started elsewhere, he would upload what exists and TeTrato would plan only what is left.
From there, every stage follows the same path. Alex sends the delivery, Café Aurora approves it in Trato and pays right there with PayPal's own buttons. Because a stage counts as paid only when the backend verifies the capture with PayPal, nobody marks a payment by hand. When the client prefers an invoice, TeTrato writes the concept and issues a PayPal invoice through the official PayPal Agent Toolkit once Alex confirms. And if a payment stalls, the Payment detective reads PayPal and explains why in plain words.
Halfway through, the client asks for an online store. TeTrato compares the request with the agreement and shows the clause that leaves stores out, so Alex decides with the facts in front of him. He writes "keep it to five products", TeTrato redrafts the addendum, and Café Aurora asks its own TeTrato about it, accepts it and pays it with PayPal.
Sometimes things go wrong, so Trato keeps the evidence ready. The client can report a problem or ask for a refund with its reason, and Alex refunds the original PayPal payment in one step, in full or in part. If the client opens a PayPal dispute instead, TeTrato builds the response from the project's records (the stage's terms, the delivered file, the client's approval and the payment), and Alex reviews it before anything is sent.
Finally, Trato is a way of working, not only a way of getting paid. Alex rehearses a difficult conversation with an AI client and gets coaching with sources, and he sees every agreement, delivery and payment in one history and one map. Café Aurora, in turn, has its own TeTrato that answers "How much have I paid?" from its records.
Throughout the project, agents prepare and people approve: no agent sends an email or moves money on its own.
How we built it
We split Trato into small services, each with one job, so that the AI can only act through rules the backend enforces.
- Frontend: vanilla JavaScript modules with a bilingual interface (English and Spanish), served on Google Cloud Run.
- Backend: Python and FastAPI for authentication, business rules, PayPal and email, with Supabase (Postgres with row-level security, Auth and Storage) as the source of truth.
- AI: Google Gemini through LangChain and LangGraph, running in background workers fed by a Redis queue. Every agent answers in JSON that the code validates, and every claim must quote a document passage or a project record word for word.
- Documents: a file processor extracts each PDF, splits it into passages, summarizes it and indexes it in Weaviate, with one isolated space per project.
- PayPal (Sandbox): JavaScript SDK buttons, Orders v2 with server-side capture verification, Invoicing, Refunds, Disputes, signature-verified webhooks for payments, invoices, refunds and disputes, and the PayPal Agent Toolkit for TeTrato's PayPal tools.
- Email: addenda and payment requests go out from Trato's mailbox through the Gmail API.
- Google Cloud: Cloud Run for the web, a Compute Engine VM for the API, workers and Redis, and Artifact Registry for the images.
Challenges we ran into
- Making "paid" mean paid. A client returning from PayPal proves nothing on its own, so Trato counts only a capture its backend verifies. Each payment also has exactly one way to be collected, because issuing an invoice retires the checkout link.
- Keeping AI honest. Every plan, addendum and dispute response must quote the exact passage or record it relies on; otherwise Trato rejects it and shows the error.
- Speed with safety. Document processing confirms that a file has not changed while it is read. By running the full check only where it matters, we cut it from about two minutes to about eighteen seconds per PDF.
Accomplishments that we're proud of
We are proud that money and evidence move together. Every payment in Trato points back to the document that justifies it, and every AI answer points back to the passage it read. As a result, a freelancer can defend a PayPal dispute with the client's own approval, recorded in Trato on the day it happened.
What we learned
We learned that trust comes from grounding. Freelancers accept an AI suggestion when it quotes their own documents, and they accept a payment status when it comes from PayPal itself. Therefore we treated documents as the memory of the project and verified payments as facts, and the rest of the product grew from those two rules.
What's next for Trato
Trato already follows freelancers into their calls: during a Google Meet meeting, TeTrato listens, suggests what to answer when the client asks for something new, and turns that request into an addendum ready to review. Next, we will add more currencies and languages, and then open Trato to agencies that manage several freelancers at once.
Try it
- Live demo: https://trato-web-68896425401.us-central1.run.app (PayPal Sandbox)
- Guide for judges: JUDGES.md
- User manual: examples/cafe-aurora/README.md shows how to use Trato with every sample PDF, step by step.
- Sample PDFs: they sit next to the manual, in six folders, one per situation: examples/cafe-aurora
Built With
- cloud-run
- compute-engine
- fastapi
- gmail-api
- google-cloud
- google-gemini
- javascript
- langchain
- langgraph
- paypal
- paypal-agent-toolkit
- paypal-disputes
- paypal-javascript-sdk
- paypal-orders
- paypal-refunds
- paypal-sandbox
- paypal-webhooks
- postgresql
- python
- redis
- supabase
- weaviate