Ingest events for usage-based billing.
JavaScript
import DodoPayments from 'dodopayments'; const client = new DodoPayments({ bearerToken: 'My Bearer Token', }); const response = await client.usageEvents.ingest({ events: [{ customer_id: 'customer_id', event_id: 'event_id', event_name: 'event_name' }], }); console.log(response.ingested_count);
{ "ingested_count": 1 }
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
List of events to be pushed
1 - 1000
Show child attributes
Events ingested successfully
x >= 0
Was this page helpful?