Skip to content

feat(docs): document merchant refund reserve functions (fixes #828) - #865

Merged
fati-Onchain merged 1 commit into
Facil-Pay:mainfrom
tech-adrian:feat/761-763-824-828
Oct 23, 2026
Merged

fati-Onchain merged 1 commit into
Facil-Pay:mainfrom
tech-adrian:feat/761-763-824-828

Conversation

@tech-adrian

Copy link
Copy Markdown
Contributor

PR: Refund Reserve Documentation

Summary

This PR implements comprehensive documentation for the merchant refund reserve functionality in the payment contracts, addressing issue #828. The refund reserve system is a critical component for managing merchant funds and ensuring payment reliability, but it was previously undocumented.

Changes Made

Documentation Updates

  • File: contracts/refund/README.md
  • Added: New "Refund Reserve" section (71 lines) covering:
    • Purpose: Explains the role of the refund reserve in protecting customers and managing merchant funds
    • Who can deposit and withdraw: Documents deposit_refund_reserve() and withdraw_refund_reserve() functions with access control details
    • Minimum-reserve enforcement: Covers set_min_refund_reserve() and get_min_refund_reserve() functions and how minimum thresholds are enforced
    • Query functions: Documents get_refund_reserve() and has_refund_reserve() for checking reserve status
    • Events: Documents all related events emitted during reserve operations
    • Error codes: Lists specific errors that can occur during reserve operations
    • Interaction with process_refund: Explains how the reserve integrates with the main refund processing flow

Issues Closed

This PR closes the following issues:

Testing Notes

No automated tests were added for this documentation-only change. Manual verification confirms:

  • All six refund reserve functions are documented
  • Documentation is consistent with existing README structure and style
  • Examples and error cases are clearly explained
  • Access control and enforcement mechanisms are clearly described

Merge Checklist

  • Documentation is clear and complete
  • All six functions are documented (deposit_refund_reserve, withdraw_refund_reserve, set_min_refund_reserve, get_refund_reserve, get_min_refund_reserve, has_refund_reserve)
  • Events section includes refund reserve events
  • Error codes are documented
  • Integration with process_refund is explained
  • Changes follow existing README conventions

Related Issues: #828, #761, #763, #824
Branch: feat/761-763-824-828

@fati-Onchain
fati-Onchain merged commit 4140067 into Facil-Pay:main Oct 23, 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

2 participants