action square_get_payment_refund { label: "GetPaymentRefund" description: "Retrieves a specific refund using the `refund_id`." provider: square method: GET path: "/v2/refunds/{refund_id}" encoding: json input: { type: "object" properties: { refund_id: { type: "string" } } required: ["refund_id"] additionalProperties: false } output: { type: "object" description: "Defines the response returned by [GetRefund](https://developer.squareup.com/reference/square_2021-08-18/refunds-api/get-payment-refund).\n\nNote: If there are errors processing the request, the refund field might not be\npresent or it might be present in a FAILED state." properties: { errors: { type: "array" description: "Information about errors encountered during the request." items: { type: "object" description: "Represents an error encountered during a request to the Connect API.\n\nSee [Handling errors](https://developer.squareup.com/docs/build-basics/handling-errors) for more information." required: ["category", "code"] properties: { category: { type: "string" description: "The high-level category for the error." } code: { type: "string" description: "The specific code of the error." } detail: { type: "string" description: "A human-readable description of the error for debugging purposes." } field: { type: "string" description: "The name of the field provided in the original request (if any) that\nthe error pertains to." } } } } refund: { type: "object" description: "Represents a refund of a payment made using Square. Contains information about\nthe original payment and the amount of money refunded." required: ["amount_money", "id"] properties: { amount_money: { type: "object" description: "Represents an amount of money. `Money` fields can be signed or unsigned.\nFields that do not explicitly define whether they are signed or unsigned are\nconsidered unsigned and can only hold positive amounts. For signed fields, the\nsign of the value indicates the purpose of the money transfer. See\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)\nfor more information." properties: { amount: { type: "integer" format: "int64" description: "The amount of money, in the smallest denomination of the currency\nindicated by `currency`. For example, when `currency` is `USD`, `amount` is\nin cents. Monetary amounts can be positive or negative. See the specific\nfield description to determine the meaning of the sign in a particular case." } currency: { type: "string" description: "The type of currency, in __ISO 4217 format__. For example, the currency\ncode for US dollars is `USD`.\n\nSee [Currency](https://developer.squareup.com/reference/square_2021-08-18/enums/Currency) for possible values." } } } app_fee_money: { type: "object" additionalProperties: true } created_at: { type: "string" description: "The timestamp of when the refund was created, in RFC 3339 format." } id: { type: "string" description: "The unique ID for this refund, generated by Square." } location_id: { type: "string" description: "The location ID associated with the payment this refund is attached to." } order_id: { type: "string" description: "The ID of the order associated with the refund." } payment_id: { type: "string" description: "The ID of the payment associated with this refund." } processing_fee: { type: "array" description: "Processing fees and fee adjustments assessed by Square for this refund." items: { type: "object" description: "Represents the Square processing fee." properties: { amount_money: { type: "object" additionalProperties: true } effective_at: { type: "string" description: "The timestamp of when the fee takes effect, in RFC 3339 format." } type: { type: "string" description: "The type of fee assessed or adjusted. The fee type can be `INITIAL` or `ADJUSTMENT`." } } } } reason: { type: "string" description: "The reason for the refund." } status: { type: "string" description: "The refund's status:\n- `PENDING` - Awaiting approval.\n- `COMPLETED` - Successfully completed.\n- `REJECTED` - The refund was rejected.\n- `FAILED` - An error occurred." } updated_at: { type: "string" description: "The timestamp of when the refund was last updated, in RFC 3339 format." } } } } } }