import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: 'My Bearer Token',
});
const event = await client.usageEvents.retrieve('event_id');
console.log(event.business_id);
{
"business_id": "<string>",
"customer_id": "<string>",
"event_id": "<string>",
"event_name": "<string>",
"metadata": null,
"timestamp": "2023-11-07T05:31:56Z"
}
Get an event by its ID.
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: 'My Bearer Token',
});
const event = await client.usageEvents.retrieve('event_id');
console.log(event.business_id);
{
"business_id": "<string>",
"customer_id": "<string>",
"event_id": "<string>",
"event_name": "<string>",
"metadata": null,
"timestamp": "2023-11-07T05:31:56Z"
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Unique event identifier (case-sensitive, must match the ID used during ingestion)
Event retrieved successfully
The response is of type object
.
Was this page helpful?