Inspiration

I kept watching support teams drown in the same kind of message: a customer pastes three emails, an incomplete order number, and two different amounts, then asks for a refund. The agent has to parse it by hand, check policy, and decide whether to move money. Rush it and you refund the wrong thing. Wait and the customer is already gone.

PayPal already moves the money. The missing piece was a clear path from messy complaint to a decision a human can actually make before anything executes.

What it does

Resolve takes a messy customer complaint and turns it into a clear PayPal resolution, with a hard stop before money moves.

You paste the raw message. The AI extracts the facts (order reference, amount, reason, any evidence mentioned) and proposes resolution options. Those land in an Approval Packet that shows the customer, amount, reason, chosen option, and evidence. A human reviews it and either approves or rejects. Only on approve does the system call the PayPal sandbox to create, capture, and refund. The gate is fail-closed—if anything is missing or the approval isn’t there, nothing executes.

The handoffs are typed: Intake → Policy/Proposal → Approver → Executor. That keeps the AI from acting alone on money.

How we built it

Next.js for the full stack. PayPal Orders v2 and Payments v2 in the sandbox for the real create-capture-refund cycle. Structured AI extraction (facts and options) from the unstructured complaint text. The case and Approval Packet are simple typed objects with a canExecuteRefund gate checked before any payment call.

We validated the full sandbox path: order created, captured, and refunded.

Challenges we ran into

Getting the extraction reliable enough that the Approval Packet was actually useful, not just plausible. Making the fail-closed gate strict so a missing approval or incomplete case could never reach the PayPal call. Keeping the UI focused on the decision point instead of burying people in intermediate steps.

Accomplishments that we're proud of

A working end-to-end demo where a messy message becomes a clear packet, a human approves, and a real sandbox refund completes. The typed handoffs and hard stop are the core not an afterthought.

What we learned

AI is excellent at structuring messy text. It is a poor final decision maker when money is involved. The product only works if the human approval is the unavoidable step.

What's next

Tighter policy rules inside the proposal step, better handling of incomplete evidence, and a clearer audit trail of every handoff.

Built with

  • PayPal Orders v2 API
  • PayPal Payments v2 API (sandbox)
  • Next.js
  • Structured AI extraction for facts and resolution options

Built With

Share this project:

Updates

Submission history