In building a WEB API, sometimes we have naturally idempotent operations (like deleting a given resource) and sometimes not (like paying with a card)
However, you can always use a random number as a transaction ID, to prevent it from happening more then once (see, eg., stripe's idempotency keys: https://stripe.com/blog/idempotency)
Is there a downside to this? Why not do it all the time and forgo non-idempotency forever?