Reflection algebra and functional equations