Decode a Zcash invoice memo without losing non-text payloads
A shielded receipt can carry a memo that a merchant uses for order matching. Some memos are binary, so a missing text rendering is not sufficient evidence of an empty memo.
Read the received note in the wallet
Set ZADDR to the shielded receipt address belonging to the wallet. The response exposes memo bytes as hex and can also provide memoStr when a text representation is available. Match the note to the transaction and its pool-specific output index.
zcash-cli z_listreceivedbyaddress "$ZADDR" 1 | jq '.[] | {txid, outindex, memo, memoStr, change}'
Treat the memo as payer-supplied input
Retain the original bytes when the application expects a binary reference. For text references, validate the expected format and compare the actual amount and destination separately. A familiar order number can be copied into another payment; memo text alone cannot authorize delivery or prove payer identity.