AssignPaymentTransactionToSalesOrderCommandResponse
Assigns a payment transaction to a sales order: the money is recorded as a payment of the order, on the order itself and not spread over its invoices. Without ‘amount’, the ERP records what is open on the document, at most what is left of the transaction (less a cash discount the payment terms allow); when nothing is open on the document, it links the one payment of the document that matches and has no transaction yet, for example a payment from the shop, or else records what is left of the transaction as an overpayment. With ‘amount’, it always records a new payment of that amount; the document may become overpaid. A transaction of money sent or taken back records a payout (a negative payment). Fees of the payment provider that belong to the transaction are booked as order costs. A document that becomes fully paid starts its workflows. For a split, call it once per document. Errors: PAYMENT_TRANSACTION_NOT_FOUND (the payment transaction was not found); PAYMENT_ACCOUNT_HIDDEN (the payment account is hidden; show it with ‘ShowPaymentAccount’ first); PAYMENT_TRANSACTION_IGNORED (the transaction is ignored; unignore it first); PAYMENT_TRANSACTION_IS_FEE (the transaction is a fee; fees are attached to the sales order of the transaction they belong to); PAYMENT_TRANSACTION_NOT_COMPLETED (the transaction is not completed yet); NO_OPEN_AMOUNT (nothing of the transaction is left to assign); AMOUNT_NOT_POSITIVE (the amount is not greater than 0); AMOUNT_EXCEEDS_OPEN_AMOUNT (the amount is more than is left of the transaction: more than ‘openAmount’, for money sent or taken back more than its magnitude); OPEN_AMOUNT_CHANGED (the open amount of the transaction differs from ‘expectedOpenAmount’); CURRENCY_MISMATCH (the transaction and the document have different currencies); PAYMENT_TRANSACTION_ALREADY_ASSIGNED_TO_DOCUMENT (the transaction already has a payment on this document; change that payment instead); SALES_ORDER_NOT_FOUND (the sales order was not found); SALES_ORDER_HAS_INVOICE (the sales order has a finalised invoice; assign the transaction to the invoice). - Response
AssignPaymentTransactionToSalesOrderCommandResponseFields
The ID of the payment recorded or linked.
Whether a payment was recorded or an existing one linked.
What is left of the transaction afterwards.
How much of the transaction is assigned afterwards.
Other transactions whose assigned and open amounts changed with this call: fee transactions that refer to this transaction and whose fees were booked on or removed from the sales order. Empty in most cases.
Was this page helpful?