## List Customers `client.v1.plans.listCustomers(PlanListCustomersParamsparams, RequestOptionsoptions?): CursorPage` **get** `/v1/planDetails/{plan_id}/customers` Fetches a list of customers on a specific plan (by default, only currently active plans are included) ### Parameters - **params:** `PlanListCustomersParams` - **plan\_id:** `string` Path param: - **limit:** `number` Query param: Max number of results that should be returned - **next\_page:** `string` Query param: Cursor that indicates where the next page of results should start. - **status:** `"all" | "active" | "ended" | "upcoming"` Query param: Status of customers on a given plan. Defaults to `active`. * `all` - Return current, past, and upcoming customers of the plan. * `active` - Return current customers of the plan. * `ended` - Return past customers of the plan. * `upcoming` - Return upcoming customers of the plan. Multiple statuses can be OR'd together using commas, e.g. `active,ended`. **Note:** `ended,upcoming` combination is not yet supported. - `"all"` - `"active"` - `"ended"` - `"upcoming"` ### Returns - `PlanListCustomersResponse` - **customer\_details:** `CustomerDetail` - **plan\_details:** `PlanDetails` - **id:** `string` - **custom\_fields:** `Record` - **customer\_plan\_id:** `string` - **name:** `string` - **starting\_on:** `string` The start date of the plan - **ending\_before:** `string | null` The end date of the plan ### Example ```node import Metronome from '@metronome/sdk'; const client = new Metronome({ bearerToken: 'My Bearer Token', }); // Automatically fetches more pages as needed. for await (const planListCustomersResponse of client.v1.plans.listCustomers({ plan_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc', })) { console.log(planListCustomersResponse.customer_details); } ```