_Docs/
Get StartedModulesPlatformDeployCookbookChangelogReference
_Stack
_Modules
  • Ledger
  • Numscript
  • Connectivity
  • WalletsEE
  • FlowsEE
    • Workflows definition
    • Workflows execution
    • Stages Reference
      • Send Statement
      • Waiting for events
      • Waiting for a delay
    • Examples
      • Ledger to Ledger
      • Payment to Wallet
      • Ledger to Stripe Payout
    • Triggers
  • ReconciliationEE
  1. Modules
  2. Flows
  3. Examples
  4. Ledger to Stripe Payout
Flows

Ledger to Stripe Payout

In this example, we're going to create a workflow that will transfer funds from a ledger account to a Stripe Connect account by leveraging the send stage.

To initiate a transfer from a ledger account to a Stripe Connect account, you must have set the formanceAccountID metadata key on the ledger account metadata to identify the formance account ID related to the Stripe Connect account to initiate the transfer to.

What's happening in this example?#

Before we dive into the workflow definition, let's take a look at what's happening in this example. As you may imagine, when we say "transfer funds from a ledger account to a Stripe Connect account", we don't mean that funds are actually being teleported from our own ledger account to our Stripe Connect account balance. Instead, we'll be doing two things:

  1. Recycle the funds we previously introduced in the ledger by transferring them to the @world account
  2. Transfer the funds from our main Stripe balance to the target Stripe Connect account

Ledger transaction (top flow) and Stripe Connect transfer (bottom flow) orchestrated by Flows

The Flows service will be taking care of the sequencing for us.

Prerequisites
Stripe connector installed
A ledger account provisioned with funds
A formanceAccountID metadata key set on the account, corresponding to the Stripe Connect account to transfer funds to

Workflow definition#

Unceremoniously, here's the workflow definition we'll be using in this example:

YAML
---
name: "ledger-to-stripe-payout-demo"
stages:
  - send:
      source:
        account:
          id: "payouts:1234"
          ledger: "flows-demo-001"
      destination:
        payment:
          psp: "stripe"
      amount:
        amount: "${amount.amount}"
        asset: "${amount.asset}"
Payment to WalletTriggers
On This Page
  • What's happening in this example?
  • Workflow definition