New Zealand fly half Dan Carter will end his All Blacks career to become the sport's highest paid player.