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

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

// Automatically fetches more pages as needed.
for await (const paymentMethodListResponse of client.paymentMethods.list({
  member_id: 'mber_xxxxxxxxxxxxx',
})) {
  console.log(paymentMethodListResponse.id);
}
{
  "data": [
    {
      "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
      }
    }
  ],
  "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

member_id
string
required

The ID of the Member to list payment methods for

Example:

"mber_xxxxxxxxxxxxx"

direction
enum<string> | null

The direction to sort the payment methods 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 PaymentToken.

data
object[]
required

A list of nodes.

page_info
object
required

Information to aid in pagination.