Does master-link size matter?
Like so many other things in life, size does matter.

You need to have the master link matched to the chain size (which depends on the number of speeds and manufacturer (which is basically campagnolo versus everyone else)). For example, a master link for a 11 speed chain will be too small for a 7/8/9 speed chain. 

Manufacturers generally suggest you use their chain closing mechanism (Shimano's special rivets, KMC/SRAM's master links, Campagnolo's special rivet that needs peening, etc.), though many people mix and match master links across brands without issue.

In this case, you'll be fine -- 7/8 speed bikes use the same chain (you have a 3x7; the 24 would be 3x8), so you can install the link on the chain.