Barrantes made his debut for Costa Rica in a February 2007 friendly match against Trinidad and Tobago and went on to earn 54 caps, scoring four goals. He represented his country in fourteen FIFA World Cup qualification matches and played at the 2007 UNCAF Nations Cup as well as the 2007 and 2013 CONCACAF Gold Cups.