I didn't purchase it when I purchased my Surface. When I had to return it to Microsoft a month later I thought it would be a good idea to get one since I was already having problems. I believe it allowed me to purchase it for the replacement unit serial number but after my case was closed it said I didn't have a warranty and it never showed up on my credit card so I guess you have to purchase it when buying your Surface? If I were to try to purchase it today it would say something like "this isn't an option for this device" or something similar.
Go here: Microsoft Surface warranty | Surface extended warranty | Microsoft Complete
You have 45 days from the date of purchase to add the extended complete warranty. I added mine about 3 weeks after purchase, I wasn't sure if I was going to keep the SP2 after purchase, so I held off on my initial purchase. I think it's worth it because if you don't have to use it or if you only have to use it once, for $50 you get a new replacement and a brand new battery and who knows, maybe some even more updated hardware. If you decide to sell to move on to something else, you could get that brand new warranty replacement before you sell it and you will probably be able to fetch more $$$ for it