I have been in this exact same position before! I had sex with my partner and afterward he tried to finger me but it hurt, and I mean really hurt. I discovered that there was slight swelling painful to touch down there, not sure what caused this, perhaps he had been too rough with his hands in foreplay?
This does'nt happen to me all the time, I can only suggest that you check your partner is'nt being too rough with his hands to cause any possible swelling, and that is fingernails are smooth and short. Aside from that you may have got a small tear during sex which should heal itself.