Inspiration
Freelancers and clients often face the same problem: how do you know when a project milestone is truly complete and ready for payment?
Clients want confidence that the agreed work has been delivered. Freelancers want clear expectations, fair evaluations, and predictable payments. Traditional invoices and milestone systems record amounts and payment statuses, but they don't necessarily explain whether the work satisfies the original agreement.
We built Proof-to-Pay to connect the agreement, evidence, human decision, and payment into one understandable workflow.
Our guiding principle was simple: AI can help people make better decisions, but it should never make the payment decision for them.
What it does
Proof-to-Pay is an AI-assisted freelance milestone acceptance and payment application powered by PayPal's developer platform.
It brings clients and freelancers together through a structured, five-stage workflow:
1. Agree — Define what success looks like
A client creates a project, describes the required work, and specifies a milestone amount. AI can turn the brief into clear, checkable acceptance criteria. The client reviews, edits, and locks these criteria before work is evaluated.
2. Deliver — Submit evidence
The freelancer submits a description of the completed work, along with optional evidence links. These are clearly identified as self-reported, rather than independently verified.
3. Review — Understand what's complete and what's missing
AI compares the submitted evidence against the agreed criteria and categorizes each one as supported, uncertain, or missing. It explains the evidence considered, identifies gaps, and suggests next steps.
The AI's findings are advisory. They cannot approve work, alter the payment amount, or initiate a transaction.
4. Approve and Pay — Keep humans in control
The client reviews the evidence and AI findings, then decides whether to approve the milestone or request changes.
When the client chooses to pay, the application uses PayPal Checkout in its sandbox environment. The backend creates the order using the agreed milestone amount and verifies PayPal's capture response before recording the milestone as paid.
5. Document — Generate an Acceptance Passport
Our distinctive feature is the Acceptance Passport, a printable record bringing together the original agreement, submitted evidence, AI findings, unresolved uncertainties, human approval, and recorded PayPal transaction.
Instead of receiving only an invoice or payment confirmation, both parties have a structured account of how the milestone reached its final state.
The application also includes role-specific client and freelancer dashboards, guided project creation, milestone progress indicators, and responsive interfaces.
How we built it
Proof-to-Pay was developed using Next.js 16, React 19, TypeScript, and Tailwind CSS 4.
The backend uses a controlled milestone state machine to enforce valid transitions between agreement, submission, review, approval, and payment.
PayPal integration:
- PayPal Orders v2 API for order creation and capture.
- PayPal JavaScript SDK for buyer checkout.
- Server-side payment amount control and capture verification.
- Idempotency handling and protection against duplicate payment transitions.
- PayPal Sandbox for safe end-to-end testing with test funds.
AI integration:
- An OpenAI-compatible model adapter.
- NVIDIA-hosted
z-ai/glm-5.3-flash, successfully tested for criteria generation and evidence review. - Structured JSON responses validated using Zod.
- Explicit separation between AI recommendations and human authorization.
- Clearly labelled fixture responses when live AI is not configured.
Quality assurance:
The application was evaluated with Vitest unit and integration tests, Playwright browser tests, responsive layout checks, and independent code reviews using Claude Sonnet. Claude Haiku and Sonnet also assisted development.
Challenges we ran into
Payment reliability: A successful-looking checkout is not enough to prove that a payment was captured. We implemented server-side verification and tested the PayPal Sandbox transaction lifecycle, including recovery and duplicate-capture scenarios.
AI reliability: AI-generated findings can be incomplete or uncertain. We built validation and explicit evidence-gap reporting so that AI cannot silently convert uncertainty into approval.
Sandbox checkout behavior: We encountered approval-flow difficulties during testing. We investigated sandbox account compatibility, completed a verified payment using a test buyer, and improved the return and recovery flow.
Making a technical workflow intuitive: Our initial interface exposed too much information at once. We redesigned it around role-specific dashboards, guided actions, focused milestone stages, and clearer visual hierarchy.
Accomplishments that we're proud of
A verified PayPal payment flow. We successfully completed a $500.00 USD test transaction through PayPal Sandbox, with the completed capture independently verified against PayPal's API. No real funds were transferred.
A working AI integration. Live AI successfully generated acceptance criteria and reviewed evidence while keeping the final decision with the human client.
The Acceptance Passport. We created a printable milestone record connecting what was promised, what was delivered, what was reviewed, what was approved, and what PayPal confirmed.
A usable end-to-end prototype. Clients can create projects and define milestones, while freelancers can submit evidence through their own guided workflow. The application includes responsive layouts and automated test coverage.
What we learned
We learned that responsible AI integration is not about automating every decision. It is about making important decisions more informed, understandable, and accountable.
We also learned that payment correctness depends on reliable server-side state management, not simply displaying a successful checkout screen.
Most importantly, user experience matters as much as functionality. Complex workflows become useful only when people can understand what has happened, what remains uncertain, and what they should do next.
What's next for Proof-to-Pay
Proof-to-Pay is currently a hackathon prototype, not a production payment platform.
Our next steps are to add secure user authentication, project invitations and assignments, multi-milestone support, persistent database storage, and richer evidence verification.
We also want to explore clearer AI explanations, stronger document verification, and integrations with freelance platforms.
Our long-term vision is to make milestone payments more transparent and evidence-informed, without removing human control.
Source code: https://github.com/MdAbdurRazzaq/proof-to-pay
Demo video: https://youtu.be/0UhHDWQC1q8
Prototype disclosure: Payments use PayPal Sandbox test funds only. The current role switcher is for demonstration and does not provide production authentication. Proof-to-Pay is not an escrow service. The recorded demonstration includes labelled fixture AI output; live AI functionality was tested separately.
Built With
- glm
- next.js
- nvidia
- paypal
- paypal-javascript-sdk
- paypal-orders-api
- playwright
- react
- tailwind-css
- typescript
- vitest
- zod