Workflow Definitions
This guide is a reference for the Workflow API’s Workflow Definition and Schema.
This schema defines a workflow for financial operations, including sending money, waiting for events, and scheduling tasks. It is validated using a CUE schema and supports dynamic variables via ${...} syntax.
Top-Level Keys
By default, we set these parameters as the top-level keys in our workflow schema:
| Parameter Name | Data Type | Description |
|---|---|---|
version | string or int | Workflow version. Must be a numeric string or integer. Default: 1. |
name | string | Descriptive name of the workflow. Allowed characters: letters, numbers, spaces, and . , _ - |
description | string (Optional) | Optional description. Defaults to "Workflow for name" if omitted. |
steps | array | Ordered list of workflow steps. Each step is an object with one of the supported action keys. |
Example of the Top-Level Keys:
version: 1
name: "workflow-1"
description: "workflow for sending money"
steps:
- step_1:
step_parameters: "value"
...Variable Syntax
You can use dynamic variables in string fields using ${variable_name}. These will be resolved at runtime, retrieved from workflow input, or trigger event payload. Examples:
${merchant_account_number}${amount}
Example of variable usage:
steps:
- send_money:
source:
type: "wallet"
account: "${merchant_account_number}"
account_name: "${merchant_account_name}"
destination:
type: "wallet"
account: "${parent_wallet_account_number}"
account_name: "${parent_wallet_account_name}"
bic: "PAEYPHM2XXX"
provider: "paymongo"
amount: "${wallet_transfer_amount}"
currency: "PHP"
notes: "some notes"Supported Step Types
By Default, each PayMongo Workflow can support up to 12 steps. This limit is a hard limit and cannot be adjusted at this time. To see each step and its details, kindly check all the sub-sections of this Documentation.
Updated 5 days ago
