Former president Barack Obama on Wednesday congratulated Donald Trump on his election victory, noting the importance of a peaceful transfer of power.