Skip to content

Conditions

Destinations support condition expressions that determine when they should fire. Conditions use a safe expression language (based on simpleeval) that evaluates to true or false.

VariableTypeDescription
event_typestringThe raw event type from the provider
payloaddictThe full original webhook payload
providerstringThe provider name (e.g., stripe)
account_slugstringThe account slug
delivery_failedbooltrue if primary delivery exhausted all retries

Conditions support standard Python-like expressions:

event_type == "charge.failed"
event_type.startswith("payment.")
"invoice" in event_type
provider == "stripe" and event_type == "charge.failed"
delivery_failed or event_type == "charge.disputed"
payload.get("amount", 0) > 10000
payload.get("status") == "failed"
event_type.startswith("payment.") and payload.get("amount", 0) > 10000
delivery_failed
event_type == "charge.failed"
event_type == "charge.succeeded" and payload.get("amount", 0) > 50000
provider == "stripe" and "invoice" in event_type
delivery_failed and event_type.startswith("payment.")

If no condition is set on a destination, it fires for every event after primary delivery succeeds (or after retries are exhausted).

Condition expressions are evaluated in a sandboxed environment. Only the variables listed above are available — no access to the filesystem, network, or Python builtins. Invalid expressions are logged and the destination is skipped.