Two emails are sent out with receipts on most, but it seems not all, purchases. There is only one payment done and there is no duplicate transaction so that part seems to be working as it should.
My guess is that maybe we are marking the transaction as completed twice through different stripe events and that we don't check correctly if it is already completed.
Due it involving webhooks and events is it possible that it is concurrency related? E.g. what happens if we receive two events of different types at the same time for the same purchase?