Orchestrate
Automated Funding

Automated Funding

Learn how automated funding works and how to configure funding behavior for processing accounts


Automated funding enables processing accounts to automatically receive or send funds when paying transactions are initiated on opposing accounts. When a customer makes a payment or receives a payout, corresponding funding transactions are automatically created on the processing account to complete the funds transfer.

Prerequisites

Before configuring automated funding, it's helpful to learn about the following topics.


How Automated Funding Works


When a paying transaction is created on a customer, processing account, or payment method it automatically triggers a corresponding funding transaction on the opposing processing account. This automated funding mechanism ensures that funds flow smoothly between accounts without requiring manual intervention.

Payment Flow Example

  1. A customer initiates a payment transaction to pay an invoice
  2. The payment is processed using the customer's default payment method (or specified method)
  3. Payload automatically creates a deposit funding transaction on the processing account receiving the payment
  4. The deposit uses the processing account's default funding payment method (or specified method)
  5. Funds are transferred to the processing account's bank account

Payout Flow Example

  1. A processing account initiates a payout transaction to send funds to a customer
  2. Payload automatically creates a withdraw funding transaction on the processing account sending the payout
  3. The withdraw pulls funds from the processing account's default funding payment method
  4. The payout is sent to the customer using their default payout method (or specified method)
  5. Funds are transferred to the customer's account

Default Payment Methods for Funding


Automated funding uses the payment methods configured with account_defaults.funding on the processing account. These defaults determine which payment method is used for deposit and withdraw funding transactions.

Configuring Funding Defaults

To enable automated funding, you must configure at least one payment method on your processing account with funding defaults:

  • Set account_defaults.funding='deposits' for a payment method that should receive incoming funds
  • Set account_defaults.funding='withdraws' for a payment method that should send outgoing funds
  • Set account_defaults.funding='all' for a payment method that handles both deposits and withdrawals

For detailed instructions on setting up default funding payment methods, see the Default Payment Methods guide.

Processing Settings Configuration


Processing settings control the global automated funding behavior for a processing account. These settings determine how funds are grouped and disbursed, the default funding delay, and other funding-related configurations.

Funding Style

The funding.style setting determines how automated funding transactions are grouped and disbursed to the processing account:

  • gross - All debit amounts are combined into a single deposit, and all credit amounts are combined into a separate withdraw. This provides a clear separation between incoming and outgoing funds.

  • itemized - Each transaction creates a separate funding deposit or withdraw. This provides maximum detail and allows you to trace each payment to its corresponding funding transaction.

  • netted - Debit amounts minus credit amounts are combined into a single net deposit or withdraw. This provides the cleanest bank statement with minimal transactions.

  • manual - Funds are held and not automatically disbursed. The processing account owner must manually release funds. This provides maximum control over when funds are received.

Funding Delay Setting

The funding.delay setting at the processing settings level sets the default number of days (0-10) to delay funding after transaction settlement. This delay applies to all automated funding transactions unless overridden on individual paying transactions.

For example, a delay of 2 means funds are deposited 2 business days after settlement. This setting is commonly used for:

  • Risk management and reserve requirements
  • Aligning funding with business cash flow cycles
  • Providing time for refund processing
  • Allowing for clearing time to avoid rejected bank transfer pullbacks
  • Meeting regulatory requirements

Viewing Processing Settings

You can retrieve your processing settings to view the current funding configuration:

import payload
 
pl = payload.Session('secret_key_3bW9...', api_version='v2')
 
account = pl.Account.select('*', 'processing[settings]').get(
    # Retrieve processing account with settings expanded
    'acct_processing123',
)
 
# Access funding configuration
print(account.processing['settings'])
funding_config = account.processing['settings'].funding
 
print(f"Processing Account: {account.name}")
print(f"Funding Style: {funding_config.style}")
print(f"Funding Delay: {funding_config.delay} days")
print(f"Default Currency: {funding_config.default_currency}")
print(f"Default Descriptor: {funding_config.default_descriptor}")

This returns the processing settings including the funding configuration, which shows your funding style, delay, default currency, and statement descriptor.

Controlling Funding Timing


