How to create an order programmatically?

Use one of the following API methods:

The proper method depends on your situation, the the detailed decription, implementation and usage contexts of each the methods.