import Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const paymentMethodListResponse of client.paymentMethods.list()) {
console.log(paymentMethodListResponse);
}{
"data": [
{
"typename": "<string>",
"id": "payt_xxxxxxxxxxxxx",
"created_at": "2023-12-01T05:00:00.401Z",
"payment_method_type": "acss_debit"
}
],
"page_info": {
"end_cursor": "<string>",
"start_cursor": "<string>",
"has_next_page": true,
"has_previous_page": true
}
}Returns a paginated list of payment methods for a member or company, with optional filtering by creation date. A payment method is a stored representation of how a customer intends to pay, such as a card, bank account, or digital wallet.
Required permissions:
member:payment_methods:readimport Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const paymentMethodListResponse of client.paymentMethods.list()) {
console.log(paymentMethodListResponse);
}{
"data": [
{
"typename": "<string>",
"id": "payt_xxxxxxxxxxxxx",
"created_at": "2023-12-01T05:00:00.401Z",
"payment_method_type": "acss_debit"
}
],
"page_info": {
"end_cursor": "<string>",
"start_cursor": "<string>",
"has_next_page": true,
"has_previous_page": true
}
}A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************
Returns the elements in the list that come after the specified cursor.
Returns the elements in the list that come before the specified cursor.
Returns the first n elements from the list.
42
Returns the last n elements from the list.
42
The unique identifier of the member to list payment methods for.
"mber_xxxxxxxxxxxxx"
The unique identifier of the company. Provide either this or member_id, not both.
"biz_xxxxxxxxxxxxxx"
The sort direction for ordering results, either ascending or descending.
asc, desc Only return payment methods created before this timestamp.
"2023-12-01T05:00:00.401Z"
Only return payment methods created after this timestamp.
"2023-12-01T05:00:00.401Z"
A successful response
The connection type for PaymentMethodInterface.
A list of nodes.
A saved payment method with no type-specific details available.
Show child attributes
Information to aid in pagination.
Show child attributes
Was this page helpful?