import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: 'My Bearer Token',
});
// Automatically fetches more pages as needed.
for await (const meter of client.meters.list()) {
console.log(meter.id);
}
{
"items": [
{
"aggregation": {
"key": "<string>",
"type": "count"
},
"business_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"event_name": "<string>",
"filter": null,
"id": "<string>",
"measurement_unit": "<string>",
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
Get a list of all meters.
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: 'My Bearer Token',
});
// Automatically fetches more pages as needed.
for await (const meter of client.meters.list()) {
console.log(meter.id);
}
{
"items": [
{
"aggregation": {
"key": "<string>",
"type": "count"
},
"business_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"event_name": "<string>",
"filter": null,
"id": "<string>",
"measurement_unit": "<string>",
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Page size default is 10 max is 100
x >= 0
Page number default is 0
x >= 0
List archived meters
Meters List
The response is of type object
.
Was this page helpful?