Question
You're directing an AI agent to build a checkout/charge endpoint in Java (Spring Boot) against Stripe's PaymentIntents from scratch: create an order, charge the card, and mark the order paid, with safe behavior under retries and double-clicks. Lay out the build plan: the sequence of operations, idempotency, the order/payment state machine, and acceptance criteria. What does a careless 'charge the customer and save the order' prompt get dangerously wrong about money?
Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it — tests, edge cases, reading critically — and how you’d re-prompt or decompose to get it right.
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.