> ## Documentation Index
> Fetch the complete documentation index at: https://razorpay-881012b3.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch All Settlements

> Fetch All Settlements using Razorpay Settlements API.

<div style={{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"0.35rem 0.9rem",border:"1px solid rgba(128,128,128,0.28)",borderRadius:"0.5rem",padding:"0.45rem 0.75rem",margin:"0 0 1.25rem",fontSize:"0.875rem"}}>
  <span style={{fontWeight:600}}>Available in</span>
  <span>🇮🇳 India</span>
  <span>🇸🇬 Singapore</span>
  <span>🇺🇸 United States</span>
</div>

Use this endpoint to retrieve details of all settlements.

<RequestExample>
  ```bash Curl theme={null}
  curl -u <YOUR_KEY>:<YOUR_SECRET>\
  - X GET \
  https://api.razorpay.com/v1/settlements/
  ```

  ```java Java theme={null}
  RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]");

  List<Settlement> settlements = razorpay.settlement.fetchAll();
  ```

  ```python Python theme={null}
  import razorpay
  client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET"))

  client.settlement.all(options)
  ```

  ```php PHP theme={null}
  $api = new Api($key_id, $secret);

  $api->settlement->all($options);
  ```

  ```javascript Node.js theme={null}
  var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' })

  instance.settlements.all(options)
  ```

  ```ruby Ruby theme={null}
  require "razorpay"
  Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET')

  para_attr = {"count": 2}

  Razorpay::Settlement.all(para_attr)
  ```

  ```go Go theme={null}
  import ( razorpay "github.com/razorpay/razorpay-go" )
  client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET")

  options:= map[string]interface{}{
    "count": 2,
    "skip": 1,
  }
  body, err := client.Settlement.All(options, nil)
  ```

  ```csharp .NET theme={null}
  RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]");

  List<Settlement> payment = client.Settlement.All();
  ```

  ```bash CLI theme={null}
  razorpay settlements list --count 10 --skip 0 --from 1776754530 --to 1776758130
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "entity": "collection",
    "count": 2,
    "items": [
      {
        "id": "setl_DGlQ1Rj8os78Ec",
        "entity": "settlement",
        "amount": 9973635,
        "status": "processed",
        "fees": 0,
        "tax": 0,
        "utr": "1568176960vxp0rj",
        "created_at": 1568176960
      },
      {
        "id": "setl_4xbSwsPABDJ8oK",
        "entity": "settlement",
        "amount": 50000,
        "status": "processed",
        "fees": 0,
        "tax": 0,
        "utr": "RZRP173069230702",
        "created_at": 1509622306
      }
    ]
  }
  ```

  ```json Failure theme={null}
  {
      "error": {
          "code": "BAD_REQUEST_ERROR",
          "description": "The count must be at least 1.",
          "source": "business",
          "step": "payment_initiation",
          "reason": "input_validation_failed",
          "metadata": {},
          "field": "count"
      }
  }
  ```
</ResponseExample>

## Query Parameters

<ParamField query="from" type="integer">
  Unix timestamp (in seconds) from when settlements are to be fetched.
</ParamField>

<ParamField query="to" type="integer">
  Unix timestamp (in seconds) till when settlements are to be fetched.
</ParamField>

<ParamField query="count" type="integer">
  Number of settlement records to be fetched.

  * Default value: `10`.
  * Possible value: `1` to `100`.
  * This can be used for pagination, in combination with `skip`.
</ParamField>

<ParamField query="skip" type="integer">
  Number of settlement records to be skipped.

  * Default value: `0`
  * This can be used for pagination, in combination with `count`.
</ParamField>

## Response Parameters

<ResponseField name="id" type="string">
  The unique identifier of the settlement transaction. For example, `setl_7IZKKI4Pnt2kEe`
</ResponseField>

<ResponseField name="entity" type="string">
  Indicates the type of entity. Here, it is `settlement`.
</ResponseField>

<ResponseField name="amount" type="integer">
  The amount to be settled (in the smallest unit of currency). For example, ₹500 will be `50000`.
</ResponseField>

<ResponseField name="status" type="string">
  Indicates the [settlement states](/docs/us/payments/settlements#settlement-states). Possible values:

  * `created`
  * `processed`
  * `failed`
</ResponseField>

<ResponseField name="fees" type="integer">
  This is the total fee charged for processing all payments received from customers settled to you in this settlement transaction. In case of a normal settlement the fee charge will be `0`.
</ResponseField>

<ResponseField name="tax" type="integer">
  The total tax, in currency subunits, charged on the fees collected to process all payments received from customers settled to you in this settlement transaction. In case of a normal settlement the tax charge will be `0`.
</ResponseField>

<ResponseField name="utr" type="string">
  The Unique Transaction Reference (UTR) number available across banks, which can be used to track a particular settlement in your bank account. For example, `1597813219e1pq6w`.
</ResponseField>

<ResponseField name="created_at" type="integer">
  Unix timestamp at which the settlement transaction was created.
</ResponseField>

## Errors

<AccordionGroup>
  <Accordion title="The API {key/secret} provided is invalid.">
    **Code:** `4xx`

    The API credentials passed in the API call differ from the ones generated on the Dashboard.

    **Solution:** The API keys must be active and entered correctly with no whitespace before or after.
  </Accordion>

  <Accordion title="from must be between 946684800 and 4765046400.">
    **Code:** `400`

    The `from` UNIX timestamp is not between `946684800` and `4765046400`.

    **Solution:** Use a valid UNIX timestamp between `946684800` and `4765046400`.
  </Accordion>

  <Accordion title="to must be between 946684800 and 4765046400.">
    **Code:** `400`

    The `to` UNIX timestamp is not between `946684800` and `4765046400`.

    **Solution:** Use a valid UNIX timestamp between `946684800` and `4765046400`.
  </Accordion>

  <Accordion title="The count must be at least 1.">
    **Code:** `400`

    The count passed is `0`.

    **Solution:** Ensure that count is at least `1`.
  </Accordion>

  <Accordion title="count or skip must be a non-negative integer.">
    **Code:** `400`

    A negative value was passed for the `count` or `skip` query parameter. The API responds with `count: must be no less than 0.` or `skip: must be no less than 0.` respectively.

    **Solution:** Pass `count` as an integer between 1 and 100, and `skip` as an integer greater than or equal to 0.
  </Accordion>

  <Accordion title="count, skip, from, or to must be a valid integer.">
    **Code:** `400`

    A non-integer value (for example a string like `abc`, or a human-readable date like `2024-01-01`) was passed for one of the pagination or range query parameters. The API responds with a message of the form `<field>: strconv.Atoi: parsing "<value>": invalid syntax.`

    **Solution:** Pass all four query parameters (`count`, `skip`, `from`, `to`) as integers. `from` and `to` must be UNIX-epoch seconds, not human-readable dates.
  </Accordion>
</AccordionGroup>
