I couldn't find this easily. But what is the max length of a monero payment id? I know it's in hex, so how many characters is that if you were to make it a message from hex?
Payment IDs come in two forms:
Old style payment IDs are 256 bits, and are plaintext. That's 64 hexadecimal characters.
New style payment Ids are 64 bits, encrypted on the blockchain. That's 16 hexadecimal characters. Those are almost always embedded in an integrated address, which conveniently pack both your standard Monero address and the payment ID.
If you want to put less data than 256 bits in a plaintext public payment ID, you can pad with zeroes.