B-Mohid/ONDC-tax-split-engine ? reverse-engineered prompt
Reverse engineered prompt
Build me a production style prototype for an ONDC tax split engine that handles an on_confirm webhook and splits one payment across the seller, logistics partner, and platform, while calculating GST, TDS, and TCS exactly in paise. I want it to be idempotent, so if the same request comes in twice it should not double process, and if the payload changes with the same key it should return an error.
Please include an API with endpoints to submit a split request, fetch the result by intent ID, view the ledger, and see compliance queue entries. It should also have simple dev controls to simulate GSTN timeout and payout failures, plus a reset endpoint. Use a clean web dashboard or HTML page to inspect results, and make sure the ledger stays balanced to zero after every run, including rollback when a payout fails.
If you need to look up current docs online, go ahead.
Are you gonna build this?
make sure you review the code using coderabbit