abhishek1913/upi-checkout-reconciliation ? reverse-engineered prompt

Reverse engineered prompt

Build me a Spring Boot service for taking an order through UPI payment and then reconciling it safely, using a Cashfree sandbox style flow.

I want the app to let someone create an order, start either a UPI collect payment or a UPI intent payment, then track the payment status until the order is marked paid. Webhooks should be treated as messy and unreliable, so make the system handle duplicate events, out of order events, late events, and missing events without ever charging the customer twice. If a webhook does not arrive, add a reconciliation job that checks the gateway for the real status and fixes things up.

Please include a local simulator mode so the whole flow can run without real keys, plus a real Cashfree mode that uses sandbox credentials. I also want API endpoints to check the order, payment attempts, timeline, and any discrepancies, with clean error responses and request IDs. If you need to, look up the current docs online while building it.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab