She continued to toast the occasion on Tuesday by attending Madonna's Rebel Heart Tour show at The Forum in Inglewood, California, and she was roped in to taking part in the Vogue singer's saucy onstage segment during her song Unapologetic B**ch.
Video footage shows Katy being bent over by Madonna's dancers while the pop icon pretends to spank and kick her butt before simulating a sex act. At the end of the segment, Katy was presented with a banana.
After the performance, Madonna told Katy onstage, 'Thanks... I know you didn't want to come up here and do this. So generous. A big round of applause for tonight's unapologetic b**ch.'
Madonna shared pictures from the appearance on Twitter.com and added, 'Sharing a banana with Katy Perry‼️ Highlight of my show at the Forum! Thanks Katherine.'
The birthday girl reposted footage of herself busting impromptu dance moves as Madonna circles around her.
'Well, that was unrehearsed,' she wrote in the caption. 'ILY (I love you) @madonna my queen.'
Madonna's previous surprise guests for the raunchy stunt include Nelly Furtado, comedienne Amy Schumer, DJ Diplo, and U.S. newsman Anderson Cooper.