Encode a Cardano transaction note within metadata text limits
A transaction note is transaction metadata under label 674. A multilingual payment form must count encoded bytes and preserve the expected array structure.
Build the message list
In a JSON representation accepted by suitable metadata tooling, use the numeric label 674 and provide msg as a list of text strings even for one line. Encode the result to ledger metadata with the tool’s correct schema.
{"674":{"msg":["Invoice 1832","Order 51"]}}
Each text item must fit the ledger limit of 64 UTF-8 bytes. A string containing forty two-byte characters occupies eighty bytes. Split it into text items at a character boundary and recheck each encoded length.
Treat the note as public untrusted text
Use ordinary text rendering when displaying notes. Once included, the note is publicly associated with the transaction. A payer-provided invoice number helps with matching but cannot establish the amount, recipient or payment outcome without inspecting the transaction itself. cips.cardano.org Cardano CIP-20