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

# Get All Settlements

> Use this API to get all settlement details by specifying the settlement ID, settlement UTR or date range.



## OpenAPI

````yaml /openapi/payments/v2023-08-01.yaml post /settlements
openapi: 3.0.0
info:
  version: '2023-08-01'
  title: Cashfree Payment Gateway APIs
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  contact:
    email: developers@cashfree.com
    name: API Support
    url: https://discord.com/invite/QdZkNSxXsB
  description: >-
    Cashfree's Payment Gateway APIs provide developers with a streamlined
    pathway to integrate advanced payment processing capabilities into their
    applications, platforms and websites.
servers:
  - url: https://sandbox.cashfree.com/pg
    description: Sandbox server
  - url: https://api.cashfree.com/pg
    description: Production server
security: []
tags:
  - name: Orders
    description: Collection of APIs to handle orders.
  - name: Payments
    description: Collection of APIs to handle payments.
  - name: Refunds
    description: Collection of APIs to handle refunds.
  - name: Settlements
    description: Collection of APIs to handle settlements.
  - name: Payment Links
    description: Collection of APIs to handle payment links.
  - name: Token Vault
    description: >-
      Collection of APIs to use Cashfree's token Vault. This helps you save
      cards and tokenize them in a PCI complaint manner. We support creation of
      network tokens which can be used across acquiring banks
  - name: softPOS
    description: Collection of APIs to manage softPOS' agent and order
  - name: Offers
    description: Collection of APIs to handle offers
  - name: Eligibility
    description: >-
      Collection of APIs to check eligibile entities - payment methods, offer,
      affordibility
  - name: Settlement Reconciliation
    description: Collection of APIs to handle settlements
  - name: PG Reconciliation
    description: Collection of APIs to handle reconciliation
  - name: Customers
    description: Collection of APIs to handle customers.
  - name: Easy-Split
    description: Collection of APIs to handle Easy-Split.
  - name: Simulation
    description: Collection of APIs to handle simulation.
  - name: Disputes
    description: Collection of APIs to handle disputes.
externalDocs:
  url: https://api.cashfree.com/pg
  description: This url will have the information of all the APIs.
paths:
  /settlements:
    post:
      tags:
        - Settlement Reconciliation
      summary: Get All Settlements
      description: >-
        Use this API to get all settlement details by specifying the settlement
        ID, settlement UTR or date range.
      operationId: PGFetchSettlements
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
          description: application/json
        - $ref: '#/components/parameters/apiVersionHeader'
        - $ref: '#/components/parameters/xRequestIDHeader'
        - $ref: '#/components/parameters/xIdempotencyKeyHeader'
        - name: Accept
          in: header
          schema:
            type: string
          example: application/json
          description: application/json
      requestBody:
        $ref: '#/components/requestBodies/FetchSettlementsRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SettlementEntity'
          headers:
            x-api-version:
              $ref: '#/components/headers/x-api-version'
            x-ratelimit-limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            x-ratelimit-remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            x-ratelimit-retry:
              $ref: '#/components/headers/x-ratelimit-retry'
            x-ratelimit-type:
              $ref: '#/components/headers/x-ratelimit-type'
            x-request-id:
              $ref: '#/components/headers/x-request-id'
            x-idempotency-key:
              $ref: '#/components/headers/x-idempotency-key'
            x-idempotency-replayed:
              $ref: '#/components/headers/x-idempotency-replayed'
        '400':
          $ref: '#/components/responses/Response400'
        '401':
          $ref: '#/components/responses/Response401'
        '404':
          $ref: '#/components/responses/Response404'
        '409':
          $ref: '#/components/responses/Response409'
        '422':
          $ref: '#/components/responses/Response422'
        '429':
          $ref: '#/components/responses/Response429'
        '500':
          $ref: '#/components/responses/Response500'
      security:
        - XClientID: []
          XClientSecret: []
        - XClientID: []
          XPartnerAPIKey: []
        - XClientID: []
          XClientSignatureHeader: []
        - XPartnerMerchantID: []
          XPartnerAPIKey: []
