Inspiration

A tiny bug in payment code can quietly charge a little less, and nobody notices until thousands of orders later. I come from a software testing background, so I built a tool that does what a careful tester does: don't trust what the shop says, check what the payment company actually received.

What it does

PayAudit AI audits an online store's PayPal checkout. It sends test purchases to a demo store, then asks the PayPal Sandbox what order was really created and compares the amount. In my demo, a 19.99 USD purchase reaches PayPal as 19.98 USD, and 1.15 becomes 1.14. Zero and negative amounts crash the store. The failed checks and the store's source code go to Google Gemini, which explains the cause and suggests a fix with corrected code. With the bugs on, 2 of 6 checks pass. With the bugs off, all 6 pass.

How I built it

  • PayPal Sandbox REST APIs: OAuth 2.0, Orders v2 (create, get, capture), Payments v2 (refund)
  • Python and FastAPI for the demo store and the live web app
  • Google Gemini (google-genai) for failure explanations
  • AG Grid Community for the results table
  • Render for hosting, GitHub for the code (MIT license)

Challenges

The PayPal Sandbox gave a vague checkout error with India-region test accounts, and switching to US-region accounts fixed it. I also protected the public demo with result caching, one run at a time, and cached Gemini explanations.

What I learned

Money needs exact decimal math, never floats. The best test checks the source of truth, not what the app says.

What's next

More PayPal scenarios (duplicate payments, declined cards, webhooks), and pointing the agent at a developer's own store.

A note for judges

The demo store's bugs are planted on purpose, and Gemini is shown the store's code along with the failures. Everything uses the PayPal Sandbox, so no real money moves.

Built With

Share this project:

Updates

Submission history