Are prepaid cards, and gift cards considered a form of money? Are the followings considered a form of money


prepaid (debit) cards 
gift cards (both bank-issued such as American Express gift cards, and store-issued such as Walmart gift cards) ?


Are their balances considered demand deposits, and therefore in M1?

Taking gift cards for example. They seem a form of money, but not exactly. Bank-issued gift cards are more likely to be a form of money than store-issued ones.


They can be used to buy products.
But gift cards are usually not allowed to resell, but I don't understand why they are resold on ebay and many websites if reselling them is illegal. 
Cashing the balance of new or used gift cards are usually difficult. Cashing bank-issued gift cards seem more difficult than store-issued ones.
bank-issued gift cards are usually sold above their face values, while store-issued ones are usually not.
bank-issued gift cards can be used to purchase anywhere the bank is accepted (e.g. Amex), while store-issued gift cards can be only in specific stores.
Prepaid cards are definitely money by any definition— they are essentially demand deposits. An article from the SF Fed states this clearly:


  In contrast to purchases with credit cards, debit card purchases transfer money electronically from individual and business bank accounts to the sellers’ accounts. Spending with a debit card would affect demand deposits and the money supply in the same way that purchases with a check or cash does. Because a debit card transfers your existing financial assets—the financial assets that you may access with a debit card are included in the money supply.


Gift cards, in contrast, aren't generally considered to be part of the measured money supply, but they are in some sense also a form of money. They can be used as a medium of exchange; they are tied to a broader unit of account, and they're (in a manner that depends significantly on the terms of the gift card) a store of value. Rather than being liabilities of banks, as deposits are, they're liabilities of non-financial firms. As a result, gift cards are not quite as fungible as currency is; as you note, they typically trade at a discount to face value. This isn't terribly unusual for money— money during the free banking period often traded at discounts to its face value, particularly as the distance from the issuing bank increased. One of many discussions of this phenomenon can be found in Gorton (1999).