Use a microservice that resides between the actual application and the database, add timestamp and document owner at this step.
TODO: https://en.wikipedia.org/wiki/Two-phase_commit_protocol
Set your document's type: 'transaction'
and let the CouchDcsServer
handle the rest. Algorithm is explained in the source code.