honestly, if u dont want to manually hash every body, u gotta be careful. just checking the header isnt enough cuz a malicious client could send the same uuid with different item amounts or addresses... thats how u end up with successful duplicates that look different.
in a setup like mine, i'd just store the idempotency key in a fast cache like redis with a TTL. when the request hits, check if the key eixsts. if it does, just return teh cached response. if it doesnt, process the order and save teh result. it keeps the db clean and stops the double-processing before it even hits your order logic. also, make sure your DB transaction wraps the 'check key' and 'create order' steps sooo u dont get race conditions if two identical requests hit at the exact same millisecond. 🙄