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

# List Disputes

> Get a list of all disputes associated with your account.



## OpenAPI

````yaml get /disputes
openapi: 3.1.0
info:
  title: public
  description: ''
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: 1.102.0
servers:
  - url: https://test.dodopayments.com/
    description: Test Mode Server Host
  - url: https://live.dodopayments.com/
    description: Live Mode Server Host
security: []
tags:
  - name: Products
  - name: Payments
  - name: Subscriptions
  - name: Addons
  - name: Customers
  - name: Refunds
  - name: Disputes
  - name: Events
  - name: License Keys
  - name: Entitlements
  - name: Licenses
  - name: Discounts
  - name: Meters
  - name: Credit Entitlements
  - name: Credit Entitlement Balances
  - name: Outgoing Webhooks
  - name: Checkout
  - name: Webhook Events
paths:
  /disputes:
    get:
      tags:
        - Disputes
      operationId: list_disputes
      parameters:
        - name: created_at_gte
          in: query
          description: Get events after this created time
          required: false
          schema:
            type: string
            format: date-time
          style: form
        - name: created_at_lte
          in: query
          description: Get events created before this time
          required: false
          schema:
            type: string
            format: date-time
          style: form
        - name: page_size
          in: query
          description: Page size default is 10 max is 100
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
          style: form
        - name: page_number
          in: query
          description: Page number default is 0
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
          style: form
        - name: dispute_status
          in: query
          description: Filter by dispute status
          required: false
          schema:
            type: string
            enum:
              - dispute_opened
              - dispute_expired
              - dispute_accepted
              - dispute_cancelled
              - dispute_challenged
              - dispute_won
              - dispute_lost
          style: form
        - name: dispute_stage
          in: query
          description: Filter by dispute stage
          required: false
          schema:
            type: string
            enum:
              - pre_dispute
              - dispute
              - pre_arbitration
          style: form
        - name: customer_id
          in: query
          description: Filter by customer_id
          required: false
          schema:
            type: string
          style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDisputesListResponse'
        '500':
          description: Something went wrong :(
      security:
        - API_KEY: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import DodoPayments from 'dodopayments';

            const client = new DodoPayments({
              bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
            });

            // Automatically fetches more pages as needed.
            for await (const disputeListResponse of client.disputes.list()) {
              console.log(disputeListResponse.business_id);
            }
        - lang: Python
          source: |-
            import os
            from dodopayments import DodoPayments

            client = DodoPayments(
                bearer_token=os.environ.get("DODO_PAYMENTS_API_KEY"),  # This is the default and can be omitted
            )
            page = client.disputes.list()
            page = page.items[0]
            print(page.business_id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/dodopayments/dodopayments-go\"\n\t\"github.com/dodopayments/dodopayments-go/option\"\n)\n\nfunc main() {\n\tclient := dodopayments.NewClient(\n\t\toption.WithBearerToken(\"My Bearer Token\"),\n\t)\n\tpage, err := client.Disputes.List(context.TODO(), dodopayments.DisputeListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n"
        - lang: Java
          source: |-
            package com.dodopayments.api.example;

            import com.dodopayments.api.client.DodoPaymentsClient;
            import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
            import com.dodopayments.api.models.disputes.DisputeListPage;
            import com.dodopayments.api.models.disputes.DisputeListParams;

            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();

                    DisputeListPage page = client.disputes().list();
                }
            }
        - lang: Kotlin
          source: |-
            package com.dodopayments.api.example

            import com.dodopayments.api.client.DodoPaymentsClient
            import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
            import com.dodopayments.api.models.disputes.DisputeListPage
            import com.dodopayments.api.models.disputes.DisputeListParams

            fun main() {
                val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()

                val page: DisputeListPage = client.disputes().list()
            }
        - lang: Ruby
          source: |-
            require "dodopayments"

            dodo_payments = Dodopayments::Client.new(
              bearer_token: "My Bearer Token",
              environment: "test_mode" # defaults to "live_mode"
            )

            page = dodo_payments.disputes.list

            puts(page)
        - lang: PHP
          source: |-
            <?php

            require_once dirname(__DIR__) . '/vendor/autoload.php';

            use Dodopayments\Client;
            use Dodopayments\Core\Exceptions\APIException;

            $client = new Client(
              bearerToken: getenv('DODO_PAYMENTS_API_KEY') ?: 'My Bearer Token',
              environment: 'test_mode',
            );

            try {
              $page = $client->disputes->list(
                createdAtGte: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
                createdAtLte: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
                customerID: 'customer_id',
                disputeStage: 'pre_dispute',
                disputeStatus: 'dispute_opened',
                pageNumber: 0,
                pageSize: 0,
              );

              var_dump($page);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using DodoPayments.Client;
            using DodoPayments.Client.Models.Disputes;

            DodoPaymentsClient client = new();

            DisputeListParams parameters = new();

            var page = await client.Disputes.List(parameters);
            await foreach (var item in page.Paginate())
            {
                Console.WriteLine(item);
            }
components:
  schemas:
    GetDisputesListResponse:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/ListDisputeResponse'
    ListDisputeResponse:
      type: object
      required:
        - dispute_id
        - payment_id
        - business_id
        - amount
        - currency
        - dispute_status
        - dispute_stage
        - created_at
        - payment_provider
      properties:
        amount:
          type: string
          description: >-
            The amount involved in the dispute, represented as a string to
            accommodate precision.
        business_id:
          type: string
          description: The unique identifier of the business involved in the dispute.
        created_at:
          type: string
          format: date-time
          description: The timestamp of when the dispute was created, in UTC.
        currency:
          type: string
          description: >-
            The currency of the disputed amount, represented as an ISO 4217
            currency code.
        dispute_id:
          type: string
          description: The unique identifier of the dispute.
        dispute_stage:
          $ref: '#/components/schemas/DisputeStage'
          description: The current stage of the dispute process.
        dispute_status:
          $ref: '#/components/schemas/DisputeStatus'
          description: The current status of the dispute.
        is_resolved_by_rdr:
          type:
            - boolean
            - 'null'
          description: Whether the dispute was resolved by Rapid Dispute Resolution
        payment_id:
          type: string
          description: The unique identifier of the payment associated with the dispute.
        payment_provider:
          $ref: '#/components/schemas/PaymentProvider'
          description: >-
            Which processor handled the underlying payment. `stripe` / `adyen`
            for

            BYOP routes (the merchant's own Hyperswitch connector); `dodo` for

            everything Dodo processed itself.
    DisputeStage:
      type: string
      enum:
        - pre_dispute
        - dispute
        - pre_arbitration
    DisputeStatus:
      type: string
      enum:
        - dispute_opened
        - dispute_expired
        - dispute_accepted
        - dispute_cancelled
        - dispute_challenged
        - dispute_won
        - dispute_lost
    PaymentProvider:
      type: string
      description: >-
        The processor that ultimately handles a payment, surfaced to the
        dashboard

        so the UI can badge each payment / dispute as "powered by ...".


        `Stripe` and `Adyen` are returned for BYOP routes (the merchant's own

        Hyperswitch connector). `Dodo` covers every other route — both Dodo's
        own

        MoR processors (Stripe US/UK, Cashfree, Airwallex) and any payment that
        has

        no merchant connector attached.


        This type intentionally does NOT reuse the internal `Connector` enum:
        that

        one tracks Dodo's own processor pool and shouldn't leak its variants
        into

        dashboard responses.
      enum:
        - stripe
        - adyen
        - dodo
  securitySchemes:
    API_KEY:
      type: http
      scheme: bearer

````