> ## Documentation Index
> Fetch the complete documentation index at: https://developer.jtl-software.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CreateSalesOrderRefundCommandResponse

> 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). - Response



**Kind**: `object`

## Fields

**`refundId`**: `ID!`

The ID of the new refund.

