Skip to content

Auto-Funding Guide

Configure automatic balance top-ups to ensure you always have funds available for payouts.

How It Works

When your available balance drops below a configured threshold, PayStream automatically initiates a funding transfer from your linked bank account.

Balance drops below threshold → Auto-funding triggers → Transfer initiated → Balance restored

Setup

First, connect a bank account. Using Plaid for instant verification:

bash
curl -X POST https://api.paystream.fi/api/v1/balance/funding-sources \
  -H "Authorization: Bearer psk_test_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "plaidProcessorToken": "processor-sandbox-xxxxxx",
    "plaidAccountId": "account-sandbox-xxxxxx",
    "accountHolderName": "Acme Corp"
  }'

2. Configure Auto-Funding

bash
curl -X POST https://api.paystream.fi/api/v1/balance/auto-funding/config \
  -H "Authorization: Bearer psk_test_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true,
    "lowBalanceThreshold": 50000,
    "fundingAmount": 200000,
    "fundingMethod": "ach_debit"
  }'

This configuration will:

  • Trigger when balance drops below $500.00
  • Automatically fund $2,000.00 via ACH debit

Funding Methods

MethodSpeedCostBest For
ach_debit2-3 business daysFreeRegular top-ups
rtp~30 seconds~$0.50Urgent funding needs

Confirmation Threshold

For large transfers, require approval via magic-link email:

bash
curl -X POST https://api.paystream.fi/api/v1/balance/auto-funding/config \
  -H "Authorization: Bearer psk_test_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true,
    "lowBalanceThreshold": 50000,
    "fundingAmount": 200000,
    "fundingMethod": "ach_debit",
    "confirmationThreshold": 500000
  }'

With this config, any auto-funding over $5,000.00 sends a confirmation email instead of processing immediately. The team admin clicks the magic link to approve.

Monitoring

Check your current auto-funding configuration:

bash
curl -X GET https://api.paystream.fi/api/v1/balance/auto-funding/config \
  -H "Authorization: Bearer psk_test_xxx"

View funding transaction history:

bash
curl -X GET https://api.paystream.fi/api/v1/funding/transactions \
  -H "Authorization: Bearer psk_test_xxx"

Funding Statuses

StatusDescription
reservedFunds reserved, awaiting processing
awaiting_confirmationLarge transfer pending email approval
pendingSubmitted to payment network
in_transitProcessing through banking system
completedFunds received
failedTransfer failed

Next Steps

Released under the MIT License.