I just got a receipt which said "Received with thanks the sum of ..." *Thanks* stands for gratitude, so this looks fine to me as far as grammar is concerned.

But is this old-fashioned and/or stilted? Are there more formal ways of expressing this idea?