There is a built-in handler for when the type field is set to internal.
type
internal
The data field of the payload JSON object will be of the form:
data
payload
"data" : { }