Write spent credits txrecord to db