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.
Automated funding is only available for processing accounts. Customer and generic accounts use paying transactions exclusively and do not have funding transactions.
Prerequisites
Before configuring automated funding, it's helpful to learn about the following topics.
Learn about default payment methods
Understand how to configure default payment methods for funding operations on processing accounts, which determines which payment methods are used for automated funding.
Learn about transaction types
Understand the difference between paying and funding transactions, and how paying transactions trigger automated funding.
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
- A customer initiates a payment transaction to pay an invoice
- The payment is processed using the customer's default payment method (or specified method)
- Payload automatically creates a deposit funding transaction on the processing account receiving the payment
- The deposit uses the processing account's default funding payment method (or specified method)
- Funds are transferred to the processing account's bank account
Payout Flow Example
- A processing account initiates a payout transaction to send funds to a customer
- Payload automatically creates a withdraw funding transaction on the processing account sending the payout
- The withdraw pulls funds from the processing account's default funding payment method
- The payout is sent to the customer using their default payout method (or specified method)
- Funds are transferred to the customer's account
Automatic Creation: Funding transactions are created automatically by the system. You
typically never create funding transactions directly via the API. Instead, you create paying
transactions, which trigger the corresponding funding transactions. The exception is when the
funding style is set to manual, which allows advanced control over funding—this is for
advanced use only.
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
Required Configuration: If no payment method with funding defaults is configured on the processing account, automated funding transactions will fail. Ensure you have a default funding payment method set up before processing payments or payouts.
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.
Default Style: The funding style is typically set during processing account onboarding and can be modified via the Processing Settings API. This setting applies globally to all automated funding transactions for the processing account.
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
Administrator Only: The funding delay at the processing settings level is typically read-only and requires administrator permissions to modify. This ensures consistent funding behavior across all transactions.
Viewing Processing Settings
You can retrieve your processing settings to view the current funding configuration:
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
Availability: Rapid and instant funding are only available in certain circumstances and may require specific account settings or incur additional fees. Standard timing is the default and is available for all processing accounts.
Create a payment with standard funding
Process a payment transaction that uses standard funding timing for the processing account.
This example creates a payment transaction with:
-
type='payment'initiates a payment collection -
sender.account_idspecifies 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.
This example creates a payment with:
-
type='payment'initiates the payment collection -
sender.account_idspecifies 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.
This example creates a payment with:
-
type='payment'initiates the payment collection -
sender.account_idspecifies the customer being charged -
funding_delay=3delays 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.
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.
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
Funding Override: For payments, set receiver.method_id to override the funding method
(processing account receives). For payouts, set sender.method_id to override the funding
method (processing account sends). These settings control the automated funding transaction,
not the customer's payment method.
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:
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)
Multiple Triggers: You can create separate webhooks for different events. For complete
automated funding monitoring, consider subscribing to both deposit (for specific deposit
funding events) and processed (for all transaction completions).
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", 200Webhook Configuration: Create webhooks for the specific triggers you want to monitor. Set
trigger='deposit' to monitor deposit funding events, or trigger='processed' to monitor all
completed transactions including automated funding. See the Webhook
Guide for details on setting up webhooks.
Querying Funding Transactions
You can query funding transactions using the Transactions API by filtering for transaction types
deposit and withdraw:
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
transfersarray containing Transfer objects - Each Transfer has a
transaction_idlinking to the paying transaction - Each Transfer has an
assoc_transaction_idlinking to the associated funding transaction - Query the
transfersrelationship 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_timingstandard, instant, rapidfunding_delaysenderaccountAccountaccount_id ID of Account^acct_[A-Za-z0-9]+$methodPaymentMethodmethod_id ID of PaymentMethod^pm_[A-Za-z0-9]+$receiveraccountAccountaccount_id ID of Account^acct_[A-Za-z0-9]+$methodPaymentMethodmethod_id ID of PaymentMethod^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.