The 27-year-old will be seen wearing a crisp white shirt, a tie and a waistcoat with a funky spiked hairdo for the commercial that will be aired soon.
Ranbir is happy with the commercial, which was shot in a mansion in Los Angeles.
"Shooting was definitely a 'wow' experience. I love the way it has turned up right from the script, the sets, the whole look.
With Pepsi I have always got a chance to experiment and try new interesting characters. Each commercial brings with it a new excitement, " Ranbir said in a statement.