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

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.dintero.com/feedback

```json
{
  "path": "/api-reference/settlements/list-settlements",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# List settlements

> List settlements

*scopes*:
  - admin:billing
  - read:billing
  - admin:reports
  - read:reports
  - admin:settlements
  - read:settlements




## OpenAPI

````yaml /mintlify-docs/openapi/spec-payments.yaml get /accounts/{aid}/settlements
openapi: 3.0.0
info:
  title: Payments API
  contact:
    name: API Integration Support
    email: integration@dintero.com
  description: >
    Public endpoints for payments, including checkout, payout and settlement
    reports.
  version: LATEST
  license:
    name: UNLICENSED
    url: https://dintero.com
  x-logo:
    url: https://docs.dintero.com/img/dintero-dark-padded.svg
    altText: Dintero Logo
servers:
  - url: https://checkout.dintero.com/v1
security:
  - apikey: []
tags:
  - name: Transactions
    x-displayName: Transactions
    description: |
      View and perform operations on transactions
  - name: session
    x-displayName: Sessions
    description: |
      A Checkout Session relates to an order in your system.
      When an order has been placed you create a corresponding Checkout Session
      to receive payment for that order.
  - name: payment
    x-displayName: Payment
    description: |
      Resources used by the customer aka user to complete the payment of a
      session.
  - name: settlements
    x-displayName: Settlement reports
    description: Get settlement reports generated per payout
  - name: settlements.configuration
    x-displayName: Configuration
    description: Configure settlement reports
  - name: reports
    x-displayName: Reports
    description: List the generated monthly transaction reports
  - name: example-session-callbacks
    x-displayName: Callback
    description: |
      Example of recieved callbacks from Dintero's servers.
  - name: fund-transfers
    x-displayName: Fund Transfer
    description: Transfer funds between sellers
  - name: Sellers
    x-displayName: Sellers
    description: Manage the signup of a new Seller / Merchant account
  - name: example-session-callbacks
    x-displayName: Example Callbacks
    description: Example of callbacks delivered
  - name: v2-fund-transfers
    x-displayName: Fund Transfer
    description: Transfer funds between sellers
  - name: v2-config-payout-destinations
    x-displayName: Sellers
    description: Get payout data for sellers
paths:
  /accounts/{aid}/settlements:
    get:
      tags:
        - settlements
      summary: List settlements
      description: |
        List settlements

        *scopes*:
          - admin:billing
          - read:billing
          - admin:reports
          - read:reports
          - admin:settlements
          - read:settlements
      operationId: aid_settlements_list
      parameters:
        - $ref: '#/components/parameters/accountId'
        - name: limit
          in: query
          description: |
            A limit on the number of objects to be returned. Limit can range
            between 1 and 1000 items, and the default is 10 items.
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 10
        - name: starting_after_id
          in: query
          description: >
            cursor for use in pagination. starting_after_id is an object ID

            that defines your place in the list, included in the
            `last_evaluated_key`.


            For instance, if you make a list request and receive 100 objects,

            ending with `obj_foo` and `settled_at=2021-02-02`, your subsequent
            call

            can include
            `starting_after_id=obj_foo&starting_after_date=2021-02-02` in

            order to fetch the next page of the list.


            > Note that you need to use the `created_at` as value for
            `starting_after_date`

            > if used in combination with `item_created_at.gte` or
            `item_created_at.lte`


            Must be used together with `starting_after_date`
          required: false
          schema:
            type: string
        - name: starting_after_date
          in: query
          description: >
            cursor for use in pagination.

            starting_after_date is the `settled_at` or `created_at` from the

            `last_evaluated_key` that defines your place in the list.

            For instance, if you make a list request and receive 100 objects,

            ending with `obj_foo` and `settled_at=2021-02-02`, your subsequent

            call can include
            `starting_after_id=obj_foo&starting_after_date=2021-02-02`

            in order to fetch the next page of the list.


            Must be used together with `starting_after_id`
          required: false
          schema:
            type: string
        - name: created_at.gte
          in: query
          description: Settlement created after, the `settled_at` value
          schema:
            type: string
            format: date
        - name: created_at.lte
          in: query
          description: Settlement created before a date, the `settled_at` value
          schema:
            type: string
            format: date
        - name: item_created_at.gte
          in: query
          description: |
            Filter by Settlement `created_at` value, cannot be combined
            with `created_at.gte` query parameter
          schema:
            type: string
            format: date
        - name: item_created_at.lte
          in: query
          description: |
            Filter by Settlement `created_at` value, cannot be combined
            with `created_at.lte` query parameter
          schema:
            type: string
            format: date
        - name: payment_provider
          in: query
          description: The payment provider
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: payout_destination_id
          in: query
          description: The seller id to filter on
          schema:
            type: string
        - name: search
          in: query
          description: Will try to match the search to settlement_id.
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/SettlementsList'
        '400':
          description: |
            Bad request - invalid filters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      servers:
        - url: https://api.dintero.com/v1
components:
  parameters:
    accountId:
      name: aid
      description: |
        An id that uniquely identifies the account.
      in: path
      required: true
      schema:
        type: string
        format: ^[PT]{1}\d{8}$
        minLength: 9
        maxLength: 9
  responses:
    SettlementsList:
      description: Settlements List
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SettlementResponse'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServerError:
      description: Unexpected Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
          properties:
            code:
              type: string
              description: The code used to identify the error/warning
            errors:
              type: array
              description: The nested error(s) encountered during validation
              items:
                type: object
            message:
              type: string
              description: The human readable description of the error/warning
    SettlementResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/SettlementItem'
        last_evaluated_key:
          type: object
          description: >
            Details included for use in pagination. Use the value of
            `settled_at`|

            or `created_at` and `id` as `starting_after_id` and
            `starting_after_date`

            parameter to retrieve the next page of settlements.
          properties:
            id:
              type: string
            account_id:
              type: string
            settled_at:
              type: string
              format: datetime
            created_at:
              type: string
              format: datetime
              description: >
                Included when filtering by `item_created_at.gte` and/or

                `item_created_at.lte`, the value to use for
                `starting_after_date`
    SettlementItem:
      type: object
      properties:
        id:
          type: string
          description: |
            Unique identifier for the settlement
        start_at:
          type: string
          format: datetime
          description: Time of first payment event in this settlement
        end_at:
          type: string
          format: datetime
          description: Time of last payment event in this settlement
        created_at:
          type: string
          format: datetime
        updated_at:
          type: string
          format: datetime
        settled_at:
          type: string
          format: datetime
          description: Settlement date
        email_received_at:
          type: string
          description: Time of email received in Dintero's system
        provider:
          type: string
          description: Name of payment provider.
        provider_reference:
          type: string
          description: The provider's unique id of the settlement
        attachments:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: Unique id of the attachment
              key:
                type: string
                description: Attachment path
              content_type:
                type: string
                example: application/xml
              extension:
                type: string
              created_by:
                type: string
                description: >
                  Where the attachment was created. Might be created by dintero,

                  or might be created by the providers, e.g. payex, vipps,
                  collector
                example: payex
        amounts:
          type: array
          items:
            type: object
            properties:
              amount:
                type: number
                description: |
                  The amount paid out, unless payment_status is postponed.

                  `amount = capture - refund - fee`
              capture:
                type: number
                description: |
                  The amount captured on the orders in the settlement period.
              refund:
                type: number
                description: |
                  The amount refunded on the orders in the settlement period.
              fee:
                type: number
                description: |
                  The sum of fees on the orders in the settlement period.
              currency:
                type: string
                format: iso4217-code
                example: NOK
        payment_status:
          type: string
          description: |
            Whether the amount in the report has actually been paid or not.
            The payment might be postponed for later.
          enum:
            - paid
            - postponed
        store_id:
          type: string
          description: |
            The sales location this report is for. Will only be set if all
            transactions share the same store_id.
        payout_destination_id:
          type: string
          description: |
            The seller id this report is for. Will only be set if all
            transactions share the same payout_destination_id.
  securitySchemes:
    apikey:
      type: apiKey
      in: header
      description: |
        X-API-Key authentication for accessing regular endpoints. Use
        [Create api-key](#operation/admin_api_keys_post) to create a key.

        The content of the header should look like the following:

            x-api-key: {api_key}
      name: x-api-key

````