Skip to content

merkle-pay/merkle-pay

Repository files navigation

Merkle Pay

License: MIT


English 简体中文 繁體中文 日本語 한국어


Accept stablecoin payments on Solana, Base, SUI, Polygon, Arbitrum, Optimism and more with ease—built for creators, indie hackers, and small businesses.

Merkle Pay is a non-custodial web platform enabling users to quickly set up payment pages for receiving stablecoins like USDT and USDC directly to their own wallets on multiple blockchains.

Leveraging native blockchain payment standards (like Solana Pay and EIP-681), it offers fast transactions, extremely low network fees (on supported chains), and a smooth user experience.

Merkle Pay is fully open-source under the MIT license.


Supported Blockchains & Status

Merkle Pay aims to provide a seamless payment experience across high-throughput, low-fee networks:

  • Solana (Live & Fully Supported)
    • Native SOL, USDC, USDT payments confirmed.
  • Base (Next Focus - In Progress)
    • EVM integration using EIP-681 is actively being developed.
  • Polygon PoS (Planned)
  • Arbitrum One (Planned)
  • Optimism (Planned)
  • ◻️ Sui (Future Consideration)

(Support for additional chains may be added based on development progress and community demand.)


Supported Wallets & Interaction Methods

Wallet compatibility ensures a smooth payment experience for your customers.

Solana:

  • Phantom: Supports all interaction methods:
    • QR Code Scanning (via Solana Pay)
    • Desktop Browser Extension Invocation
    • Mobile Deeplinking / Universal Links
  • Solflare: Supports all interaction methods:
    • QR Code Scanning (via Solana Pay)
    • Desktop Browser Extension Invocation
    • Mobile Deeplinking / Universal Links
  • Other Solana Wallets: Wallets implementing the Solana Pay standard should be compatible with QR code scanning. Deeplinking and extension support may vary.

EVM (Base, Polygon, Arbitrum, Optimism - Coming Soon):

  • Target wallets include MetaMask, Rabby, Phantom (EVM), Coinbase Wallet, and others supporting the EIP-681 payment request standard via QR code scanning or link handling.

Features

  • Multi-Chain Ready: Fully functional on Solana; EVM support (Base first, then others) in active development.
  • Instant Setup: Enter your wallet address(es) and business name—get a payment page ready in minutes.
  • Non-Custodial: Payments go directly from the payer's wallet to your specified wallet address. Merkle Pay never holds your funds.
  • Comprehensive Solana Payments:
    • Scan QR Code (Solana Pay Protocol) via Phantom and Solflare
    • Phantom wallet chrome extension connect and send transaction
    • Phantom app deeplink connect and send transaction
  • EIP-681 Standard for EVM: Generates standard ethereum: payment URIs/QR codes for EVM chains (Base, Polygon, etc.) compatible with major wallets.
  • Robust Off-Chain Tracking: Links merchant orderIds to confirmed blockchain transactions (txHash) via backend monitoring and stores the relationship securely in your PostgreSQL database.
  • Unique Payment Disambiguation: Uses amount randomization (the "cents trick") for EVM payments and leverages Solana Pay's reference mechanism to reliably distinguish between potentially simultaneous payments, ensuring accurate mapping in the database.
  • Stablecoin Focus: Designed primarily for USDT, USDC, and native chain assets (like SOL) on supported chains.
  • Open-Source & Self-Hostable: Deploy using Docker or manually deploy to platforms like Vercel.
  • Modern UI: Built with Shadcn/UI and Radix UI components for a clean, accessible interface using TailwindCSS.

Getting Started

Prerequisites for LOCAL DEVELOPMENT

  • Node.js: v22+ recommended
  • PNPM: v10.6.4
  • PostgreSQL: A running instance (local or hosted)
  • Web3 Wallet:
    • Solana: Phantom, Solflare, etc. (ensure you have devnet SOL/tokens for testing)
    • EVM (Base/Polygon/etc.): MetaMask or similar (once EVM support is added)
    • Sui: (once Sui support is added)

Why PostgreSQL?

  • Data Integrity: Relational structure and constraints (like Foreign Keys) ensure data consistency, crucial for linking payments to merchants accurately across different chains.
  • Transactional Reliability (ACID): Guarantees that operations (like updating payment status) complete fully or not at all, vital for financial applications.
  • Structured Querying: SQL provides powerful and standard ways to query and analyze payment data as the platform grows.
  • Mature Ecosystem: Excellent tooling and database support (e.g., node-postgres) in the Node.js/TypeScript ecosystem.

Installation & Setup for LOCAL DEVELOPMENT

  1. Clone the Repository

    git clone https://github.com/merkle-pay/merkle-pay.git
    cd merkle-pay
  2. Install Dependencies (Recommended to use make)

    make i
  3. Configure Environment Variables

    cp .example .env
  4. Database Setup & Migration

    # Apply migrations to database
    make migrate-up
  5. Run Locally

    make dev

Deployment for PRODUCTION

  1. Install docker

    curl -fsSL https://get.docker.com -o get-docker.sh
    sh get-docker.sh
  2. Clone the Repository

    git clone https://github.com/merkle-pay/merkle-pay.git
    cd merkle-pay
  3. Configure Environment Variables

    cp .env.example .env
  4. Build & Run with Docker Compose

    make d-up
  5. Recreate everything after git pull

     # when you pull the lastest version of merkle-pay project
     # you need to re-create everything
    
     # step1. remove everything, and get back to a completely clean slate
    make d-clean
     # step2. re-create everything, starting fresh
    make d-up

Contributing

  • PRs and Issues are warmly welcomed!
  • Focus areas include EVM chain integrations, UI improvements, and additional wallet support.

License

Merkle Pay is licensed under the MIT License.