getPlanList()
Retrieves a list of billing plans. Returns a PaginatedResourceResponse object with a data property that contains an array of CommercePlan objects, and a totalCount property that indicates the total number of plans.
function getPlanList(
params?: GetOrganizationListParams,
): Promise<PaginatedResourceResponse<CommercePlan[]>>- Name
limit?- Type
number- Description
The number of results to return. Must be an integer greater than zero and less than 501. Defaults to
10.
- Name
offset?- Type
number- Description
Skip the first
offsetresults when paginating. Needs to be an integer greater or equal to zero. Defaults to0.
- Name
payerType?- Type
'org' | 'user'- Description
Filter plans by payer type.
const { data, totalCount } = await clerkClient.billing.getPlanList({ payerType: 'org' })Backend API (BAPI) endpoint
This method in the SDK is a wrapper around the BAPI endpoint GET /commerce/plans. See the BAPI reference for more information.
Feedback
Last updated on