Unless you are driving a motor vehicle, lawfully detained for investigative purposes, or under arrest; you are not legally required to provide your identification.
As soon as the officer interacts with you or asks you any questions, you are well within your rights to ask, “am I free to leave?”
You weren’t driving and you weren’t under arrest.
The office could lawfully detain you while he/she performed an investigation if they have reasonable suspicion you were involved a crime. Reasonable suspicion has a lower standard than probable cause.
If the officer has reasonable suspicion you were involved in a crime, you could be lawfully detained and you could be obligated to provide identification when asked. You may also be frisked and handcuffed for the safety of the officer. While being frisked, your phone may be removed from your pocket but reasonable suspicion is not grounds to search the phone.
The officer investigation should find the following:
- You make poor wardrobe decisions
- You were with a friend at a hotel
The officer would know those are likely outcomes of the investigation, are not crimes, and may choose to not waste their time.
But, he/she would also know that you or the female might forfeit or waive your 4th amendment rights:
- I paid her for sex
- He paid me for sex
Assuming neither you nor the female waive or forfeit your rights, the basis of the reasonable suspicion is no longer valid based on the outcome of the investigation. If the reasonable suspicion was still in place, it would apply to all tenants, guests, and visitors to the hotel. It doesn’t because that is the intent of the hotel establishment and hospitality industry.
In real life, none of this would happen because you and the female would know you were not legally obligated to open the door.