am i doing something wrong?

So the last time me and my SO did the nasty, it stung to pee afterwards and then just burned down there for maybe 20 minutes. This isn't always the case but it has happened before. I only experience the symptoms for those 20 minutes (give or take a few) and then i'm completely fine. I also never have any discomfort during the actual sex. Is it just a lubrication problem? Could it be from the BC i'm on?