End-to-End Architecture

How ResolveAI Works

Trace the complete lifecycle of a PayPal dispute through cryptographic ingestion, Gemini AI investigation, objective evidence scoring, and strict human authorization.

External PayPal Event Backend Processing AI Reasoning Human Governance (Hard Gate)
External PayPal Event

1. PayPal Dispute Webhook Arrives

PayPal notifies ResolveAI via CUSTOMER.DISPUTE.CREATED webhook.

System Execution Details

The incoming payload headers (PAYPAL-AUTH-ALGO, PAYPAL-CERT-URL, PAYPAL-TRANSMISSION-ID, PAYPAL-TRANSMISSION-SIG) are verified cryptographically against PayPal’s verification endpoint. The event ID is verified against the webhook_events PostgreSQL table to enforce 100% idempotent deduplication.

JSON Record Payload
{
  "event_type": "CUSTOMER.DISPUTE.CREATED",
  "resource_type": "dispute",
  "dispute_id": "PP-D-10291-INR",
  "amount": "249.99 USD"
}
Backend Processing

2. Dispute & Transaction Synchronization

Backend fetches dispute details and matches local captured orders.

AI Cognitive Processing

3. Autonomous Gemini AI Investigation

Gemini 2.5 Flash agent classifies dispute and extracts verified proof.

Algorithmic Benchmark

4. Evidence Completeness Scoring (0–100)

Objectively grades evidence package against Seller Protection requirements.

Anti-Hallucination Layer

5. Citation-Backed Contestation Generation

Drafts a professional response letter where every claim cites a real record.

Human Governance (Hard Gate)

6. Human Merchant Review & Explicit Sign-Off

AI is strictly blocked from auto-submitting. Merchant reviews and approves.

PayPal Write Operation

7. PayPal Submission & Immutable Audit Log

Backend executes POST /v1/customer/disputes/{id}/provide-evidence.

See the workflow live in action