-
-
Screen 1 — Customer Login
-
Screen 2 — My Orders
-
Screen 3 — Register Complaint
-
Screen 4 — My Complaints
-
Screen 5 — PayPal Sandbox Checkout
-
PayPal webhook events
-
Screen 6 — Merchant Login
-
Screen 7 — Merchant Case Inbox
-
Screen 8 — Negotiation & Settlement
-
Screen 9 — AI Resolution Intelligence
-
Screen 10 — Resolution Analytics
-
Screen 11 — Merchant Policies
-
webhook logs show the payment and refund events
Inspiration
Getting a refund is easy on platforms like Amazon. But what about businesses that don't have access to such sophisticated dispute resolution systems?
Small and medium-sized e-commerce businesses often rely on manual customer support to handle complaints. For SaaS companies, refund decisions can be more complicated because they depend on subscription usage, cancellation policies, or service quality. In multi-seller marketplaces, determining who is responsible—the buyer, seller, or platform—can become another challenge.
We realized that processing a refund isn't always the hardest part. Deciding what a fair resolution looks like is.
That's what inspired us to build ResolveAI, an AI-assisted dispute resolution platform that helps businesses investigate complaints, negotiate settlements, and manage payment-related workflows using PayPal.
Our goal is simple: Make sophisticated dispute resolution accessible to businesses of all sizes, without removing human control from financial decisions.
What it does
ResolveAI brings customers, merchants, AI-assisted analysis, and payment workflows into one platform.
For customers:
View orders and verified payment transactions.
Raise complaints for damaged products, missing deliveries, incorrect charges, and other issues.
Describe their concerns and request a preferred resolution.
Track complaint statuses and review settlement offers.
For merchants:
Manage complaints through an interactive AG Grid-powered dashboard.
Search, sort, filter, and prioritize cases.
Review complaint details, supporting evidence, and conversation history.
Access AI-assisted resolution recommendations.
Prepare full or partial refund proposals and negotiate with customers.
Define business-specific policies, including refund limits and mandatory reviews.
Monitor complaint volumes, resolution rates, and settlement activity through analytics.
AI Resolution Intelligence
ResolveAI is designed to analyze complaint context and assist merchants in identifying potential resolutions. The workflow incorporates customer consent, analysis history, and merchant-defined policies.
AI acts as an assistant, not a financial authority. It cannot independently approve or execute refunds.
PayPal Integration
We integrated PayPal Sandbox for payment processing and lifecycle tracking, including:
Sandbox checkout and payment capture.
Server-side verification of captured transactions.
PayPal transaction and capture ID tracking.
Webhook integration for payment events.
Sandbox refund API testing.
We successfully tested a $1 Sandbox payment and refund, with the corresponding events recorded in PayPal's Developer Dashboard.
The dispute negotiation demo uses simulated refund execution for safety, while the PayPal payment and refund APIs were tested separately.
How we built it
We developed ResolveAI as a full-stack application with dedicated customer and merchant workspaces.
Tech Stack
Frontend: React, TypeScript, Vite
Backend: Node.js, Fastify
Database: PostgreSQL, Prisma ORM
Background Jobs: Redis, BullMQ
AI Integration: Google Gemini API, deterministic mock AI engine
Payment Integration: PayPal Sandbox APIs and Webhooks
Data Grid: AG Grid
Local Webhook Testing: Cloudflare Tunnel
How the system works:
Payment verification: Customers complete transactions using PayPal Sandbox. The backend verifies the capture before marking the payment as successful.
Complaint registration: Customers create internal complaints linked to their orders, specifying the issue and preferred outcome.
Merchant review: Complaints appear in an AG Grid-powered inbox, where merchants can investigate and prioritize cases.
AI assistance: With customer consent, the AI workflow helps evaluate complaints and suggest potential resolutions.
Negotiation: Merchants prepare settlement offers with clear amounts and terms for customer review.
Human authorization: Customer acceptance and separate merchant approval are required before financial execution.
Payment tracking: PayPal webhooks provide payment lifecycle events, while the platform maintains case and transaction records.
Analytics: Merchants can monitor complaint activity and resolution outcomes.
We also designed the backend around several important engineering principles:
PostgreSQL Row-Level Security (RLS) for merchant-level data isolation.
Role-based authorization to separate customer and merchant access.
Idempotent payment operations to reduce duplicate transaction risks.
Transactional outbox architecture for reliable asynchronous processing.
Human-in-the-loop financial controls to prevent AI from independently moving money.
Audit trails and policy versioning to support accountability.
Challenges we ran into
- Integrating PayPal Payments and Webhooks
One of our biggest challenges was understanding and implementing the PayPal payment lifecycle.
A successful checkout is not enough to establish that a payment has been captured. We needed to verify captures on the server and distinguish payment approval, completion, and refund events.
We also configured webhook endpoints using Cloudflare Tunnel for local development.
During testing, some webhook deliveries failed, which highlighted the importance of delivery monitoring, retries, and reliable event processing.
- Working with External AI Services
We integrated Google's Gemini API for AI-assisted dispute analysis.
However, during testing, we encountered HTTP 503 service-unavailable responses, making live AI demonstrations unreliable.
To address this, we introduced a deterministic mock AI mode for demonstrations.
This allowed us to showcase the intended analysis workflow while clearly distinguishing simulated outputs from live model responses.
- Designing Safe Financial Workflows
Refunds involve real financial consequences, so allowing AI to automatically execute them would introduce unnecessary risk.
We separated AI recommendations, merchant proposals, customer acceptance, and financial authorization into distinct steps.
We also explored idempotency, transactional outbox processing, and reconciliation to make payment workflows more reliable.
- Connecting Customers, Merchants, and Payment Records
Another challenge was designing a system where complaints are connected to verified transactions rather than arbitrary payment claims.
We had to consider order ownership, role permissions, merchant isolation, and how support cases relate to PayPal payment records.
We also recognized that production integrations with external e-commerce platforms would require merchant authorization and access to their order systems.
- Making the Platform Useful for Different Businesses
Different businesses have different refund policies.
A physical product seller might care about delivery conditions, while a SaaS company may consider subscription usage or cancellation timing.
We addressed this through configurable merchant policies, including complaint windows, refund limits, eligible categories, and mandatory human review.
Accomplishments that we're proud of
Built a functional dispute resolution platform: Developed dedicated customer and merchant dashboards for complaint registration, tracking, negotiation, and settlement management.
Integrated PayPal Sandbox: Successfully tested payment capture and refund APIs, including a $1 Sandbox transaction, server-side payment verification, and webhook event tracking.
Implemented AI-assisted dispute resolution: Designed a consent-based AI workflow to help merchants evaluate complaints and recommend fair settlements while keeping financial decisions under human control.
Integrated AG Grid: Built an interactive merchant dashboard with sorting, filtering, searching, pagination, and AI risk indicators for efficient complaint management.
Developed a structured negotiation system:Enabled merchants to propose full or partial refunds, define settlement terms, and obtain customer acceptance before financial authorization.
Prioritized security and reliability: Incorporated PostgreSQL Row-Level Security, role-based access control, idempotency, and the Transactional Outbox Pattern to support secure financial workflows.
Built customizable merchant policies:Allowed businesses to configure complaint windows, refund limits, eligible categories, and mandatory human reviews.
Added resolution analytics: Developed dashboards to track complaint volumes, resolution rates, refund activity, and AI-assisted reviews.
Designed for real-world business needs: Focused on making sophisticated dispute resolution more accessible to small businesses, SaaS companies, and multi-seller marketplaces.
Our biggest accomplishment is combining AI-assisted decision-making with PayPal's payment infrastructure while ensuring that humans remain in control of financial transactions.
What we learned
Building ResolveAI taught us that payment processing and dispute resolution are two very different problems.
PayPal provides the infrastructure to move money, but deciding whether a refund is appropriate often requires context, evidence, business rules, and human judgment.
We also learned:
How PayPal Sandbox payments, captures, refunds, and webhooks work.
Why server-side payment verification matters.
How to design safer AI-assisted financial workflows.
Why idempotency and asynchronous processing are important for payment reliability.
How AG Grid can support interactive business operations.
How merchant policies and tenant isolation contribute to trustworthy multi-tenant applications.
Why deterministic fallback modes are useful when external AI services are unavailable.
Most importantly, we learned that the best use of AI in financial workflows isn't necessarily giving it full control — it's helping people make better decisions while preserving accountability.
What's next for ResolveAI
ResolveAI is currently a working prototype, but we see opportunities to expand it into a practical B2B dispute resolution platform.
Our next steps include:
Live AI analysis: Improve Gemini-powered complaint evaluation, evidence understanding, and explainable recommendations.
E-commerce integrations: Connect with merchant-authorized platforms such as Shopify and other order management systems.
SaaS dispute support: Introduce subscription usage and cancellation data as additional context for refund decisions.
Multi-seller marketplace workflows: Help identify whether responsibility lies with the seller, marketplace, or another party.
Production-grade settlement execution: Extend the tested PayPal integration into a fully authorized, reconciled settlement workflow.
Advanced merchant intelligence: Add richer analytics to help businesses identify recurring complaint patterns and operational problems.
Our long-term vision is to make sophisticated dispute resolution accessible to businesses that cannot afford to build their own complex support infrastructure.
Built With
- ag-grid
- ai-agents
- artificial-intelligence
- bullmq
- cloudflare-tunnel
- fastify
- fintech
- google-gemini
- idempotency
- node.js
- paypal
- paypal-sandbox
- paypal-webhooks
- postgresql
- prisma
- react
- redis
- rest-api
- row-level-security
- transactional-outbox
- typescript
- vite
- webhooks