Rivera made his way through the youth ranks of Unión Comercio and, after three years,[2] he was promoted to the first team in the 2016 season under manager Walter Aristizábal.
In that last season, he did not play regularly due to the good form of forward Cristian Lasso.
From the 2018 season onwards, Rivera became a regular player, scoring 7 goals in 31 matches.
In the 2019 season, he played almost all of Comercio's Liga 1 matches, scoring 4 goals and making 5 assists in 33 games, being the team's player with the most assists; however, Comercio was relegated at the end of the year.
In May 2019, Rivera was called up for the Peruvian U23 national team, under manager Nolberto Solano, to play the 2019 Pan American Games.