You can get the generic if you're low on cash. It's the same active ingredient (minoxidil). Just be aware that sometimes the generics can irritate your scalp, I find that my scalp is less irritated when I use brand name than compared to generics.
Also if you're only apply it to your hair line, I would recommend the foam. If it's the crown, I recommend the liquid since you can use the dropper as a "guide" to make sure you're applying it to the thinning spots.
Best of luck.