Thingsboard integration

I find in the manual to add a payload codec. So the received payload is base64 coded. Am I right that the script has to decode the base64 into my original payload? My original payload is JSON formated.
If I am right, where can I find an example how to add a working payload codec?