Inspiration

A catalog import can look complete while duplicate SKUs, missing prices or changes to an approved sample make it unusable. Catalog Gate connects a pre-agreed delivery check to a PayPal Sandbox payment workflow, with a person making the final acceptance decision.

What it does

In PayPal Sandbox, a buyer approves a USD 50 test payment and the application authorizes it. The supplier delivers a CSV against a fixed brief: required columns, 200 expected rows, a 2% tolerance, unique SKUs and an approved sample. Deterministic rules produce a file-bound report with findings by line. A failed check blocks capture; an acceptable check still requires explicit human acceptance before the entire authorized amount can be captured with final_capture: true. Authorization and capture are separate operations; this is not escrow.

Gemini 3.5 Flash-Lite explains the deterministic report. It receives the report, not the raw customer file. A citation checker rejects references to lines without findings or outside the file; it does not prove that every sentence is correct. The model never changes the verdict, edits the delivery or authorizes a payment. A separate, rule-based redelivery helper prepares Spanish or Portuguese requests from findings accepted by a person. Its AI repair suggestions remain disabled.

How it was built

The application uses Node.js 22, PayPal Sandbox Orders v2 and Payments v2, PayPal webhook signature self-verification, persistent operation intents and a browser interface. In-flight requests are recorded before an external effect. An ambiguous financial response blocks every financial POST. Read-only reconciliation can settle operations for which the provider exposes an exact outcome; other uncertain operations remain blocked for manual review. No financial POST is resent automatically. Fixture mode is a separately labeled simulator for judges to run without credentials; it is not a PayPal payment receipt.

Validation and limitations

Public GitHub Actions run 42984498276 qualified product e7955eda8e9413224a6b7541be40e5ede4638a57 with 111 unit tests, the Chromium regression and all seven out-of-order response scenarios. Product bytes matched before and after the run. Those offline checks do not establish a successful real payment.

The controlled real AI evaluation returned one useful explanation citing lines 46, 121 and 178 correctly. A second request timed out after 15 seconds; the third case was not attempted, and nothing was retried. The response also used an imprecise yellow-status label and suggested updating the file before proceeding; human acceptance remains a separate gate. The result demonstrates one stored response, not reliability, broad accuracy or a successful three-case evaluation. Deterministic checks and human acceptance remain available when AI is unavailable.

With a virtual US seller account, a controlled real Sandbox flow completed for USD 50.00 of test money: the buyer personally approved the order, the application authorized it, and a 200-row delivery passed the agreed checks with no rejections or duplicate SKUs. A signed PAYMENT.AUTHORIZATION.CREATED webhook was also verified. The buyer accepted the exact file-bound report after the first runtime window had closed. In a later explicitly authorized test window, the same order and financial journal were restored byte for byte, followed by one full capture. PayPal GET confirmed capture 7YK28292045248338 as COMPLETED with final_capture: true. A cryptographically verified PAYMENT.CAPTURE.COMPLETED webhook identified that same capture, authorization, amount and currency. The application was already CAPTURED from its synchronous result, so the webhook did not cause another state transition. Temporary runtime resources and the owned webhook were removed, with an independent closure check. An earlier checkout attempt stopped without authorization or capture; its cause was not established. This is one successful Sandbox scenario, not a claim of production reliability or a real-money payment.

What we learned

A payment receipt, a rule verdict and a model explanation need separate evidence. Handling uncertain responses and stale browser requests is as important as the happy path. This prototype deliberately keeps payment decisions outside the model.

Run and review

The public MIT-licensed repository contains setup instructions and a working fixture build: https://github.com/rafaorlando3/paypal-catalog-gate-2026 . Judges can run npm test and npm start with Node.js 22 or later. No hosted deployment is required. Sandbox and optional real AI modes require judges to configure their own credentials; this submission does not disclose private keys.

Share this project:

Updates

Submission history