This chapter covers the core features and capabilities of Refund Processor.
# 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 reportFollow this guide to get Refund Processor up and running in your environment.
| Flag | Description |
|---|---|
--action, -a | Action to perform (required) |
--payment-id | Payment ID to refund |
--refund-id | Refund ID to look up |
--amount | Refund amount in cents |
--reason | Refund reason code |
--notes | Additional notes (required for 'other' reason) |
--data-dir | Data storage directory (default: ./refund_data) |
--verbose, -v | Enable debug logging |
| Code | Auto-Approve | Full Only | Description |
|---|---|---|---|
duplicate | Yes | Yes | Duplicate charge — always approve full refund |
fraudulent | Yes | Yes | Unauthorized charge — approve immediately |
customer | No | No | Customer request — subject to refund window |
not_received | Yes | Yes | Product not received |
defective | No | No | Defective product — partial or full |
sub_cancel | Yes | No | Subscription cancellation — prorated |
pricing_error | Yes | No | Pricing error — refund the difference |
other | No | No | Requires manual review and notes |
Get the full Refund Processor and unlock everything.
Get the complete guide with every chapter unlocked, including code samples, diagrams, and best practices.
Access all interactive tools with complete data, all workload profiles, and the full scenario library.
Downloadable source code, configuration files, and working examples from every chapter.
Free updates for life. Every new chapter, tool, and improvement included.