The send statement is the main and most powerful stage of the Workflow definition. It moves funds between ledger accounts, wallets, and payment service providers (PSPs), handling the underlying ledger transactions automatically.
A send stage has three attributes:
source— where the funds come fromdestination— where the funds goamount— how much, and which asset
Both source and destination may reference a ledger account, a wallet, or a payment. Skeleton:
---
stages:
- send:
source:
# ...
destination:
# ...
amount:
amount: 100
asset: "EUR/2"Compatibility matrix#
| ↘ Ledger account | ↘ Wallet | ↘ Payment | |
|---|---|---|---|
| ↗ Ledger account | ✅ | ✅ | Partial support [1] |
| ↗ Wallet | ✅ | ✅ | Partial support [1] |
| ↗ Payment | ✅ | ✅ | ❌ |
[1] Payment destinations are currently supported only for the stripe connector. Support for the rest will be added in a later release.
Source types#
Ledger account#
Reference a ledger account by id (the address) and ledger (the ledger name):
source:
account:
id: "users:42"
ledger: "flows-demo-001"Wallet#
Reference a wallet by either id or name. balance selects a specific balance (defaults to main):
source:
wallet:
id: "22d5de50-b5ef-407d-9a03-9e4fc36356f8"
balance: "main" # optionalPayment#
Reference an existing payment (a payin) by id:
source:
payment:
id: "22d5de50-b5ef-407d-9a03-9e4fc36356f8"Destination types#
Ledger account#
destination:
account:
id: "users:42"
ledger: "flows-demo-001"Wallet#
destination:
wallet:
id: "22d5de50-b5ef-407d-9a03-9e4fc36356f8"Payment#
Unlike source payments, destination payments aren't referenced by ID (the payment doesn't exist yet). Instead, you tell the stage which PSP connector to use:
destination:
payment:
psp: "stripe"The send statement creates a payment initiation against the PSP named in psp. Only stripe is supported at this version — other connectors will be added in a later release.