Idempotence: What is it and why should I care?
This is vital if you are designing apis or clients that deal with charging a user money. It should be literally impossible for a user to accidentally get charged twice due to a flakey connection if you design correctly.<p>The trick is to have the client generate a random &#x27;idempotency key&#x27; (a uuid) to start each logical transaction and have the server use that id to prevent double charges of the same transaction. By always passing that key, client can request that the payment be processed a 100 times with no fear of it being processed more than once.<p>This stripe blog post has as good a description as any: <a href="https:&#x2F;&#x2F;stripe.com&#x2F;blog&#x2F;idempotency" rel="nofollow">https:&#x2F;&#x2F;stripe.com&#x2F;blog&#x2F;idempotency</a>