CreateSalesOrderRefundCommandRequestInput
Creates a refund for an overpaid or cancelled sales order: the ERP will pay the amount back to the customer through a payment account. It books a payout (a payment with a negative amount) on the order at once; the money moves when the refund is sent with ‘SendRefund’. The input is a one-of: refund an earlier payment transaction through the payment account that received it, or send a bank transfer from a bank account that can send transfers to the IBAN of the recipient. ‘GetSalesOrderRefundProposal’ tells which transactions can be refunded and how much. Money owed because of an invoice correction is refunded on the correction (‘CreateSalesInvoiceCorrectionRefund’). For a larger amount, create one refund per transaction. Errors: SALES_ORDER_NOT_FOUND (the sales order was not found); SALES_ORDER_NOT_OVERPAID (the sales order is not overpaid, so nothing can be refunded); SALES_INVOICE_CORRECTION_WITHOUT_PAYOUT_EXISTS (an invoice correction of the order has not been paid out yet; refund the correction); AMOUNT_NOT_POSITIVE (the amount is not greater than 0); AMOUNT_EXCEEDS_REFUNDABLE_AMOUNT (the amount is more than can be refunded for the document or for the transaction); PAYMENT_TRANSACTION_NOT_FOUND (the payment transaction was not found); PAYMENT_TRANSACTION_NOT_REFUNDABLE (the transaction does not belong to the payments of the document, or nothing of it is left to refund); PAYMENT_ACCOUNT_NOT_FOUND (the payment account was not found); PAYMENT_ACCOUNT_CANNOT_TRANSFER (the payment account cannot send bank transfers); RECIPIENT_IBAN_INVALID (the IBAN of the recipient is not valid). - Request
CreateSalesOrderRefundCommandRequestInputFields
The ID of the sales order.
The amount to pay back, greater than 0, with at most two decimals. At most what the proposal allows for the chosen transaction or bank transfer.
How the money is moved. Exactly one variant.
The text the recipient sees with the money. Omitted means a text naming the document. Bank transfers carry at most 140 characters of it.
An internal note that is not sent to the payment provider or the bank.
Client-supplied idempotency key. When provided, a repeated request with the same key and payload replays the original result instead of re-executing the mutation.
Was this page helpful?