Package com.chargebee.v4.webhook
Interface UnhandledEventCallback
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface for handling unregistered/unhandled Chargebee webhook events.
This interface is invoked when no specific handler is registered for an event type. This allows you to log, store, or process unknown/unhandled events.
Example usage:
UnhandledEventCallback fallbackHandler = (event, eventType, rawPayload) -> {
log.warn("Unhandled event: type={}, id={}", eventType, event.getId());
return WebhookResult.unhandled(eventType, event.getId());
};
-
Method Summary
Modifier and TypeMethodDescriptionHandles an unhandled/unregistered webhook event and returns the processing result.
-
Method Details
-
handle
Handles an unhandled/unregistered webhook event and returns the processing result.- Parameters:
event- The base Event object (with content as Map)eventType- The event type string that was not handledrawPayload- The raw JSON payload (for custom parsing if needed)- Returns:
- WebhookResult indicating the outcome of processing
- Throws:
Exception- if event processing fails
-