
Secure-Pay is a next-generation reversible crypto payment platform built natively for the Somnia ecosystem, designed to revolutionize how users send and receive cryptocurrency using simple usernames instead of complex wallet addresses.
From a single, intuitive dashboard, users can send crypto payments using usernames with customizable expiration times, claim payments before they expire, automatically refund unclaimed payments, and track all transaction history with complete on-chain transparency. Every payment is secured by smart contract logic, ensuring funds are protected until claimed or automatically returned to the sender.
With Secure-Pay, crypto payments aren't just faster and cheaper—they're user-friendly, reversible, and built for the next generation of decentralized commerce where anyone can send crypto using simple usernames.
Resource | Resource Link |
---|---|
GitHub Repository | 🔗 View on GitHub |
Live Demo | 🔗 Open Secure-Pay |
Demo Video | 🔗 Watch on YouTube |
SomniaScan – Smart Contract | 🔗 Contract Address |
Pitch Deck | 🔗 View Presentation |
- Complex wallet addresses make sending crypto confusing and error-prone
- No way to reverse payments if sent to wrong address or unclaimed
- Poor user experience with long, complex wallet addresses
- No time-bound security for payments
- High gas fees from complex payment systems
- No automatic refunds for unclaimed payments
- Username-Based Payments – Send crypto using simple usernames instead of wallet addresses
- Reversible Payments – Payments automatically refund if not claimed within expiration time
- Time-Bound Security – Customizable expiration times (0.1-168 hours)
- Smart Contract Security – Funds secured until claimed or refunded
- On-Chain Transparency – All payments verifiable on SomniaScan
- User-Friendly Interface – Intuitive design for seamless experience
- Cross-Border, Bank-Free – Instant blockchain settlement worldwide
We're not just payments—we handle the entire reversible payment lifecycle, including deposits, claims, refunds, and expiration management, all on-chain.
Using smart contract logic, payments automatically expire and refund if not claimed within the specified timeframe, preventing lost funds.
Every payment is secured by our deployed smart contract, ensuring funds are protected and transactions are transparent.
Other tools focus only on basic transfers—Secure-Pay gives users their own secure space to track payments, manage reversible transactions, and view transaction history.
- Create Reversible Payments – Send funds with customizable expiration times
- Recipient Selection – Choose from registered users or enter wallet addresses
- Payment Tracking – Monitor payment status and expiration in real-time
- Automatic Refunds – Unclaimed payments automatically return after expiry
- Payment Dashboard – View all incoming reversible payments
- One-Click Claims – Instantly claim payments before expiration
- Status Filtering – Filter payments by status (pending, completed, expired)
- Real-Time Updates – Live countdown timers for payment expiration
- Reversible Payment Logic – Funds held securely until claimed or expired
- Automatic Refunds – Senders can reclaim funds after expiration
- Time Validation – Prevents invalid expiration timestamps
- Gas Optimization – Efficient contract design for minimal gas costs
- Next.js 15 with App Router
- TypeScript for type safety
- Tailwind CSS for modern UI/UX
- Wagmi & Viem for blockchain interactions
- RainbowKit for wallet connections
- Next.js API Routes for serverless functions
- MongoDB with Mongoose for data persistence
- RESTful APIs for payment and user management
- Solidity 0.8.20 for contract development
- Reversible Payment Pattern for secure fund management
- Time-based Logic for automatic refunds
- Gas-optimized for Somnia's low-fee environment
- Somnia Testnet for development and testing
- EVM Compatibility for seamless integration
- Real-time Transaction Monitoring for payment status updates
contract ReversiblePayments {
struct Payment {
uint256 amount;
uint256 expiry; // deadline for receiver to withdraw
bool withdrawn; // true if receiver has withdrawn
}
// Core functions:
// - depositFor(address receiver, uint256 expiryTimestamp)
// - withdrawFrom(address sender)
// - refund(address receiver)
// - viewPayment(address sender, address receiver)
}
- Deposit Funds with custom expiration timestamps
- Withdraw Payments before expiration (receiver only)
- Refund Payments after expiration (sender only)
- View Payment Details for transparency
- Gas-Efficient design for Somnia's high TPS
Secure-Pay is a flagship utility dApp that amplifies Somnia's strengths and drives ecosystem growth.
Reversible payments and automatic refunds become near-instant and cost-effective, demonstrating Somnia's scalable Layer 1 design for high-volume transactions.
Every payment, claim, and refund increases Somnia's daily active users and transaction count, boosting network health metrics that attract developers and investors.
Secure-Pay introduces reversible payments, secure commerce, and trustless transactions as new categories, broadening Somnia's ecosystem diversity and showcasing its versatility.
Individuals and businesses using Secure-Pay naturally onboard onto Somnia, expanding the user base organically through payment adoption.
Our roadmap includes AI-powered payment optimization, multi-token support, and advanced reversible payment features—all built natively on Somnia, cementing it as the go-to chain for Web3 payment infrastructure.
- Multi-Token Support – Support for various ERC-20 tokens
- Batch Payments – Send multiple reversible payments in one transaction
- Payment Templates – Save common payment configurations
- AI Payment Optimization – Automatically suggest optimal expiration times
- Payment Analytics – Detailed insights into payment patterns
- Integration APIs – Allow third-party apps to integrate reversible payments
- Multi-Signature Payments – Require multiple approvals for large payments
- Conditional Payments – Release funds based on external conditions
- Compliance Tools – Generate reports for regulatory requirements
- Node.js 18+
- MongoDB database
- Somnia testnet wallet with test tokens
- Clone the repository
git clone https://github.com/yourusername/Secure-Pay.git
cd Secure-Pay
- Install dependencies
npm install
- Set up environment variables
cp .env.example .env.local
Fill in your environment variables:
MONGODB_URI
- Your MongoDB connection stringNEXT_PUBLIC_PROJECT_ID
- Your WalletConnect project ID
- Deploy the smart contract
# Deploy to Somnia testnet
npx hardhat run scripts/deploy.js --network somnia-testnet
- Update contract address
Update the contract address in
lib/contract.js
- Run the development server
npm run dev
- Open your browser
Navigate to
http://localhost:3000
- Connect Wallet – Connect your Somnia testnet wallet




- Receive Payment – Claim incoming payments before they expire


Network | Contract Address | Explorer |
---|---|---|
Somnia Testnet | 0x0b7b80c745Ee4c47Ef0520269be086eeD7868580 |
View on SomniaScan |
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Developer: Your Name
- Contact: your.email@example.com
If you have any questions or need help, please:
- Open an issue on GitHub
- Join our Discord community
- Contact us at support@securepay.com
Built with ❤️ for the Somnia Ecosystem
Secure-Pay: Where payments meet security, transparency, and trust.