Mohammad Daoud has coverage of the autopost.dll file available from Microsoft (for a fee). This file can be used to programatically post transactions. There are plenty of caveats so check out Mohammad’s post.
Auto Post Transactions in Dynamics GP
Archived post from 2010. Dynamics GP and the links it points to have changed since; check current documentation before relying on version-specific steps.