Purchase Invoices with Wrong Payment Method

We are creating purchase invoices from an external application, using X3 web services.  In some cases, when we create the invoice, the wrong payment method is assigned to the invoice in the open items (GACCDUDATE).  For example, the payment terms is NET30, and the only payment method associated with that payment terms is CHQ.  When the invoice gets created, it assigns ACH to the payment method.  The supplier, purchase order and invoice all have a payment terms code of NET30, but the payment method ends up ACH on the invoice.  It's like it picks the first one in the list, alphabetically.  Does anybody know what is causing this?