K.F.
Hi, S..
I'm an EMT with three kids of my own.
I think that the pain is probably coming from the swelling. Try icing it - no more than 20 mins at a time because you can cause tissue damage - and if she's had Motrin/Ibuprofen in the past and hasn't had any adverse reactions to it, give her an age-appropriate dose. If, after the swelling goes down, she's still in pain and you feel she needs to be seen, make a same-day appointment with your primary care physician or your child's pediatrician and take her in. Without actually being able to see her finger and feel for instability and crepitus it's pretty difficult to know if she's broken her finger or not.
Hope this helps!