Idempotency keys and the outbox

A client times out and sends the payment again. Make the second one do nothing, with a key and a UNIQUE, and announce each new order from the same transaction that creates it.

Checking your access…