4,156 questions
4,369 answers
5,718 comments
Yes, OP_RETURN is the correct way to store arbitrary data in a blockchain transaction. You can use APIs like sendwithmetadata or appendrawmetadata to make it easier to build transactions with OP_RETURN.