components:
  parameters:
    apiVersionHeader:
      in: header
      name: x-api-version
      required: true
      description: API version to be used. Format is in YYYY-MM-DD
      schema:
        type: string
        description: API version to be used
        default: '2023-08-01'
      example: '2023-08-01'
    xRequestIDHeader:
      in: header
      name: x-request-id
      description: >-
        Request id for the API call. Can be used to resolve tech issues.
        Communicate this in your tech related queries to cashfree
      required: false
      schema:
        type: string
      example: 4dfb9780-46fe-11ee-be56-0242ac120002
    xIdempotencyKeyHeader:
      in: header
      name: x-idempotency-key
      required: false
      description: >
        An idempotency key is a unique identifier you include with your API
        call.

        If the request fails or times out, you can safely retry it using the
        same key to avoid duplicate actions.
      schema:
        type: string
        format: UUID
      example: 47bf8872-46fe-11ee-be56-0242ac120002
  requestBodies:
    FetchSettlementsRequest:
      description: Request Body to get the settlements
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FetchSettlementsRequest'
  schemas:
    SettlementEntity:
      title: SettlementsEntity
      description: Settlement entity object
      type: object
      example:
        cursor: >-
          eyJzZWFyY2hBZnRlciI6eyJsaXN0IjpbMTg4NjcxNDVdLCJlbXB0eSI6ZmFsc2V9LCJyZWNvbkFQSVR5cGUiOiJMRURHRVIifQ==
        limit: 1
        data:
          - event_id: Test12345
            entity: settlement
            event_type: null
            sale_type: null
            event_time: '2024-12-01T10:00:00+05:30'
            event_settlement_amount: 1000
            event_amount: 1200
            event_status: SUCCESS
            event_currency: INR
            status: completed
            order_id: order-12-127
            customer_name: John Doe
            customer_phone: '9876543210'
            customer_email: john.doe@example.com
            cf_payment_id: 553338
            payment_amount: 1200
            order_amount: 100
            payment_time: '2021-07-13T13:13:59+05:30'
            payment_service_charge: 20
            payment_service_tax: 3.6
            payment_utr: UTR123456
            cf_settlement_id: 6121238
            vendor_commission: 15
            split_service_charge: 10
            split_service_tax: 1.8
            settlement_utr: UTR987654
            settlement_date: '2024-12-02T12:00:00+05:30'
            refund_note: null
            refund_id: REF12345
            refund_arn: null
            refund_processed_at: '2024-12-03T14:00:00+05:30'
            closed_in_favor_of: null
            resolved_on: '2024-12-04T16:00:00+05:30'
            dispute_category: null
            dispute_note: null
            dispute_resolved_on: '2024-12-05T18:00:00+05:30'
            adjustment_remarks: null
            adjustment: null
            service_tax: 1.8
            service_charge: 10
            amount_settled: 1000
            payment_from: null
            payment_till: null
            reason: null
            settlement_initiated_on: '2024-12-01T10:30:00+05:30'
            settlement_type: null
            settlement_charge: null
            settlement_tax: null
            payment_group: null
            remarks: null
      properties:
        cursor:
          type: string
        limit:
          type: integer
        data:
          type: array
          items:
            type: object
            properties:
              event_id:
                type: string
              entity:
                type: string
              event_type:
                type: string
              sale_type:
                type: string
              event_time:
                type: string
              event_settlement_amount:
                type: number
              event_amount:
                type: number
              event_status:
                type: string
              event_currency:
                type: string
              status:
                type: string
              order_id:
                type: string
              customer_name:
                type: string
              customer_phone:
                type: string
              customer_email:
                type: string
              cf_payment_id:
                type: integer
              payment_amount:
                type: number
              order_amount:
                type: number
              payment_time:
                type: string
              payment_service_charge:
                type: number
              payment_service_tax:
                type: number
              payment_utr:
                type: string
              cf_settlement_id:
                type: integer
              vendor_commission:
                type: number
              split_service_charge:
                type: number
              split_service_tax:
                type: number
              settlement_utr:
                type: string
              settlement_date:
                type: string
              refund_note:
                type: string
              refund_id:
                type: string
              refund_arn:
                type: string
              refund_processed_at:
                type: string
              closed_in_favor_of:
                type: string
              resolved_on:
                type: string
              dispute_category:
                type: string
              dispute_note:
                type: string
              dispute_resolved_on:
                type: string
              adjustment_remarks:
                type: string
              adjustment:
                type: number
              service_tax:
                type: number
              service_charge:
                type: number
              amount_settled:
                type: number
              payment_from:
                type: string
              payment_till:
                type: string
              reason:
                type: string
              settlement_initiated_on:
                type: string
              settlement_type:
                type: string
              settlement_charge:
                type: number
              settlement_tax:
                type: number
              payment_group:
                type: string
              remarks:
                type: string
    FetchSettlementsRequest:
      type: object
      description: Request to fetch settlement
      example:
        product: PG
        pagination:
          limit: 10
          cursor: >-
            eyJzZWFyY2hBZnRlciI6eyJsaXN0IjpbMTg4NjcxNDVdLCJlbXB0eSI6ZmFsc2V9LCJyZWNvbkFQSVR5cGUiOiJMRURHRVIifQ==
        filters:
          cf_settlement_ids:
            - '4234233'
          settlement_utrs:
            - utr1
            - utr2
          start_date: '2022-07-20T00:00:00Z'
          end_date: '2022-07-21T23:59:59Z'
          recon_entities:
            - recon-123
            - recon-456
          settlement_id: 6121249
          merchant_vendor_id: abc_123
          order_ids:
            - order-12-127
            - order-15-128
          split_ids:
            - 112481
            - 174232
      properties:
        product:
          type: string
          description: >-
            Fetches the settlements of the product mentioned. Possible values:
            PG, OFFLINE.
        pagination:
          type: object
          properties:
            limit:
              type: integer
              description: >-
                The number of settlements you want to fetch. Maximum limit is
                1000, default value is 10.
            cursor:
              type: string
              description: >-
                Specifies from where the next set of settlement details should
                be fetched.
          description: >-
            To fetch the next set of settlements, pass the cursor received in
            the response to the next API call. 
             To receive the data for the first time, pass the cursor as null. 
             Limit would be number of settlements that you want to receive.
          required:
            - limit
        filters:
          type: object
          properties:
            cf_settlement_ids:
              type: array
              items:
                type: string
              description: >-
                List of settlement IDs for which you want the settlement
                reconciliation details.
            settlement_utrs:
              type: array
              items:
                type: string
              description: >-
                List of settlement UTRs for which you want the settlement
                reconciliation details.
            start_date:
              type: string
              description: >-
                Specify the start date from when you want the settlement
                reconciliation details.
            end_date:
              type: string
              description: >-
                Specify the end date till when you want the settlement
                reconciliation details.
            recon_entities:
              type: array
              items:
                type: string
              description: >-
                List of Recon entities for which you want the settlement
                reconciliation details.
            settlement_id:
              type: integer
              description: >-
                Specify the Settlement ID for which you want the settlement
                reconciliation details.
            merchant_vendor_id:
              type: string
              description: >-
                Specify the vendor ID for which you want the settlement
                reconciliation details.
            order_ids:
              type: array
              items:
                type: string
              description: >-
                List of order Ids for which you want the settlement
                reconciliation details.
            split_ids:
              type: array
              items:
                type: integer
              description: >-
                List of split Ids for which you want the settlement
                reconciliation details.
          description: >-
            Specify either the Settlement ID, Settlement UTR, Recon entities,
            Vendor ID, Order ID, Split ID, or start date and end date to fetch
            the settlement details.
      required:
        - pagination
        - filters
    BadRequestError:
      title: BadRequestError
      description: Invalid request received from client
      example:
        message: bad URL, please check API documentation
        code: request_failed
        type: invalid_request_error
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        type:
          type: string
          enum:
            - invalid_request_error
    AuthenticationError:
      title: AuthenticationError
      description: Error if api keys are wrong
      example:
        message: authentication Failed
        code: request_failed
        type: authentication_error
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        type:
          type: string
          description: authentication_error
    ApiError404:
      title: ApiError404
      description: Error when resource requested is not found
      example:
        message: something is not found
        code: somethind_not_found
        type: invalid_request_error
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        type:
          type: string
          enum:
            - invalid_request_error
          description: invalid_request_error
    ApiError409:
      title: ApiError409
      description: duplicate request
      example:
        message: order with same id is already present
        code: order_already_exists
        type: invalid_request_error
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        type:
          type: string
          enum:
            - invalid_request_error
          description: invalid_request_error
    IdempotencyError:
      title: IdempotencyError
      description: >-
        Error when idempotency fails. Different request body with the same
        idempotent key
      example:
        message: something is not found
        code: request_invalid
        type: idempotency_error
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        type:
          type: string
          enum:
            - idempotency_error
          description: idempotency_error
    RateLimitError:
      title: RateLimitError
      description: Error when rate limit is breached for your api
      example:
        message: Too many requests from IP. Check headers
        code: request_failed
        type: rate_limit_error
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        type:
          type: string
          enum:
            - rate_limit_error
          description: rate_limit_error
    ApiError:
      title: ApiError
      description: Error at cashfree's server
      example:
        message: internal Server Error
        code: internal_error
        type: api_error
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        type:
          type: string
          enum:
            - api_error
          description: api_error
  headers:
    x-api-version:
      schema:
        type: string
        format: YYYY-MM-DD
        enum:
          - '2022-09-01'
      description: >-
        This header has the version of the API. The current version is
        `2022-09-01`.
    x-ratelimit-limit:
      schema:
        type: integer
      example: 200
      description: Ratelimit set for your account for this API per minute
    x-ratelimit-remaining:
      schema:
        type: integer
      example: 2
      description: >-
        Rate limit remaning for your account for this API in the next minute.
        Uses sliding window
    x-ratelimit-retry:
      schema:
        type: integer
      example: 4
      description: |
        Contains number of seconds to wait if rate limit is breached
        - Is 0 if withing the limit
        - Is between 1 and 59 if breached
    x-ratelimit-type:
      schema:
        type: string
        enum:
          - app_id
          - ip
      example: ip
      description: >
        either ip or app_id

        - `ip` if making a call from the browser. True for api where you don't
        need `x-client-id` and `x-client-secret`

        - `app_id` for authenticated api calls i.e using `x-client-id` and
        `x-client-secret`
    x-request-id:
      schema:
        type: string
      example: some-req-id
      description: >-
        Request id for your api call. Is blank or null if no `x-request-id` is
        sent during the request
    x-idempotency-key:
      schema:
        type: string
      example: some-idem-id
      description: >-
        An idempotency key is a unique identifier you include with your API
        call. If the request fails or times out, you can safely retry it using
        the same key to avoid duplicate actions.
    x-idempotency-replayed:
      schema:
        type: string
        format: boolean
      example: 'true'
      description: |-
        In conjunction with `x-idempotency-key` this means
        - `true` if the response was replayed
        - `false` if the response has not been replayed
  responses:
    Response400:
      description: Bad request error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BadRequestError'
      headers:
        x-api-version:
          $ref: '#/components/headers/x-api-version'
        x-ratelimit-limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        x-ratelimit-remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        x-ratelimit-retry:
          $ref: '#/components/headers/x-ratelimit-retry'
        x-ratelimit-type:
          $ref: '#/components/headers/x-ratelimit-type'
        x-request-id:
          $ref: '#/components/headers/x-request-id'
        x-idempotency-key:
          $ref: '#/components/headers/x-idempotency-key'
        x-idempotency-replayed:
          $ref: '#/components/headers/x-idempotency-replayed'
    Response401:
      description: Authentication Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AuthenticationError'
      headers:
        x-api-version:
          $ref: '#/components/headers/x-api-version'
        x-ratelimit-limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        x-ratelimit-remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        x-ratelimit-retry:
          $ref: '#/components/headers/x-ratelimit-retry'
        x-ratelimit-type:
          $ref: '#/components/headers/x-ratelimit-type'
        x-request-id:
          $ref: '#/components/headers/x-request-id'
        x-idempotency-key:
          $ref: '#/components/headers/x-idempotency-key'
        x-idempotency-replayed:
          $ref: '#/components/headers/x-idempotency-replayed'
    Response404:
      description: Resource Not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError404'
      headers:
        x-api-version:
          $ref: '#/components/headers/x-api-version'
        x-ratelimit-limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        x-ratelimit-remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        x-ratelimit-retry:
          $ref: '#/components/headers/x-ratelimit-retry'
        x-ratelimit-type:
          $ref: '#/components/headers/x-ratelimit-type'
        x-request-id:
          $ref: '#/components/headers/x-request-id'
        x-idempotency-key:
          $ref: '#/components/headers/x-idempotency-key'
        x-idempotency-replayed:
          $ref: '#/components/headers/x-idempotency-replayed'
    Response409:
      description: Resource already present
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError409'
      headers:
        x-api-version:
          $ref: '#/components/headers/x-api-version'
        x-ratelimit-limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        x-ratelimit-remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        x-ratelimit-retry:
          $ref: '#/components/headers/x-ratelimit-retry'
        x-ratelimit-type:
          $ref: '#/components/headers/x-ratelimit-type'
        x-request-id:
          $ref: '#/components/headers/x-request-id'
        x-idempotency-key:
          $ref: '#/components/headers/x-idempotency-key'
        x-idempotency-replayed:
          $ref: '#/components/headers/x-idempotency-replayed'
    Response422:
      description: Idempotency error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/IdempotencyError'
      headers:
        x-api-version:
          $ref: '#/components/headers/x-api-version'
        x-ratelimit-limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        x-ratelimit-remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        x-ratelimit-retry:
          $ref: '#/components/headers/x-ratelimit-retry'
        x-ratelimit-type:
          $ref: '#/components/headers/x-ratelimit-type'
        x-request-id:
          $ref: '#/components/headers/x-request-id'
        x-idempotency-key:
          $ref: '#/components/headers/x-idempotency-key'
        x-idempotency-replayed:
          $ref: '#/components/headers/x-idempotency-replayed'
    Response429:
      description: Rate Limit Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitError'
      headers:
        x-api-version:
          $ref: '#/components/headers/x-api-version'
        x-ratelimit-limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        x-ratelimit-remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        x-ratelimit-retry:
          $ref: '#/components/headers/x-ratelimit-retry'
        x-ratelimit-type:
          $ref: '#/components/headers/x-ratelimit-type'
        x-request-id:
          $ref: '#/components/headers/x-request-id'
        x-idempotency-key:
          $ref: '#/components/headers/x-idempotency-key'
        x-idempotency-replayed:
          $ref: '#/components/headers/x-idempotency-replayed'
    Response500:
      description: API related Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
      headers:
        x-api-version:
          $ref: '#/components/headers/x-api-version'
        x-ratelimit-limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        x-ratelimit-remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        x-ratelimit-retry:
          $ref: '#/components/headers/x-ratelimit-retry'
        x-ratelimit-type:
          $ref: '#/components/headers/x-ratelimit-type'
        x-request-id:
          $ref: '#/components/headers/x-request-id'
        x-idempotency-key:
          $ref: '#/components/headers/x-idempotency-key'
        x-idempotency-replayed:
          $ref: '#/components/headers/x-idempotency-replayed'
  securitySchemes:
    XClientID:
      type: apiKey
      in: header
      name: x-client-id
      description: >-
        Client app ID. You can find your app id in the [Merchant
        Dashboard](https://merchant.cashfree.com/auth/login/pg/developers/api-keys?env=prod).
    XClientSecret:
      type: apiKey
      in: header
      name: x-client-secret
      description: >-
        Client secret key. You can find your secret key in the [Merchant
        Dashboard](https://merchant.cashfree.com/auth/login/pg/developers/api-keys?env=prod).
    XPartnerAPIKey:
      type: apiKey
      in: header
      name: x-partner-apikey
      description: >-
        If you are partner and you are making an api call on behalf of a
        merchant
    XClientSignatureHeader:
      type: apiKey
      in: header
      name: x-client-signature
      description: >-
        Use this if you do not want to pass the secret key and instead want to
        use signature
    XPartnerMerchantID:
      type: apiKey
      in: header
      name: x-partner-merchantid
      description: >-
        If you are partner use this to specify the merchant id if you don't have
        the merchant client app id

````