Stripe payment checkout
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?
settle_payment_events(events: list[str]) → list[str][["order_created","intent_created","api_succeeded","webhook_succeeded"]]out["pending","pending","pending","paid"][["order_created","api_timeout","webhook_succeeded"]]out["pending","pending","paid"][["order_created","webhook_succeeded","webhook_succeeded"]]out["pending","paid","paid"]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 & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.