Outgoing FX Payment Workflow
Build a payment workflow that safely and dynamically handles an outgoing FX transaction. This includes risk checks, balance validation, routing to the right provider, and updating the final status.
Who is this for?
Product teams and operations leads who need control over how different payment types (e.g. FX, SEPA, SWIFT) behave at runtime.
Workflow Summary
Trigger: Service-initiated payment (contextual, not event-driven)
Actions:
Validate payment data
Perform ledger check
Run risk checks
Select provider
Send payment
Update status
Log result
Step-by-Step Guide
Create a New Workflow
Go to the Workflows section in the Console
Click "Create Workflow"
Name:
fx-payment-executionChoose family:
paymentsChoose or create plan:
fx-transfer
Add Initial Validation Node
Node type: Conditional or Validation
Confirm required fields like
amount,currency,recipient
Add Ledger Balance Check
Node type: HTTP call or internal service call to
ledgerAction: Verify account has sufficient funds
If insufficient: Route to terminal state
REJECTED
Add Risk Evaluation Step
Node type: Internal service or HTTP call to
risk engineProvide context (amount, customer, destination country)
Handle flags or required holds as needed
Select Payment Provider
Node type: Selection context
Criteria: Based on currency, amount, region
Output: Set
provider_id
Initiate the Payment
Node type: HTTP call to
payment-routerInclude all required metadata from earlier steps
Update Final Payment Status
Node type: Status update
Values:
SETTLED,SENT, or fallback toFAILED
Add Logging Nodes
Use
log.atInfo()after each key transitionCapture values like
payment_id,provider_id, or final state
Define Initial and Terminal States
Initial:
PENDINGTerminal:
SETTLED,REJECTED,FAILED
Activate the Workflow
Save your workflow
Validate paths
Set state to
ACTIVE
Tips
Use parameters for dynamic thresholds and provider rules
Create variants (v2, v3) for SEPA, instant, or crypto rails
Include a retry or error-handling node outside payment call
Troubleshooting
Use execution logs to trace status updates
Check message content to ensure required fields are passed
Outcome The workflow will fully control how an FX payment is validated, routed, executed, and finalized, with full traceability and custom behavior per use case.
Next tutorial: Auto-Create Account When Entity is Created
Last updated

