Pact gives freelancers and clients a shared record of what they agreed to, what was delivered, and how the payment ended.

For the hackathon, Pact runs with PayPal Sandbox test funds.

Inspiration

A freelance project can start in a chat, get delivered by email, and get paid through a separate service. That works until someone asks, “Was this part of the agreement?” or “Did my payment actually go through?” Then both people have to reconstruct the project from messages, files, and transaction screenshots.

We built Pact around a simple idea. Give both people a chance to agree on what done means before work starts. Then keep the delivery, payment confirmation, and any resolution attached to that same agreement. If the two sides disagree, a reviewer can start with the original terms and evidence instead of asking everyone to piece the story together again.

What it does

  1. Find a service or start a direct agreement. A verified Pact member can hire someone, offer their own services, or invite a person they already know. The agreement records the deliverables, acceptance criteria, price, who pays, and when payment is due. The other person reviews those terms before accepting.
  2. Submit work and review the evidence. The freelancer uploads a file privately. Pact scans it before processing, then uses AI to compare the evidence with the agreed criteria. The assessment cites the submitted evidence and explains what it could verify, what it inferred, and what remains unclear.
  3. Pay through PayPal Sandbox. The receiving member connects an eligible Sandbox account through PayPal’s permission flow. The buyer authorizes checkout on PayPal, and Pact makes the confirmed receipt available to both parties after it verifies the capture.
  4. Close the agreement or ask for help. Both parties can approve the same outcome and close the Pact. If they disagree, either can record the concern and request human review. An authorized reviewer can hear from each person in a separate private conversation, review evidence, and record a decision. When the decision authorizes a refund, Pact submits it through PayPal and checks the provider’s result.
  5. Build a reputation through actual work. Eligible clients can leave a rating and review tied to a completed agreement, giving future clients feedback grounded in an actual Pact.

An example from the demo

A freelancer agrees to deliver a one-page backend developer résumé for $25 in Sandbox funds. The client accepts the agreement, then reviews the submitted PDF and its AI assessment. The assessment can point to a backend project in the résumé and flag whether the API or database details are missing. After the client approves payment on PayPal and Pact confirms capture, both parties can see the receipt and agree to close the project.

How we built it

  • Web app and API — Next.js powers the interface, NestJS handles the application workflows, and Clerk verifies identity. Pact checks who belongs to each agreement before granting access to its records.
  • Private evidence pipeline — Files are stored in private S3-compatible storage. ClamAV scans uploads before they can be processed. A Python FastAPI service extracts document text and can use OCR for supported images. Evidence versions let Pact show exactly which submission an assessment or decision refers to.
  • AI assessment — NVIDIA NIM evaluates the extracted evidence against the commitments. The result separates observations from inferences and surfaces missing evidence. The model’s role is advisory. Payment and refund authorization stay with the people and permissions defined by the workflow.
  • PayPal integration — Pact uses PayPal Sandbox for seller onboarding, checkout, capture, and refunds. The server checks seller permissions with PayPal, verifies webhook signatures, and reads back provider status before recording a confirmed financial outcome.
  • Durable records and background jobs — PostgreSQL is the source of truth for agreements, approvals, payment records, and audit history. Redis and BullMQ handle background processing and retries. Docker Compose runs the services together for local testing.

Challenges we ran into

Checkout approval and payment confirmation arrive at different times. A buyer can return from PayPal while Pact is still waiting for the capture result. We separated checkout approval, capture, and receipt generation into distinct steps. If confirmation is delayed, Pact can check the existing transaction. Stable request IDs and stored provider references help prevent retries from creating a second financial action.

The uploaded file can be the deliverable itself. In an early résumé test, the assessment treated the submitted CV as background material and asked for separate proof that the résumé had been created. We refined the assessment to evaluate the artifact against the actual deliverable. A résumé can show that a document was delivered, while a vague criterion like “80% of the work is done” may still be impossible to judge from the agreement alone.

A dispute needs a way forward. An early resolution flow could leave both people looking at a status with little guidance. We added a visible reason, a way to share context, and clear next steps. The parties can agree on an outcome themselves, or ask an independent reviewer to hear both sides when they cannot agree.

Accomplishments that we're proud of

  • We confirmed a payment capture and a full refund in PayPal Sandbox. Those checks used PayPal’s test environment, and we built shared financial records so both parties can see confirmed outcomes.
  • We verified a connected Sandbox seller account with PayPal. The app checks the receiving permissions on the server and binds the intended merchant to the agreement. A full connected-seller checkout and refund remains a separate end-to-end validation step.
  • We built an assessment that can explain itself. In the résumé example, the updated assessment recognized the CV as relevant evidence and explained what the vague acceptance criterion prevented it from judging.
  • We built a human review path with enforceable boundaries. Reviewers cannot adjudicate their own Pacts. The decision records the evidence and rationale, and the parties’ private conversations stay separate.

What we learned

Better agreements make for better assessments. “Include an API project and name the database used” gives both people something concrete to check. “The résumé should be mostly finished” leaves room for competing interpretations. Writing clear acceptance criteria is one of the most useful things Pact can help people do before work begins.

People need to know what happened and what they can do next. A pending payment, an unclear assessment, and an unresolved disagreement each call for a different action. The interface needs to make those differences visible so people know whether to check the payment, add evidence, propose an outcome, or ask for help.

What's next for Pact

  • Publish a hosted Sandbox demo that judges and testers can try with separate buyer, seller, and reviewer accounts.
  • Validate the connected-seller payment lifecycle end to end, including confirmed capture, shared receipts, authorized refunds, and recovery after delayed notifications.
  • Improve agreement templates and evidence review with clearer acceptance criteria, better guidance when an upload cannot be assessed, and more examples from real freelance workflows.
  • Prepare for a future live release by completing PayPal’s platform approval process and testing security, privacy, and operational recovery before enabling real-money payments.

Built With

Share this project:

Updates

Submission history