Get an event by its ID.
JavaScript
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>", "timestamp": "2023-11-07T05:31:56Z", "metadata": "<unknown>" }
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Unique event identifier (case-sensitive, must match the ID used during ingestion)
Event retrieved successfully
Arbitrary key-value metadata. Values can be string, integer, number, or boolean.
Show child attributes
Was this page helpful?