Configure auto-transfers
Move money between funding accounts automatically on a balance threshold or schedule.
Goal
Create a rule that automatically transfers funds — either internally between two of your linked accounts, or externally out to a sweep account — when either a balance threshold is crossed or a fixed schedule fires. Useful for keeping a payout-funding account topped up, or sweeping excess balance to a treasury account daily.
Prerequisites
- Two linked bank accounts: a source (debited) and a destination (credited). For external transfers the destination must be reachable on ACH or wire.
- API key with Treasury enabled.
Implementation
1. Pick a rule type
rule_type | When the rule fires |
|---|---|
balance_threshold | The source account's balance crosses the configured amount. |
schedule | A cron-like schedule fires (daily, weekly, monthly). |
2. Create the rule
Balance-threshold example — top up the payout account when it dips below $5k:
const { data: rule } = await client.createAutoTransferRule({
rule_type: "balance_threshold",
trigger_condition: {
threshold_cents: 500_000, // $5,000
direction: "below",
},
transfer_amount: 1_000_000, // $10,000 top-up
transfer_type: "internal",
source_account_id: "ba_treasury…",
destination_account_id: "ba_payouts…",
});Schedule example — sweep $20k daily at 5pm UTC:
await client.createAutoTransferRule({
rule_type: "schedule",
trigger_condition: {
cron: "0 17 * * *",
timezone: "UTC",
},
transfer_amount: 2_000_000,
transfer_type: "external",
source_account_id: "ba_payouts…",
destination_account_id: "ba_corp_treasury…",
});The endpoint is POST /treasury/auto-transfer-rules. trigger_condition is
a free-form object whose required keys depend on rule_type — start with
the shapes above.
3. Manage the rule
const { data: rules } = await client.listAutoTransferRules();
await client.updateAutoTransferRule(rule.id, { transfer_amount: 1_500_000 });
await client.deleteAutoTransferRule(rule.id);4. Observe what fired
Each rule execution creates a transaction visible in
client.listTransactions() tagged with the rule that produced it. The same
settlement.created webhook fires when the resulting transfer settles.
Tradeoffs
- External transfers go through the same rails as payouts. That means ACH 1–3 days, same-day ACH same business day, RTP seconds, wire same day. The rule's trigger time is initiation, not arrival. Don't use a threshold rule with ACH to backstop a same-minute outflow.
- No built-in cooldown. If your threshold rule fires, transfers $10k,
and the source dips below threshold again before the transfer arrives,
the rule will fire a second time. Add a
cooldownfield intrigger_condition(or check via your own observability) to avoid loops. - Internal vs. external.
internaltransfers are book-only between two Easy-managed accounts and settle instantly with no rail fee.externaltransfers leave the platform and incur the standard rail fee.