The detent is 1/8" in diameter, a local hardware store may carry. If the detent is missing, the spring is probably missing as well.
~~~~~~~~
Some barrels were shipped with the hole drilled but unused as the change was made to the "ratchet" style. There are "old style" and "new style" magazine caps. "New style" mag caps require the new style mag spring retainer as well. "Old style" mag caps can use the new style mag spring retainer but still require the ball bearing detent.
~~~~~~~~
The detent you need is the same as the Mossberg 500 Safety Click Ball and Browning A5 Safety Ball, which are probably both easier to come by.