Leverage nSequence and nLockTime while passing raw transactions around
Above link for reference.
First party would create a transaction that is malleable in some way (ex. sighash_single) , sign yet keep nSequence below the max value and nlocktime at some point in the future so the tx cannot be mined.
Parties would pass the raw tx back, forth and around changing inputs and outputs as needed, with SIGHASH_Single they could even add or modify OP_RETURN outputs or modify with metadata about the transaction. This can be done with simple HTTP API POST requests of the raw transaction.
The security is ensured by setting nlocktime in the future (to prevent premature broadcast) and incrementing the nSequence with signatures so that inputs cannot be arbitrarily invalidated.
The possibilities are quite endless, but this is the mechanism in which 2 or more parties would negotiate and/or modify data within a payment channel.
Once completed, the last party to update will finalize the nSequence for all inputs, or allow the nlocktime to expire so the tx becomes valid and broadcasts it to the network.
Below for reference as well: