Triggering Workflows

Create triggers that start workflows from PayMongo events or cron-based schedules, and understand trigger states.


A workflow does not run on its own. To start a workflow you create a trigger: a binding between a condition (an event name or a schedule) and a workflow ID. When the condition fires, the Workflow API creates a new instance and runs the workflow.

Trigger types

A trigger is bound to one workflow. To run multiple workflows from the same source, create multiple triggers. A workflow can have multiple triggers (for example, one schedule and one event).

Lifecycle

StateMeaning
pendingThe trigger has been created but is still finishing setup (subscription confirmation or schedule registration).
activeThe trigger is fully configured and will fire when its condition is met.
failedThe trigger could not be activated (for example, a malformed cron expression or a missing subscription).
deletedThe trigger has been soft-deleted and will not fire.

To inspect previous trigger fires, see Trigger Executions in the API Reference.