Contents

Chapter 1

Features

This chapter covers the core features and capabilities of Refund Processor.

Features

  • Full and partial refund support with balance tracking
  • 8 standardized refund reason codes with policy rules
  • Auto-approval for duplicate, fraudulent, and pricing error refunds
  • Refund policy engine (window limits, amount validation, partial refund caps)
  • Complete audit trail on every refund action
  • Payment balance adjustment and status tracking
  • Aggregate refund reporting with reason breakdowns
  • Multi-currency amount formatting (USD, EUR, GBP, JPY)
  • JSON file persistence for payments and refunds
  • Python stdlib only — zero dependencies

Quick Start

bash
# Run the full demo
python src/refund_processor.py --action demo

# Create a full refund
python src/refund_processor.py --action create --payment-id pay_001 --amount 4999 --reason duplicate

# Create a partial refund
python src/refund_processor.py --action create --payment-id pay_002 --amount 1500 --reason customer --notes "Feature not working"

# Check refund status
python src/refund_processor.py --action status --refund-id ref_abc123

# List all refunds
python src/refund_processor.py --action list

# Generate refund report
python src/refund_processor.py --action report
Chapter 2

CLI Reference

Follow this guide to get Refund Processor up and running in your environment.

CLI Reference

FlagDescription
--action, -aAction to perform (required)
--payment-idPayment ID to refund
--refund-idRefund ID to look up
--amountRefund amount in cents
--reasonRefund reason code
--notesAdditional notes (required for 'other' reason)
--data-dirData storage directory (default: ./refund_data)
--verbose, -vEnable debug logging

Refund Reasons

CodeAuto-ApproveFull OnlyDescription
duplicateYesYesDuplicate charge — always approve full refund
fraudulentYesYesUnauthorized charge — approve immediately
customerNoNoCustomer request — subject to refund window
not_receivedYesYesProduct not received
defectiveNoNoDefective product — partial or full
sub_cancelYesNoSubscription cancellation — prorated
pricing_errorYesNoPricing error — refund the difference
otherNoNoRequires manual review and notes
Chapter 3
🔒 Available in full product

Policy Rules

You’ve reached the end of the free preview

Get the full Refund Processor and unlock everything.

All Chapters

Get the complete guide with every chapter unlocked, including code samples, diagrams, and best practices.

Full Tool Suite

Access all interactive tools with complete data, all workload profiles, and the full scenario library.

Source Files

Downloadable source code, configuration files, and working examples from every chapter.

Lifetime Updates

Free updates for life. Every new chapter, tool, and improvement included.

Buy Now — $19 →
📦 Free sample included — download another copy for the full product.
Refund Processor v1.0.0 — Free Preview