## List Costs `client.v1.customers.listCosts(CustomerListCostsParamsparams, RequestOptionsoptions?): CursorPage` **get** `/v1/customers/{customer_id}/costs` Fetch daily pending costs for the specified customer, broken down by credit type and line items. Note: this is not supported for customers whose plan includes a UNIQUE-type billable metric. ### Parameters - **params:** `CustomerListCostsParams` - **customer\_id:** `string` Path param: - **ending\_before:** `string` Query param: RFC 3339 timestamp (exclusive) - **starting\_on:** `string` Query param: RFC 3339 timestamp (inclusive) - **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. ### Returns - `CustomerListCostsResponse` - **credit\_types:** `Record` - **cost:** `number` - **line\_item\_breakdown:** `Array` - **cost:** `number` - **name:** `string` - **group\_key:** `string` - **group\_value:** `string | null` - **name:** `string` - **end\_timestamp:** `string` - **start\_timestamp:** `string` ### Example ```node import Metronome from '@metronome/sdk'; const client = new Metronome({ bearerToken: 'My Bearer Token', }); // Automatically fetches more pages as needed. for await (const customerListCostsResponse of client.v1.customers.listCosts({ customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc', ending_before: '2019-12-27T18:11:19.117Z', starting_on: '2019-12-27T18:11:19.117Z', })) { console.log(customerListCostsResponse.credit_types); } ```