← Back to all products
$39
Payment Reconciliation Toolkit
Multi-gateway payment reconciliation scripts, refund tracking, dispute management, and financial reporting automation.
MarkdownPythonSQL
📄 Product Preview
Try the interactive reader and demo tools below, or get the full product with all content unlocked.
📖 Interactive Reader (Free Preview) ⚙ Try Demo Tools 📦 Download Free Sample📁 File Structure 24 files
payment-reconciliation-toolkit/
├── LICENSE
├── README.md
├── data/
│ ├── orders_sample.csv
│ ├── paypal_settlement_sample.csv
│ └── stripe_settlement_sample.csv
├── free-sample.zip
├── guide/
│ ├── 01-overview.md
│ ├── 02-multi-gateway-reconciliation.md
│ └── 03-refund-and-dispute-management.md
├── guides/
│ └── reconciliation-guide.md
├── index.html
├── sql/
│ └── schema.sql
├── src/
│ ├── __init__.py
│ ├── adapters/
│ │ ├── __init__.py
│ │ ├── paypal_parser.py
│ │ └── stripe_parser.py
│ ├── config.py
│ ├── dispute_manager.py
│ ├── financial_reporter.py
│ ├── gateway_adapter.py
│ ├── models.py
│ ├── reconciliation_engine.py
│ └── refund_tracker.py
└── tests/
└── test_reconciliation.py
📖 Documentation Preview README excerpt
Payment Reconciliation Toolkit
Match gateway payouts to orders, track refunds, manage disputes, and generate financial reports -- all from Python scripts that parse real settlement file formats.
Every payment gateway settles on its own schedule with its own file format. This toolkit parses settlement exports from Stripe and PayPal, matches them to your order records, flags discrepancies, tracks refunds through their lifecycle, and produces reconciliation reports ready for your accountant.
What You Get
- Reconciliation engine that matches gateway settlement line items to internal order records using configurable matching strategies (exact, fuzzy amount, date-window)
- Gateway parsers for Stripe and PayPal settlement/payout file formats (CSV-based), with an abstract adapter for adding more gateways
- Refund tracker that follows refunds from initiation through gateway confirmation, detecting stuck and partial refunds
- Dispute & chargeback manager with lifecycle tracking, response deadline monitoring, and win/loss analytics
- Financial report generator producing reconciliation summaries, aging reports, fee analysis, and daily settlement breakdowns
- SQL schema for storing reconciliation data in any relational database
- Sample settlement files with realistic transaction data for testing
- Comprehensive test suite covering the matching engine, parsers, and edge cases
File Tree
payment-reconciliation-toolkit/
├── README.md
├── LICENSE
├── src/
│ ├── __init__.py
│ ├── models.py # Data models (Transaction, Settlement, Dispute, etc.)
│ ├── reconciliation_engine.py # Core matching engine
│ ├── gateway_adapter.py # Abstract gateway parser interface
│ ├── refund_tracker.py # Refund lifecycle tracking
│ ├── dispute_manager.py # Dispute/chargeback management
│ ├── financial_reporter.py # Report generation (CSV, summary)
│ ├── config.py # Configuration loader
│ └── adapters/
│ ├── __init__.py
│ ├── stripe_parser.py # Stripe payout/balance CSV parser
│ └── paypal_parser.py # PayPal settlement CSV parser
├── sql/
│ └── schema.sql # Reconciliation database schema
├── data/
│ ├── stripe_settlement_sample.csv # Sample Stripe payout data
│ ├── paypal_settlement_sample.csv # Sample PayPal settlement data
│ └── orders_sample.csv # Sample internal order records
├── tests/
│ └── test_reconciliation.py # Unit tests
└── guides/
└── reconciliation-guide.md # Setup & usage walkthrough
Quick Start
1. Parse a Settlement File
from src.adapters.stripe_parser import StripeParser
parser = StripeParser()
settlements = parser.parse_file("data/stripe_settlement_sample.csv")
*... continues with setup instructions, usage examples, and more.*
📄 Code Sample .py preview
src/config.py
"""
Configuration for the payment reconciliation toolkit.
Provides typed access to reconciliation settings. Can load from
environment variables or be constructed programmatically.
"""
from __future__ import annotations
import os
from dataclasses import dataclass
@dataclass
class ReconConfig:
"""Reconciliation engine configuration.
Load from environment variables with from_env(), or construct
directly for programmatic use.
"""
# Matching strategy: "exact_id", "amount_date", "fuzzy_amount", "date_window"
match_strategy: str = "exact_id"
# Tolerance for fuzzy amount matching (0.02 = 2%)
fuzzy_tolerance_pct: float = 0.02
# Days to expand date matching window
date_window_days: int = 3
# Days before a pending refund is flagged as stuck
refund_stale_days: int = 14
# Days before deadline to flag a dispute as urgent
dispute_warning_days: int = 5
# Default currency for reports
currency: str = "USD"
# Whether Stripe amounts are in cents (smallest unit)
stripe_amounts_in_cents: bool = True
# Output directory for generated reports
output_dir: str = "output"
# Log level
log_level: str = "INFO"
@classmethod
def from_env(cls) -> ReconConfig:
"""Load configuration from environment variables.
# ... 26 more lines ...