As long as the links are nofollow, buying backlinks is acceptable.
If you purchase backlinks to boost your SEO, you risk your site being penalized. It is against Google’s policies to purchase links in order to manipulate search results.