--- displayed_sidebar: servicesSidebar --- import ParameterTypes from "@site/src/components/ParameterTypes" # Refund A refund represents an amount of money transfered back to the customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by an admin for an order. ## Constructors ### constructor `**new Refund**()` A refund represents an amount of money transfered back to the customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by an admin for an order. ## Properties `", "description": "An optional key-value map with additional details", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "note", "type": "`string`", "description": "An optional note explaining why the amount was refunded.", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "order", "type": "[Order](Order.mdx)", "description": "The details of the order this refund was created for.", "optional": false, "defaultValue": "", "expandable": true, "children": [] }, { "name": "order_id", "type": "`string`", "description": "The ID of the order this refund was created for.", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "payment", "type": "[Payment](Payment.mdx)", "description": "The details of the payment associated with the refund.", "optional": false, "defaultValue": "", "expandable": true, "children": [] }, { "name": "payment_id", "type": "`string`", "description": "The payment's ID, if available.", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "reason", "type": "`string`", "description": "The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "updated_at", "type": "`Date`", "description": "The date with timezone at which the resource was updated.", "optional": false, "defaultValue": "", "expandable": false, "children": [] } ]} /> ## Methods ### beforeInsert `Private **beforeInsert**(): void` #### Returns `void`