Skip to main content
GET
/
disputes
JavaScript
import Whop from '@whop/sdk';

const client = new Whop({
  apiKey: 'My API Key',
});

// Automatically fetches more pages as needed.
for await (const disputeListResponse of client.disputes.list({ company_id: 'biz_xxxxxxxxxxxxxx' })) {
  console.log(disputeListResponse.id);
}
{
  "data": [
    {
      "id": "dspt_xxxxxxxxxxxxx",
      "amount": 6.9,
      "currency": "usd",
      "status": "warning_needs_response",
      "editable": true,
      "created_at": "2023-12-01T05:00:00.401Z",
      "visa_rdr": true,
      "needs_response_by": "2023-12-01T05:00:00.401Z",
      "reason": "<string>",
      "plan": {
        "id": "plan_xxxxxxxxxxxxx"
      },
      "product": {
        "id": "prod_xxxxxxxxxxxxx",
        "title": "<string>"
      },
      "company": {
        "id": "biz_xxxxxxxxxxxxxx",
        "title": "<string>"
      },
      "payment": {
        "id": "pay_xxxxxxxxxxxxxx"
      }
    }
  ],
  "page_info": {
    "end_cursor": "<string>",
    "start_cursor": "<string>",
    "has_next_page": true,
    "has_previous_page": true
  }
}

Authorizations

Authorization
string
header
required

The app API key from an app from the /dashboard/developer page

Query Parameters

after
string | null

Returns the elements in the list that come after the specified cursor.

before
string | null

Returns the elements in the list that come before the specified cursor.

first
integer | null

Returns the first n elements from the list.

Example:

42

last
integer | null

Returns the last n elements from the list.

Example:

42

company_id
string
required

The ID of the company to list disputes for

Example:

"biz_xxxxxxxxxxxxxx"

direction
enum<string> | null

The direction to sort the companies by The direction of the sort.

Available options:
asc,
desc

Response

A successful response

The connection type for Dispute.

data
object[]
required

A list of nodes.

page_info
object
required

Information to aid in pagination.