Can I filter events for a specific customer using API?
Problem Statement
This article explains how to filter events by customer and what filters are supported in the List events API vs the admin console.
Solution
The List events API supports these filters:
- event_type
- event_id
- webhook_status
- occurred_at
Customer ID filtering is not supported via API. To filter by customer ID, use the Chargebee admin console.
Steps to Set It Up (Admin console)
- Go to Events in the Chargebee dashboard.
- Click Filter list > Add Filter.
- Select Customer Id.
- Choose Equals and enter the customer ID.
- Click Apply Filter.
You can add more than one filter if needed.
Important Notes
- You can also view webhook events for a specific customer by going to the customer record, scrolling down, and clicking the Events tab.
- Events older than 90 days are not visible in the UI.