Custom payment processor for credit balance - need ideas and advice
I would try grabbing the code for one of the current payment processors and creating a new instance of it for your credit account "processor".  This should give you the plumbing necessary for CiviCRM; of course you will still need to build out the interface with the MSSQL application, but you will need to do that anyway.

To start this, do a 30 minute dive into the current civi payment processors... I recall there being some fairly simple implementations that you probably can most easily leverage.