Target (NYSE:TGT) was the latest victim of credit card and debit-card fraud last week, with hackers having stolen information on as many as 40 million cardholders. But as painful as the experience might be for customers, it provides a useful lesson on being smart about your spending.

In the following video, Dan Caplinger, The Motley Fool's director of investment planning, looks the different rules that cover credit cards and debit cards and how the same fraud can result in much different situations for credit card users compared to holders of debit cards. Dan notes that with credit cards, disputes happen before you pay any money to your card company, while debit-card disputes involve having your bank return money that has already been taken from your bank account. Moreover, laws covering fraud on debit card are much less developed than credit card fraud laws, leaving debit-card holders potentially at greater risk. Dan observes that card companies Capital One (NYSE:COF), JPMorgan Chase (NYSE:JPM), and American Express (NYSE:AXP) all take pains not to favor one set of cardholders over another, and he passes on some guidance that those card companies have given to their customers in light of the Target incident.

Fool contributor Dan Caplinger owns warrants on JPMorgan Chase. The Motley Fool recommends American Express and owns shares of JPMorgan Chase. Try any of our Foolish newsletter services free for 30 days. We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.