When a purchase is refunded, all purchased content is deducted from your game, e.g., medals, items, etc. If you spend some of the purchased content before processing a refund, it'll be deducted regardless, which can lead to negative values.