Skip to content

docs: document refund reason codes and their usage in request_refund … - #515

Merged
fati-Onchain merged 2 commits into
Facil-Pay:mainfrom
A-one-tech:docs/refund-reason-code-guide
Jul 30, 2026
Merged

docs: document refund reason codes and their usage in request_refund …#515
fati-Onchain merged 2 commits into
Facil-Pay:mainfrom
A-one-tech:docs/refund-reason-code-guide

Conversation

@A-one-tech

Copy link
Copy Markdown

#Closes
#440

PR Description
📌 Title
docs(refund): add description table for RefundReasonCode variants

📝 Summary
This PR updates the refund contract documentation to include a comprehensive breakdown of all canonical RefundReasonCode variants (ProductDefect, NonDelivery, DuplicateCharge, Unauthorized, CustomerRequest, Other). It explains the description and intended scenario for each variant used in request_refund(), structured analytics (get_reason_code_analytics()), and reason filtering (get_refunds_by_reason_code()).

🎯 Acceptance Criteria Addressed
Added a table of RefundReasonCode variants with descriptions and target scenarios to

contracts/refund/README.md
.
🛠️ Key Changes
contracts/refund/README.md
Added the ## 🏷️ Refund Reason Codes section containing a reference table for all RefundReasonCode enum variants:
ProductDefect: Items delivered broken, malfunctioning, or not as described.
NonDelivery: Unfulfilled items, lost packages, or failed service delivery.
DuplicateCharge: Multiple debits caused by double-submit or payment gateway errors.
Unauthorized: Fraudulent charges or account takeover without consent.
CustomerRequest: Voluntary return or cancellation within allowed merchant policies.
Other: Fallback for custom merchant flows, uncategorized reasons, or historical backfills.
🔗 Related Resources
Branch: docs/refund-reason-code-guide
Documentation:

contracts/refund/README.md

@fati-Onchain
fati-Onchain merged commit 984a66f into Facil-Pay:main Jul 30, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants