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:
Compatibility matrix#
| ↘ Ledger account | ↘ Wallet | ↘ Payment | |
|---|---|---|---|
| ↗ Ledger account | ✅ | ✅ | ✅ |
| ↗ Wallet | ✅ | ✅ | ✅ |
| ↗ Payment | ✅ | ✅ | ❌ |
Payment destinations work with any PSP connector configured in the Payments service — Stripe, Wise, Modulr, Banking Circle, Currency Cloud, Mangopay, and the rest. Validation is delegated to Payments, so new connectors light up here automatically.
Source types#
Ledger account#
Reference a ledger account by id (the address) and ledger (the ledger name):
For cross-ledger flows you can also customize the intermediate "bridge" account via throughAccount and allow it to go negative via allowOverdraft:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | yes | — | Ledger account address |
ledger | string | yes | — | Ledger name |
throughAccount | string | no | "world" | Intermediate account for cross-ledger or payment flows |
allowOverdraft | bool | no | false | Allow unbounded overdraft on the source account |
Wallet#
Reference a wallet by either id or name. balance selects a specific balance (defaults to main):
Payment#
Reference an existing payment (a payin) by id:
The payment is "ingested" — moved into a ledger as an intermediate step — before being transferred to the destination. By default this uses an internal orchestration ledger; you can override the ingestion target:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | yes | — | Payment ID from the Payments service |
ledger | string | no | "orchestration-000-internal" | Ledger for payment ingestion |
holdingAccount | string | no | "payment:{id}" | Account where ingested funds are held |
throughAccount | string | no | "world" | Source account for the ingestion transaction |
allowOverdraft | bool | no | false | Allow unbounded overdraft on throughAccount |
See Payment ingestion below for the full picture.
Destination types#
Ledger account#
Same throughAccount / allowOverdraft options as ledger-account sources — they govern the intermediate account used on cross-ledger transfers:
Wallet#
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:
The full field set:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
psp | string | yes | — | PSP connector name ("stripe", "wise", "modulr", …) |
type | string | no | "TRANSFER" | "TRANSFER" or "PAYOUT" |
metadata | string | no | — | Account-metadata key carrying the destination PSP account ID |
sourceAccount | string | no | — | Explicit PSP source account ID for the transfer |
connectorID | string | no | — | Specific connector ID (when multiple connectors of the same type exist) |
waitingValidation | bool | no | false | Whether to wait for manual validation before settling |
The ledger or wallet debit happens before the PSP transfer is initiated. On PSP failure the workflow is left in a consistent state — funds remain debited from the source until the workflow handles the failure explicitly.
Cross-ledger transfers#
When source and destination live on different ledgers, the throughAccount field on each side controls the intermediate "bridge" account used.
Same ledger (direct transfer)#
A single transaction posts on main from users:123 to merchants:456.
Different ledgers (bridge transfer)#
Two transactions post:
- On
ledger1:users:sender→bridge:outbound - On
ledger2:bridge:inbound→merchants:receiver
bridge:inbound may need allowOverdraft: true if it isn't pre-funded.
The allowOverdraft field#
By default the Ledger requires source accounts to have sufficient funds. The special "world" account has unbounded overdraft and is used by default for bridge transactions — which is why the cross-ledger example above works without explicit overdraft when the default world bridge is in play.
When you point throughAccount at a custom account, you may need allowOverdraft: true to let the account go negative. The generated Numscript carries an allowing unbounded overdraft clause.
Example: liability tracking for payouts#
Posts as users:{userID} → liabilities:payouts-pending instead of users:{userID} → world, so the in-flight payout shows up on your liabilities account until the PSP confirms settlement.
Payment ingestion#
When the source is a payment, the funds are ingested into a ledger before being transferred to the destination. By default this happens on an internal orchestration ledger:
To ingest directly into your own ledger and account scheme:
Produces: