Obtenez un événement par son ID.
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
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": {}
}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)
Cette page vous a-t-elle été utile ?
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
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": {}
}