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

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

// Automatically fetches more pages as needed.
for await (const setupIntentListResponse of client.setupIntents.list({ company_id: 'biz_xxxxxxxxxxxxxx' })) {
  console.log(setupIntentListResponse.id);
}
{
  "data": [
    {
      "id": "sint_xxxxxxxxxxxxx",
      "status": "processing",
      "created_at": "2023-12-01T05:00:00.401Z",
      "error_message": "<string>",
      "company": {
        "id": "biz_xxxxxxxxxxxxxx"
      },
      "checkout_configuration": {
        "id": "ch_xxxxxxxxxxxxxxx"
      },
      "member": {
        "id": "<string>",
        "user": {
          "id": "<string>",
          "email": "<string>",
          "name": "<string>",
          "username": "<string>"
        }
      },
      "payment_method": {
        "id": "payt_xxxxxxxxxxxxx",
        "created_at": "2023-12-01T05:00:00.401Z",
        "payment_method_type": "acss_debit",
        "card": {
          "brand": "mastercard",
          "last4": "<string>",
          "exp_month": 42,
          "exp_year": 42
        }
      },
      "metadata": {}
    }
  ],
  "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 setup intents for

Example:

"biz_xxxxxxxxxxxxxx"

direction
enum<string> | null

The direction to sort the setup intents by

Available options:
asc,
desc
created_before
string<date-time> | null

The maximum creation date to filter by

Example:

"2023-12-01T05:00:00.401Z"

created_after
string<date-time> | null

The minimum creation date to filter by

Example:

"2023-12-01T05:00:00.401Z"

Response

A successful response

The connection type for SetupIntent.

data
object[]
required

A list of nodes.

page_info
object
required

Information to aid in pagination.