You can control how quickly funds are moved during automated funding by configuring the funding timing settings on individual paying transactions. These settings override or complement the processing settings configuration.

Funding Timing

The funding_timing property on a paying transaction determines how quickly the processing account receives or sends funds:

  • standard - Follows normal settlement schedules (typically 1-2 business days)
  • rapid - Accelerates the funding process for faster access to funds
  • instant - Makes funds available immediately

Create a payment with standard funding

Process a payment transaction that uses standard funding timing for the processing account.

import payload
pl = payload.Session('secret_key_3bW9...', api_version='v2')
 
# Create a payment with standard funding timing
transaction = pl.Transaction.create(
    type='payment',
    amount=100.00,
    sender={
        'account_id': 'acct_customer123'
    },
    funding_timing='standard'
)
 
print(f"Payment created: {transaction.id}")
print(f"Funding timing: {transaction.funding_timing}")
print(f"Automated deposit will use standard settlement")

This example creates a payment transaction with:

  • type='payment' initiates a payment collection
  • sender.account_id specifies the customer being charged
  • funding_timing='standard' uses normal settlement schedules for the automated funding transaction

The system automatically creates a deposit funding transaction on the processing account with standard timing.

Create a payment with rapid funding

Process a payment with accelerated funding to the processing account.

import payload
pl = payload.Session('secret_key_3bW9...', api_version='v2')
 
# Create a payment with rapid funding timing
transaction = pl.Transaction.create(
    type='payment',
    amount=250.00,
    sender={
        'account_id': 'acct_customer123'
    },
    funding_timing='rapid'
)
 
print(f"Payment created: {transaction.id}")
print(f"Funding timing: {transaction.funding_timing}")
print(f"Automated deposit will use rapid funding for faster access")

This example creates a payment with:

  • type='payment' initiates the payment collection
  • sender.account_id specifies the customer being charged
  • funding_timing='rapid' accelerates funding to the processing account

The automated deposit funding transaction will use rapid timing to make funds available faster.

Create a payment with delayed funding

Process a payment but delay the funding settlement for a specified number of days.

import payload
pl = payload.Session('secret_key_3bW9...', api_version='v2')
 
# Create a payment with delayed funding settlement
transaction = pl.Transaction.create(
    type='payment',
    amount=500.00,
    sender={
        'account_id': 'acct_customer123'
    },
    funding_delay=3
)
 
print(f"Payment created: {transaction.id}")
print(f"Funding delay: {transaction.funding_delay} days")
print(f"Automated deposit will be held for {transaction.funding_delay} days")

This example creates a payment with:

  • type='payment' initiates the payment collection
  • sender.account_id specifies the customer being charged
  • funding_delay=3 delays the funding settlement by 3 days

The automated funding transaction will be held for 3 days before funds are deposited to the processing account's payment method. This is read-only and typically set based on processing account settings.

Overriding Default Payment Methods


While automated funding normally uses the default payment methods configured on accounts, you can override these defaults for specific transactions by explicitly specifying the method_id in the transaction's sender or receiver properties.

When to Override Defaults

Override default payment methods when you need to:

  • Use a specific bank account for a high-value transaction
  • Route funds to a different payment method for accounting purposes
  • Split payments across multiple payment methods
  • Handle exceptions to normal payment routing rules

Overriding Funding Method for Payments

For payment transactions where a processing account receives funds, you can override the default funding method by setting receiver.method_id. This controls which payment method on the processing account receives the deposit.

import payload
 
pl = payload.Session('secret_key_3bW9...', api_version='v2')
 
# Create a payment with a specific receiver funding method
transaction = pl.Transaction.create(
    type='payment',
    amount=200.00,
    sender={'account_id': 'acct_customer123'},
    receiver={
        'account_id': 'acct_processing456',
        'method_id': 'pm_funding456',  # Override default funding method
    },
)
 
print(f"Payment created: {transaction.id}")
print(f"Using receiver funding method: {transaction.receiver['method_id']}")
print(f"Automated deposit uses specified funding method instead of default")

In this example:

  • A payment transaction is created with the processing account as the receiver
  • receiver.method_id='pm_funding456' overrides the processing account's default funding method
  • The automated deposit funding transaction uses the specified method instead of the default

