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
To initiate a transfer from a ledger account to a Stripe Connect account, you must have set the
stripeConnectID metadata key on the ledger account metadata to identify 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:
- Recycle the funds we previously introduced in the ledger by transferring them to the
- Transfer the funds from our main Stripe balance to the target Stripe Connect account
The Flows service will be taking care of the sequencing for us.
Prior to creating and executing this workflow, you'll need to have the following:
- The Stripe connector set up and configured with a write-able API key
- A ledger account provisioned with funds,
- and a
stripeConnectIDmetadata key set on it - corresponding to the Stripe Connect account you want to transfer funds to
Unceremoniously, here's the workflow definition we'll be using in this example: