DEV Community

Md Mijanur Molla
Md Mijanur Molla

Posted on

# I Created a Payment Bug Challenge… And AI Missed the Double Charge Risk 💸

Payments look simple.

Check → process → done.

But in real systems, this is one of the most dangerous areas.

So I created a small challenge on VibeCode Arena.

And things got interesting.

🚨 The Problem

The logic seems correct:

  • Check if payment already processed

  • Deduct balance

  • Mark as processed

But here’s the issue:

This system is not safe.

🧠 What Can Go Wrong?

In real-world systems:

  • Network retries can trigger duplicate requests

  • Two requests can run at the same time

  • Payment can be processed twice

Which means:

👉 Users can get charged twice.

🤯 What I Observed

When AI models tried this:

  • Some handled basic checks

  • Some missed concurrency issues

  • Some ignored retry scenarios

  • Very few understood idempotency properly

The code works.

But the system is not reliable.

🔥 Try It Yourself

I created this challenge to test real payment system thinking.

👉 Try it here:

https://vibecodearena.ai/duel/3f2646a4-88af-41a0-a44c-893e671ea1c9

Can you:

  • Prevent duplicate payments?

  • Handle retries safely?

  • Design a fault-tolerant system?

💡 Final Thought

Payments are not about processing once.

They are about making sure it never happens twice by mistake.


Would you trust AI with payment systems?

Let’s discuss 👇

Top comments (0)