I always considered it as a debt which only exists for a few seconds. You agree to purchase something, cashier rings it up, and in those few moments before you pay you have a debt to the shop.
That's still not a debt. If the cashier rings it up, and you try to pay with credit card and your card is declined, you can leave without buying anything. Whereas with a debt, you couldn't just change your mind like that.