This guide helps you diagnose and fix common issues with event ingestion in Flexprice. Follow the systematic approach below to identify and resolve problems.Documentation Index
Fetch the complete documentation index at: https://docs.flexprice.io/llms.txt
Use this file to discover all available pages before exploring further.
Quick Diagnostic Checklist
Before diving into specific issues, run through this checklist:- Feature exists and is active
- Event Name matches exactly (case-sensitive)
- External Customer ID exists in Flexprice
- API key is valid and has proper permissions
- Events are being transmitted to the correct endpoint
- Required fields are present in event payload
- Aggregation field exists in event properties (if required)
- Customer has an active subscription with the feature
Common Issues and Solutions
1. Events Not Appearing in Dashboard
Symptoms: Events transmitted successfully (202 response) but don’t show up in Events dashboard. Possible Causes and Solutions:A. Invalid Event Name
Cause: Event Name in your event doesn’t match the feature configuration. Check:- Go to Product Catalog → Features
- Find your feature and note the exact Event Name
- Compare with what you’re transmitting in events
B. Customer Doesn’t Exist
Cause: The external_customer_id doesn’t exist in Flexprice. Check:- Go to Customers section
- Search for your external_customer_id
- Verify the customer exists and is active
- Create the customer first, or
- Use the correct external_customer_id
C. Feature Not Active
Cause: The feature exists but is not active. Check:- Go to Product Catalog → Features
- Find your feature
- Verify status is “Active”
- Activate the feature if it’s archived
2. Wrong Aggregation Values
Symptoms: Events appear but billing shows incorrect quantities. Possible Causes and Solutions:A. Aggregation Field Name Mismatch
Cause: Property name in events doesn’t match the Aggregation Field. Check:- Go to your feature configuration
- Note the exact Aggregation Field name
- Compare with your event properties
B. Wrong Data Type
Cause: Using strings instead of numbers for numeric aggregation. Check:- Numeric aggregations (SUM, AVERAGE, SUM WITH MULTIPLIER, MAX, WEIGHTED SUM) require numbers
- COUNT UNIQUE can use strings or numbers
- LATEST can use strings or numbers
- COUNT doesn’t use properties
C. Missing Properties
Cause: Events don’t include the required aggregation field. Check:- Every event must include the aggregation field
- Check for typos in property names
3. No Charges in Billing
Symptoms: Events are processed correctly but no charges appear in invoices. Possible Causes and Solutions:A. Feature Not in Plan
Cause: The feature exists but isn’t added to any pricing plan. Check:- Go to Product Catalog → Plans
- Find the plan your customer is subscribed to
- Verify the feature is included
- Add the feature to the plan with appropriate pricing
B. Customer Not Subscribed
Cause: Customer exists but doesn’t have an active subscription. Check:- Go to Customers → Find your customer
- Check subscription status
- Verify the subscription includes the feature
- Create a subscription for the customer
- Ensure the subscription includes the feature
C. Usage Below Free Tier
Cause: Usage is within the free tier limit. Check:- Review plan configuration
- Check free tier settings
- Verify usage quantities
- Adjust free tier limits if needed
- Transmit more usage to exceed free tier
D. Wrong Billing Period
Cause: Events are in a different billing period than expected. Check:- Review subscription billing cycle
- Check event timestamps
- Verify billing period dates
- Wait for the correct billing period
- Check upcoming invoices for the right period
4. API Errors
Symptoms: Getting error responses when transmitting events.A. 400 Bad Request
Common Causes:- Missing required fields
- Invalid JSON format
- Invalid field values
B. 401 Unauthorized
Cause: Invalid or missing API key. Fix:- Verify your API key is correct
- Check API key permissions
- Ensure the key is active
C. 429 Too Many Requests
Cause: Rate limit exceeded. Fix:- Implement exponential backoff
- Use bulk events for high volume
- Reduce request frequency
5. Unexpected Usage Resets
Symptoms: Usage resets when it shouldn’t.A. Wrong Usage Reset Setting
Check:- Go to your feature configuration
- Review Usage Reset setting:
- Periodic: Resets each billing cycle
- Cumulative: Keeps growing
- Change Usage Reset setting if needed
- Note: This may require creating a new feature
B. Subscription Changes
Cause: Subscription was modified or recreated. Check:- Review subscription history
- Check for plan changes
- Verify billing cycle alignment
6. Duplicate Events
Symptoms: Same event counted multiple times. Causes:- Retrying failed requests
- Multiple event sources
- Application bugs
- Use event_id for idempotency
- Implement proper retry logic
- Check for duplicate event sources
Systematic Debugging Approach
Step 1: Verify Event Ingestion
- Send a test event
- Check API response (should be 202 Accepted)
- Look for the event in Events dashboard
- Verify the payload is correct
Step 2: Check Feature Configuration
- Confirm Event Name matches exactly
- Verify Aggregation Function is correct
- Check Aggregation Field name
- Review Usage Reset setting
Step 3: Validate Customer Setup
- Ensure customer exists
- Check external_customer_id matches
- Verify subscription is active
- Confirm plan includes the feature
Step 4: Review Billing Configuration
- Check plan pricing settings
- Verify free tier configuration
- Review billing cycle dates
- Check upcoming invoices
Debugging Tools
Event Debugger
Use the Event Debugger for real-time insights:- Go to Usage Tracking → Event Debugger
- Monitor events as they’re processed
- Look for errors or warnings
Events Dashboard
Check the Events dashboard for:- Event processing status
- Complete event payloads
- Timestamp information
- Customer mapping
Query Tool
Use the Query tool to:- View aggregated usage
- Check billing period alignment
- Verify aggregation calculations
Testing Your Fix
After implementing a fix:-
Send Test Events
-
Verify Event Processing
- Check Events dashboard
- Confirm payload is correct
- Verify aggregation values
-
Check Billing Impact
- Review upcoming invoices
- Confirm charges appear correctly
- Verify amounts are accurate
Prevention Best Practices
1. Test Before Production
- Always test with a small number of events
- Use test customers and features
- Verify the complete flow end-to-end
2. Monitor Regularly
- Check Events dashboard daily
- Review usage patterns weekly
- Monitor billing accuracy monthly
3. Use Consistent Naming
- Standardize Event Names across your system
- Use consistent external_customer_id format
- Follow naming conventions for properties
4. Implement Proper Error Handling
- Handle API errors gracefully
- Implement retry logic with backoff
- Log failed events for debugging
5. Document Your Setup
- Keep records of feature configurations
- Document Event Names and field mappings
- Maintain customer ID mappings
Getting Additional Help
If you’re still experiencing issues:-
Gather Information:
- Event payload examples
- Feature configuration screenshots
- Error messages and timestamps
- Customer and subscription details
-
Check Documentation:
- Review relevant guides
- Check API reference
- Look for similar issues
-
Contact Support:
- Provide specific error details
- Include relevant screenshots
- Share event examples (with sensitive data removed)

