{
  "opencollection": "1.0.0",
  "info": {
    "name": "Square ApplePay Refunds API",
    "version": "2.0"
  },
  "items": [
    {
      "info": {
        "name": "Refunds",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Square List Payment Refunds",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://connect.squareup.com/v2/refunds",
            "params": [
              {
                "name": "begin_time",
                "value": "",
                "type": "query",
                "description": "Indicates the start of the time range to retrieve each `PaymentRefund` for, in RFC 3339 \nformat.  The range is determined using the `created_at` field for each `PaymentRefund`. \n\nDefault: The current time minus one year."
              },
              {
                "name": "end_time",
                "value": "",
                "type": "query",
                "description": "Indicates the end of the time range to retrieve each `PaymentRefund` for, in RFC 3339 \nformat.  The range is determined using the `created_at` field for each `PaymentRefund`.\n\nDefault: The current time."
              },
              {
                "name": "sort_order",
                "value": "",
                "type": "query",
                "description": "The order in which results are listed by `PaymentRefund.created_at`:\n- `ASC` - Oldest to newest.\n- `DESC` - Newest to oldest (default)."
              },
              {
                "name": "cursor",
                "value": "",
                "type": "query",
                "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination)."
              },
              {
                "name": "location_id",
                "value": "",
                "type": "query",
                "description": "Limit results to the location supplied. By default, results are returned\nfor all locations associated with the seller."
              },
              {
                "name": "status",
                "value": "",
                "type": "query",
                "description": "If provided, only refunds with the given status are returned.\nFor a list of refund status values, see [PaymentRefund](entity:PaymentRefund).\n\nDefault: If omitted, refunds are returned regardless of their status."
              },
              {
                "name": "source_type",
                "value": "",
                "type": "query",
                "description": "If provided, only returns refunds whose payments have the indicated source type.\nCurrent values include `CARD`, `BANK_ACCOUNT`, `WALLET`, `CASH`, and `EXTERNAL`.\nFor information about these payment source types, see\n[Take Payments](https://developer.squareup.com/docs/payments-api/take-payments).\n\nDefault: If omitted, refunds are returned regardless of the source type."
              },
              {
                "name": "limit",
                "value": "",
                "type": "query",
                "description": "The maximum number of results to be returned in a single page.\n\nIt is possible to receive fewer results than the specified limit on a given page.\n\nIf the supplied value is greater than 100, no more than 100 results are returned.\n\nDefault: 100"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://connect.squareup.com/oauth2/authorize",
              "accessTokenUrl": "https://connect.squareup.com/oauth2/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Retrieves a list of refunds for the account making the request.\n\nResults are eventually consistent, and new refunds or changes to refunds might take several\nseconds to appear.\n\nThe maximum results per page is 100."
        },
        {
          "info": {
            "name": "Square Refund Payment",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://connect.squareup.com/v2/refunds",
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://connect.squareup.com/oauth2/authorize",
              "accessTokenUrl": "https://connect.squareup.com/oauth2/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Refunds a payment. You can refund the entire payment amount or a\nportion of it. You can use this endpoint to refund a card payment or record a \nrefund of a cash or external payment. For more information, see\n[Refund Payment](https://developer.squareup.com/docs/payments-api/refund-payments)."
        },
        {
          "info": {
            "name": "Square Get Payment Refund",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://connect.squareup.com/v2/refunds/:refund_id",
            "params": [
              {
                "name": "refund_id",
                "value": "",
                "type": "path",
                "description": "The unique ID for the desired `PaymentRefund`."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://connect.squareup.com/oauth2/authorize",
              "accessTokenUrl": "https://connect.squareup.com/oauth2/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Retrieves a specific refund using the `refund_id`."
        }
      ]
    }
  ],
  "bundled": true
}