Spring loaded roller door latch
You were close with your search term, but try searching, "roller catch". You'll find a ton of choices.

(edit to add a couple of thoughts...) 

Regarding repair versus replace: it's impossible at this distance to know, but replace usually is more predictable. (And in this case, probably not too expensive.)

And as a general rule, when I'm searching for something that I know exists, but I can't name it, I use google image search. Start with something similar, like "ball catch", and after a few pages of images, you'll probably see something like what you're really searching for. Then a few iterations later, you'll have found the most common name for the thing you're actually looking for.