A secure and efficient smart contract system for processing sBTC payments on the Stacks blockchain. This contract enables merchants to accept sBTC payments with automated fee handling, secure withdrawals, and comprehensive payment tracking.
-
🏪 Merchant Management
- Merchant registration with secure withdrawal addresses
- Customizable fee structures per merchant
- Automated payment processing and settlement
- Real-time balance tracking
-
💸 Payment Processing
- Secure payment creation and processing
- Automated fee calculations
- Payment status tracking
- Optional payment references
- Minimum payment thresholds
-
🔒 Security
- Role-based access control
- Contract pause mechanism
- Secure withdrawal system
- Comprehensive error handling
- Input validation
-
⚙️ Administration
- Configurable fee percentages
- Merchant status management
- Contract pause/unpause functionality
- Merchant-specific fee overrides
- Clarinet installed
- Basic understanding of Clarity and Stacks blockchain
- Clone the repository:
git clone https://github.com/adeshola-code/sbtc-payment-gateway.git
cd sbtc-payment-gateway- Run tests:
clarinet test;; Register as a merchant
(contract-call? .sbtc-payment register-merchant 'ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM)
;; Create a payment
(contract-call? .sbtc-payment create-payment
'ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM
u1000000
none)
;; Process a payment
(contract-call? .sbtc-payment process-pending-payment u1)For detailed documentation, please refer to the docs directory:
We welcome contributions! Please see our Contributing Guidelines for details.
Please review our Security Policy for reporting security vulnerabilities.
This project is licensed under the MIT License - see the LICENSE file for details.
Please read our Code of Conduct before contributing to this project.