Stellar-based smart contracts for FacilPay. Secure, auditable, and transparent payment infrastructure.
FacilPay uses Soroban smart contracts on Stellar for:
- Payment Processing: Accept and lock crypto payments
- Settlement: Convert and transfer to merchants in USDC
- Escrow: Hold funds during dispute periods
- Refunds: Process customer refunds
- Rust 1.74.0 or later
- Stellar CLI (
stellarcommand) - Soroban SDK
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install Stellar CLI
cargo install --locked stellar-cli --features opt
# Add wasm target
rustup target add wasm32-unknown-unknown# From root directory
make# Test all contracts in workspace
cargo test --workspace
# Test specific contract
cargo test -p escrow
cargo test -p payment
cargo test -p refundHandles payment creation and processing:
create_payment()- Customer initiates paymentcomplete_payment()- Admin releases to merchantrefund_payment()- Admin refunds to customerget_payment()- Query payment details
Manages fund holding and disputes:
create_escrow()- Lock fundsrelease_escrow()- Release to merchantdispute_escrow()- Handle disputes
Processes refund requests:
request_refund()- Merchant initiatesapprove_refund()- Admin approvesprocess_refund()- Execute refund
- Fork the repo
- Create a feature branch (
git checkout -b feature/amazing-feature) - Write tests for your changes
- Ensure all tests pass (
cargo test --workspace) - Commit your changes (
git commit -m 'Add amazing feature') - Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request