Apple will replace the entire upper case unit, a major repair that could be US$300 or more.
There are places that claim to be able to install a new keyboard assembly for less (US$150-200). Although the parts cost is lower the labor costs should go way up, so I question what kind of quality you would get.
If you already owned that computer we could try to work through some options. As you don't own it yet--RUN AWAY!!
A defective keyboard could be due to a liquid spill that would render the computer useless even if you spent a lot of money to replace the board. So quietly step back from this one.
Because of the way Apple manages software through an Apple ID, buying ANY used Mac is fraught with peril. See what you can find on Apple Refurb site--those models are new and come with a full apple warrantly. I only buy Apple-direct refurbs any more and could not be more happy.
http://www.apple.com/shop/browse/home/specialdeals/mac/macbook_pro
If you insist on pursuing the used Mac route, please carefully read this Apple article:
What to do before selling or giving away your Mac - Apple Support
and make certain any seller has complied with it AND agrees to help should their Apple ID not be properly expunged from the computer.