For the complete documentation index, see llms.txt. This page is also available as Markdown.

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:

    1. Validate payment data

    2. Perform ledger check

    3. Run risk checks

    4. Select provider

    5. Send payment

    6. Update status

    7. Log result

Step-by-Step Guide

  1. Create a New Workflow

    • Go to the Workflows section in the Console

    • Click "Create Workflow"

    • Name: fx-payment-execution

    • Choose family: payments

    • Choose or create plan: fx-transfer

  2. Add Initial Validation Node

    • Node type: Conditional or Validation

    • Confirm required fields like amount, currency, recipient

  3. Add Ledger Balance Check

    • Node type: HTTP call or internal service call to ledger

    • Action: Verify account has sufficient funds

    • If insufficient: Route to terminal state REJECTED

  4. Add Risk Evaluation Step

    • Node type: Internal service or HTTP call to risk engine

    • Provide context (amount, customer, destination country)

    • Handle flags or required holds as needed

  5. Select Payment Provider

    • Node type: Selection context

    • Criteria: Based on currency, amount, region

    • Output: Set provider_id

  6. Initiate the Payment

    • Node type: HTTP call to payment-router

    • Include all required metadata from earlier steps

  7. Update Final Payment Status

    • Node type: Status update

    • Values: SETTLED, SENT, or fallback to FAILED

  8. Add Logging Nodes

    • Use log.atInfo() after each key transition

    • Capture values like payment_id, provider_id, or final state

  9. Define Initial and Terminal States

    • Initial: PENDING

    • Terminal: SETTLED, REJECTED, FAILED

  10. 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