-
-
Order help: a request is linked to its exact PayPal-backed order and tracking status.
-
Impact dashboard: FirstReply resolves buyer issues before they become PayPal disputes.
-
Buyer storefront: customers can shop, order, and get support in one experience.
-
Policy controls: deterministic limits and trust tiers govern every AI-proposed action.
-
Approvals queue: high-risk actions require merchant review before they can proceed.
-
Disputes console: the agent drafts a recommended PayPal response backed by evidence.
-
Cases grid: live, filterable buyer issues with status, risk signals, and next actions.
-
Case timeline: buyer messages, tracking, policy checks, and the agent resolution in one view.
-
Demo console: ready-made scenarios exercise buyer and merchant workflows end to end.
-
GIF
Level 1: live tracking answers “Where’s my order?” without an unnecessary refund.
-
GIF
Level 3: tracking on hold triggers a policy-approved refund and PayPal audit record.
-
GIF
Level 2: the agent matches a confusing PayPal charge to the buyer’s order.
Inspiration
Merchants lose time and money when a buyer goes straight to the bank. Many “item not received,” damaged-item, and unrecognized-charge cases are fixable if the merchant replies quickly and can act within a clear policy. FirstReply puts an always-on resolution agent where buyers need it most: the store, order email, card-statement descriptor, and hosted help page.
What it does
FirstReply verifies the buyer against a single order, checks live PayPal order and shipment data, then applies code-enforced limits, delivery rules, and trust tiers before it offers a refund, reshipment, or explanation. It can match a PayPal soft descriptor to an order, assess a damage photo before proposing a partial refund, and route high-risk money actions to a merchant approval queue.
If a buyer opens a PayPal dispute anyway, the Dispute Agent matches the dispute to the FirstReply case, recommends fight, offer, or accept, and prepares a response with the supporting order, tracking, conversation, policy, and audit evidence. The merchant remains the person who submits the response.
How we built it
We built FirstReply with Next.js, TypeScript, Tailwind CSS, PostgreSQL, and Drizzle. The agent loop uses the Vercel AI SDK with PayPal Agent Toolkit and PayPal REST APIs for Orders, Tracking, refunds, and Customer Disputes. Every payment action passes through a deterministic policy engine; the model proposes an action, while code decides whether it is allowed.
The merchant console includes live cases, approvals, policy controls, an append-only audit timeline, dispute drafting, evidence-PDF preview, and impact metrics. A demo panel lets us create scenario orders, simulate carrier status, and reset the local demo state.
Challenges
PayPal sandbox partner onboarding is unavailable to hackathon apps, so the demo uses sandbox merchant credentials while preserving the production path of partner onboarding. Sandbox dispute timing and available response actions can vary, so prevention is the primary product story. We also had to make policy limits enforceable outside the prompt: no refund, reshipment, or dispute action can bypass the code policy engine.
Accomplishments and learnings
We delivered an end-to-end prevention flow, merchant approvals, real sandbox refund support, photo assessment, dispute drafting with a case-record PDF, and a 22-scenario deterministic evaluation that passes 100%. We learned that hard money limits beat prompt-only promises, and that an append-only audit record is useful both for merchant visibility and for a later dispute response.
What's next
Next we will add PayPal partner onboarding, transaction-search order sync for real merchant storefronts, inquiry-stage make-offer actions, and buyer/merchant notifications.
Built With
- ag-grid
- drizzle-orm
- next.js
- paypal
- paypal-agent-toolkit
- paypal-rest-api
- postgresql
- react
- render
- tailwind-css
- typescript
- vercel-ai-sdk
- vitest
Log in or sign up for Devpost to join the conversation.