Overriding Funding Method for Payouts

For payout transactions where a processing account sends funds, you can override the default funding method by setting sender.method_id. This controls which payment method on the processing account is used to withdraw the funds.

import payload
 
pl = payload.Session('secret_key_3bW9...', api_version='v2')
 
# Create a payout with a specific sender funding method
transaction = pl.Transaction.create(
    type='payout',
    amount=150.00,
    sender={
        'account_id': 'acct_processing123',
        'method_id': 'pm_funding123',  # Override default funding method
    },
    receiver={'account_id': 'acct_customer456'},
)
 
print(f"Payout created: {transaction.id}")
print(f"Using sender funding method: {transaction.sender['method_id']}")
print(f"Automated withdraw uses specified funding method instead of default")

In this example:

  • A payout transaction is created with the processing account as the sender
  • sender.method_id='pm_funding123' overrides the processing account's default funding method
  • The automated withdraw funding transaction pulls funds from the specified method instead of the default

Overriding Both Sender and Receiver

You can override both the sender and receiver payment methods in a single transaction for complete control over payment routing:

import payload
 
pl = payload.Session('secret_key_3bW9...', api_version='v2')
 
# Create a payment with both sender and receiver methods specified
transaction = pl.Transaction.create(
    type='payment',
    amount=300.00,
    sender={
        'account_id': 'acct_customer123',
        'method_id': 'pm_customer789',  # Override sender default
    },
    receiver={
        'account_id': 'acct_processing456',
        'method_id': 'pm_funding987',  # Override receiver funding default
    },
)
 
print(f"Payment created: {transaction.id}")
print(f"Sender method: {transaction.sender['method_id']}")
print(f"Receiver method: {transaction.receiver['method_id']}")
print(f"Full control over payment routing")

This gives you full control over both the paying transaction and the automated funding transaction payment methods.

Monitoring Automated Funding Events


Automated funding transactions are separate transaction objects that can be monitored and tracked through webhooks and API queries.

Webhook Events

Subscribe to webhooks to receive notifications when automated funding transactions are created and processed. The following webhook triggers are relevant for monitoring automated funding:

  • deposit - Triggered specifically when a deposit funding transaction is created (most common for monitoring automated funding from payments)
  • processed - Triggered when any transaction, including funding transactions, completes successfully
  • decline - Triggered if a transaction fails, including funding transactions
  • payment - Triggered when a payment transaction is created (the paying transaction that triggers automated funding)

Example webhook handler for deposit funding events:

from flask import Flask, request
 
app = Flask(__name__)
 
@app.route("/webhooks/payload", methods=["POST"])
def handle_webhook():
    webhook = request.json
 
    # Handle deposit funding transactions specifically
    if webhook["trigger"] == "deposit":
        transaction_id = webhook["triggered_on"]["id"]
 
        # Query the API to get full transaction details
        transaction = pl.Transaction.get(transaction_id)
 
        print("Deposit funding transaction created:", transaction.id)
        print("Amount:", transaction.amount)
        print("Funding timing:", transaction.funding_timing)
        print("Processing account:", transaction.receiver["account_id"])
 
    # Handle all processed transactions
    if webhook["trigger"] == "processed":
        transaction_id = webhook["triggered_on"]["id"]
 
        # Query the API to get full transaction details
        transaction = pl.Transaction.get(transaction_id)
 
        # Check if this is a funding transaction
        if transaction.type in ("deposit", "withdraw"):
            print("Funding transaction completed:", transaction.id)
            print("Status:", transaction.status["value"])
 
    return "OK", 200

Querying Funding Transactions

You can query funding transactions using the Transactions API by filtering for transaction types deposit and withdraw:

import payload
 
pl = payload.Session("secret_key_3bW9...", api_version="v2")
 
# Query deposit funding transactions for a processing account
deposits = pl.Transaction.filter_by(
    type="deposit",
    receiver={"account_id": "acct_processing123"},
).all()
 
print(f"Found {len(deposits)} deposit funding transactions")
for deposit in deposits:
    print(f"  {deposit.id}: ${deposit.amount} on {deposit.created_at}")

This query retrieves all deposit funding transactions for a specific processing account, showing how much funding has been received.

