How bad is it?
If you crushed your finger inside the closed door, that could be bad.
If you simply bumped it hard, it's probably fine. See how it feels over the next few days. If it's hurting bad still then go see a doctor and get it x-rayed.