What You’ll Build With This Guide
This guide equips you with patterns and code examples for:- Unified payment searches: Query charges and payouts together or separately
- Advanced filtering: Combine date ranges, amounts, statuses, and metadata for precise results
- Reconciliation workflows: Match funding events to bank statements using the funding event ID from the ACH addenda record
- Return tracking: Analyze reversed payments and identify high-risk patterns
- Export capabilities: Generate CSV and JSON reports for accounting systems
- Performance monitoring: Build real-time metrics and anomaly detection
- Pagination strategies: Efficiently process large datasets with parallel requests
Unified Payment Search
The payments search endpoint allows you to query both charges and payouts together or separately, providing a complete view of money movement through your platform.Basic Search
Search for all payments in a date range:Search Parameters
Date Filters
Payment Filters
Reference Filters
Pagination & Sorting
Common Search Patterns
Daily Settlement Report
Get all successful payments for settlement reconciliation:Failed Payment Analysis
Identify failure patterns for risk optimization:Customer Payment History
View all payments for a specific customer:Advanced Filtering
Multi-Status Search
Find payments in specific states:Amount Range Filtering
Find high-value transactions:Metadata Search
Search using your custom metadata:Reconciliation Workflows
Bank Statement Reconciliation
Match funding events to bank transactions using the funding eventid. Each funding event produces a single ACH transfer; the ACH addenda record on that transfer contains the funding event id and a description (e.g., charge deposit, payout withdrawal). Your bank surfaces this in the transaction detail, giving you a direct, programmatic link back to the Straddle API.
Return Tracking
Monitor and analyze returned payments:Export Patterns
CSV Export
Generate CSV reports for accounting:JSON Export with Details
Export complete payment data:Monitoring & Alerts
Real-Time Monitoring
Track payment metrics in real-time:Anomaly Detection
Identify unusual payment patterns:Pagination Strategies
Cursor-Based Iteration
Process large result sets efficiently:Parallel Processing
Speed up large exports with parallel requests:Performance Optimization
Efficient Date Ranges
Index-Friendly Filters
Use indexed fields for faster queries:Common Use Cases
Monthly Billing Report
Best Practices
Use Date Ranges
Always specify date ranges to improve query performance
Paginate Large Results
Use pagination for exports exceeding 100 records
Cache Frequently Used
Cache search results that don’t change frequently
Monitor Rate Limits
Implement rate limiting for bulk operations
Troubleshooting
Missing Payments
If payments aren’t appearing in search results:- Check date ranges - Ensure dates include the payment creation time
- Verify filters - Remove filters one by one to identify issues
- Check status - Some statuses like
unknownmay not appear by default - Review pagination - Check if results are on subsequent pages
Performance Issues
For slow queries:- Narrow date ranges to 30 days or less
- Use specific IDs when possible
- Avoid complex metadata queries
- Implement caching for repeated searches
Next Steps
API Reference
Complete search endpoint documentation
Webhook Events
Real-time payment notifications
Funding Search
Search and analyze funding events
Funding Events
Settlement and reconciliation