CheckoutGuard
“Checkout froze. Did I pay?”
What inspired us
Imagine you click Pay on a $49 order. The page freezes. You’re about to try again, but you don’t know whether the first payment went through. On the other side, the merchant has to answer your question before either of you can decide what to do next.
Baymard Institute’s 2026 roundup puts average online cart abandonment at 70.22% across 50 published studies. In its survey, after excluding the shoppers who said they were just browsing, 17% cited website errors or crashes as a reason for abandoning. We focused on one specific moment inside that broader checkout problem. PayPal’s developer documentation describes a capture request timing out after the payment went through. That’s the failure we wanted to handle. Baymard checkout research · PayPal’s capture-timeout example
What we built
CheckoutGuard checks the original order. The merchant sees the capture request, the lost response, and the provider lookup in a timeline. Once a matching capture is confirmed, the buyer can open a private status link and see that no further payment is needed.
For a small merchant, that means answering “Did you get my payment?” with a record they can inspect and a reply they can review. For the buyer, it means knowing whether to wait or move on before clicking Pay again. For the team that runs the checkout, Replay Lab makes the failure reproducible so they can verify how the app handles a repeat capture request.
How we built it
We built the merchant workspace and buyer status page in React and TypeScript, with FastAPI, SQLAlchemy, and Alembic behind them. The PayPal Sandbox adapter uses Orders v2 and a stable PayPal-Request-Id. We record the order and capture attempt before calling the provider. A worker can then look up an uncertain payment, and the backend checks the order, amount, and currency against the completed capture.
The AI investigator uses Qwen 2.5 through Ollama. It gets a limited set of incident evidence and links confirmed findings to records the merchant can open. The backend determines payment status and validates citations. The merchant reviews the suggested reply before sharing it.
The hardest part and what we learned
The hardest state to handle was UNKNOWN. A timeout leaves two plausible outcomes, and the app has to behave safely while it finds out which one happened. We deliberately dropped a checkout response after a simulated capture to see whether we could recover the answer from the original order. That exercise changed what we considered a good error message. The buyer needed a safe next step while the merchant needed the evidence to back it up.
We also learned where AI helps most. A short explanation can save the merchant from piecing together a timeline by hand. Giving each finding a source made it possible to check that explanation, especially when the buyer’s money was involved.
What we verified
The demo shows a simulated $49 capture, a deliberately lost response, and reconciliation of the same order. Live local Ollama produces a source-linked investigation. Replay Lab reports one capture and a blocked duplicate attempt. The release passed 34 backend tests, 2 browser tests, and 17 Postman assertions. We also verified PayPal Sandbox authentication and order creation. The next step is to complete the Sandbox capture and signed webhook test, then measure time to resolve an uncertain payment and how often buyers retry before receiving an answer. Validation results
Try it
Run the simulated checkout locally without external API keys, or follow the Sandbox and Ollama setup for the integrated walkthrough. Source code and judge walkthrough
Built With
- ag-grid-community
- alembic
- fastapi
- ollama
- paypal-orders-api
- paypal-sandbox
- paypal-webhooks
- playwright
- postgresql
- postman
- pytest
- python
- qwen-2.5
- react
- sqlalchemy
- sqlite
- typescript
- vite