Batch Reports
Analyze settlement batches and track deposit patterns for accurate reconciliation
Batch reports help you understand how payment transactions are grouped into deposit transactions, track settlement timing, and ensure accurate bank reconciliation. These examples demonstrate how to analyze batch composition, monitor batch performance, and identify discrepancies between expected and actual deposits. Use these patterns to maintain accurate financial records and quickly resolve reconciliation issues.
Batch reporting requires understanding the relationship between payment transactions and deposit transactions through the transfers table. Each transfer links a payment to its funding deposit, enabling you to trace which payments settled in which batch and when they hit your bank account.
Prerequisites
Before building batch reports, understand:
Report query mechanics
Master query building with select, filter, and group by.
Funding transactions
Understand how funding transactions appear on statements.
Batch Summary Report
Analyze deposit transaction batches and their composition.
What this query does
This query joins deposit transactions to their constituent payment transactions through the transfers table, grouping by deposit to show how many payments are in each batch and calculate total amounts.
Query components:
| Component | Description |
|---|---|
| Select | Deposit ID, amount, date, payment count, total payments |
| Join | Links deposits to payments through transfers |
| Group | Results by deposit transaction |
| Calculate | Batch composition and totals |
Batch Timing Analysis
Track settlement timing and identify patterns.
What this query does
This query analyzes how long payments take to settle into deposit batches by calculating the time difference between payment and deposit dates, revealing settlement timing patterns and consistency.
Query components:
| Component | Description |
|---|---|
| Select | Payment date, deposit date, time difference |
| Calculate | Days from payment to settlement |
| Group | By settlement day of week or time period |
| Analyze | Settlement timing patterns |
Batch Reconciliation
Match deposit batches to bank statement entries.
What this query does
This query retrieves deposit transactions with their amounts and dates formatted for matching against bank statement entries, enabling reconciliation by comparing expected deposits to actual bank activity.
Query components:
| Component | Description |
|---|---|
| Select | Deposit transactions with key matching fields |
| Filter | Deposits within reconciliation period |
| Match | Compare to bank statement data |
| Identify | Matched, unmatched, and discrepancies |
Batch Performance Metrics
Track batch processing efficiency and identify trends.
What this query does
This query aggregates batch metrics over time periods to track average batch sizes, batch frequency, and processing patterns, revealing trends in settlement efficiency and consistency.
Query components:
| Component | Description |
|---|---|
| Select | Batch metrics over time |
| Calculate | Batch size, frequency, processing times |
| Group | By time period (daily, weekly, monthly) |
| Analyze | Performance trends and patterns |
Best Practices
Tips for effective batch reporting.
Use the transfers table to link payments to deposits:
# Correct: Use transfers table
payment_id = 'txn_example123'
transfer = pl.Transfer.filter_by(pl.attr.transaction_id == payment_id).first()
if transfer:
deposit_id = transfer.assoc_transaction_id
deposit = pl.Transaction.get(deposit_id)Deposits may clear on different dates:
# Use est_cleared_date for bank reconciliation
deposit_id = 'txn_example123'
deposit = pl.Transaction.get(deposit_id)
internal_date = deposit.created_at
bank_date = deposit.est_cleared_date
print(f"Created: {internal_date}, Cleared: {bank_date}")Funding style affects batch structure:
Check funding style determines batch expectations:
- Netted: One deposit per period (credits - debits)
- Gross: Separate deposits for credits and debits
- Itemized: One deposit per transaction
- Manual: Funds held until releasedNext Steps
Explore related reporting topics
Revenue Reports
Analyze revenue trends and financial performance with Revenue Reports documentation, track monthly revenue trends, and calculate multi-dimensional revenue analysis across different dimensions.
Customer Analytics
Understand customer behavior and lifetime value with Customer Analytics guide, segment customers by spending patterns, and identify high-value customers for targeted retention strategies.