The main stage for transferring value between ledgers, wallets, and payments
send
statement is the main and most powerful stage of the Workflow definition. It allows you to natively send money from a payment to a ledger account, from a ledger account to a wallet and from a wallet to a payment initiation, handling the implementation of the actual underlying semantics.
It can be added to a Workflow definition by creating a new stage with the send
type:
send
statement is composed of three main attributes:
source
: the source of the funds to be sentdestination
: the destination of the funds to be sentamount
: the amount of funds to be sentsource
and destination
parts can reference either a ledger account, a wallet or a payment.
↘️ Ledger account | ↘️ Wallet | ↘️ Payment | |
---|---|---|---|
↗️ Ledger account | ✅ | ✅ | Partial support [1] |
↗️ Wallet | ✅ | ✅ | Partial support [1] |
↗️ Payment | ✅ | ✅ | ❌ |
send
statement can be used with a payment block as the destination, which will initiate a payment to the PSP defined in the psp
attribute. This is currently supported only for the stripe
connector, though support for other connectors will be added in the future.
account
attribute, which is composed of the id
and ledger
attributes, referencing the account address and the ledger name respectively:
wallet
attribute:
payment
attribute:
account
and ledger
attributes:
wallet
attribute:
send
statement.
Here, we won’t reference a payment by its identifier (as it doesn’t exist yet), but rather the connector we want to use to initiate a payment. This is done by providing the psp
attribute:
send
statement will create a payment initiation request to the PSP defined in the psp
attribute. The payment initiation request will be sent to the PSP with the amount and asset defined in the amount
attribute.