Transaction Relationships

Each paying transaction is linked to its corresponding automated funding transaction through the transfers nested relationship. You can use the transaction data to understand the complete payment flow:

  • Paying transactions have a transfers array containing Transfer objects
  • Each Transfer has a transaction_id linking to the paying transaction
  • Each Transfer has an assoc_transaction_id linking to the associated funding transaction
  • Query the transfers relationship to trace funds between paying and funding transactions

Schema Reference

The following fields are particularly relevant for configuring and controlling automated funding:

Transaction Schema

Transaction-level funding controls that apply to individual paying transactions:

funding_timing
enum[string]Immutable
The funding speed for this transaction, determining how quickly the merchant or processing account receives settlement of funds. Standard timing follows normal settlement schedules, while rapid timing accelerates the funding process for faster access to funds. Defaults to standard if not specified. Rapid and instant funding only available in certain circumstances.
Values: standard, instant, rapid
funding_delay
number (double)Read-only
The number of days to delay the funding settlement for this transaction. This value determines how long to hold funds before they are deposited to the merchant or moved to the recipient account. This is typically set based on the processing account settings.
sender
object
Information about the sender party in this transaction, including the account and payment method from which funds are being sent or debited. For payment transactions, this is the account being charged. For payout transactions, this is the processing account sending funds.
accountAccount
object
The expanded account object for the sender. When included, this provides the full details of the account sending funds in this transaction.
Visibility: explicit
account_id ID of Account
stringImmutable
The unique identifier of the account sending or providing funds for this transaction. This is an optional field that references the account object that owns the sender payment method. (ID prefix: acct)
Pattern: ^acct_[A-Za-z0-9]+$
object
The expanded payment method object used by the sender. When included, this provides the full details of the payment method from which funds are being debited.
method_id ID of PaymentMethod
stringImmutable
The unique identifier of the payment method used by the sender. This references the payment method objectfrom which funds are being pulled or debited for this transaction. If not provided the account default will be used. (ID prefix: pm)
Pattern: ^pm_[A-Za-z0-9]+$
receiver
object
Information about the receiver party in this transaction, including the account and payment method to which funds are being sent or credited. For payment transactions, this is the processing account receiving funds. For payout transactions, this is the account receiving funds.
accountAccount
object
The expanded account object for the receiver. When included, this provides the full details of the account receiving funds in this transaction.
Visibility: explicit
account_id ID of Account
stringImmutable
The unique identifier of the account receiving funds for this transaction. This is an optional field that references the account object that owns the receiver payment method. (ID prefix: acct)
Pattern: ^acct_[A-Za-z0-9]+$
object
The expanded payment method object used by the receiver. When included, this provides the full details of the payment method to which funds are being credited.
method_id ID of PaymentMethod
stringImmutable
The unique identifier of the payment method used by the receiver. This references the payment method object to which funds are being sent or credited for this transaction. If not provided the account default will be used. (ID prefix: pm)
Pattern: ^pm_[A-Za-z0-9]+$

Processing Settings Schema

Processing settings-level funding configuration that applies to all automated funding for a processing account:

{
  "funding": {
    "style": "gross | itemized | netted | manual",
    "delay": 0-10,
    "default_currency": "USD | CAD",
    "default_descriptor": "Statement descriptor text"
  }
}
  • style - How funding transactions are grouped (gross, itemized, netted, or manual)
  • delay - Default number of days to delay funding (0-10)
  • default_currency - Currency for settlements (USD or CAD)
  • default_descriptor - Default statement descriptor for transactions

Next Steps

Optimize payment flows, monitor settlement, and build comprehensive reconciliation processes


Manage Payment Methods and Funding Defaults

Configure Default Payment Methods for funding operations, add payment methods with Creating Payment Methods, and modify configurations using Updating Payment Methods.

Create Transactions that Trigger Automated Funding

Process payments that trigger deposits with Creating Payment Intents, send payouts that trigger withdrawals using Creating Transfers, and understand the complete Payment Processing lifecycle.

Monitor and Reconcile Funding Transactions

Track funding and settlement with Reporting Overview, create custom funding reports using Building Report Queries, and monitor funding activity through Transaction Reports.


Related articles