- Hold the transaction ID in server memory, and reject a repeat. (In memory in redis rather than waiting for DB writes/if node in an array/whatever)
- process events using a FIFO queue.
- use the webhook for transactions rather than sending the receipt from the front end to the backend. As you’ll only get the one Webhook for the transaction.
Or Have “broadcast” turned off on that bits product and that fixes it I think/changes the behavior (not tested this fully/recall the exact behaviour)