Central orchestration layer managing payment flows, database operations, and smart contract interactions.
Stores invoice details (token type, amounts, status) and manages merchant custodial wallet information.
- Node.js (v18 or higher)
- npm or yarn
- PostgreSQL database
- Access to Base Sepolia testnet
- Clone the repository
git clone <repository-url>
cd payneu-api- Install dependencies
npm install- Set up environment variables
cp .env.example .env-
Configure your
.envfile with:DATABASE_URL: Your PostgreSQL connection stringRPC_URL: Base Sepolia RPC endpoint (default: https://sepolia.base.org)PAYMENT_CONTRACT: Deployed payment contract addressSETTLEMENT_CONTRACT: Deployed settlement contract addressCLOB_API: Central Limit Order Book API endpoint- Wallet credentials for admin and LP operations
- Token addresses for testing
-
Run database migrations
npx prisma migrate dev- Start the development server
npm run start:dev- mUSD:
0x35435120c2cf51f7f122f2b37bda3bbc686831de - Bazed Token:
0x8ec7d893f57b6a7c837bc93cfb4c01b80f58ba6b
- mUSD - Mock USD (stable coin representation)
- BAZED - An ERC-20 token that is tradeable to stable coin
- NEU - Platform token that is meant to be distributed as rewards
- Merchant: Creates an invoice (amount, stableCoin)
- AutoPay: When enabled, checks if payer's wallet contains enough assets to be converted to the stable coin that merchant wants to receive
- Settlement: Processes payment and updates invoice status
- Notification: Confirms transaction completion to all parties
Once the server is running, access the Swagger API documentation at:
http://localhost:3000/doc
| Variable | Description |
|---|---|
DATABASE_URL |
PostgreSQL connection string |
CLOB_API |
Central Limit Order Book API endpoint |
PAYMENT_CONTRACT |
Payment smart contract address |
SETTLEMENT_CONTRACT |
Settlement smart contract address |
RPC_URL |
Base Sepolia RPC endpoint |
PUBKEY_ADMIN |
Admin wallet public key |
WALLET_ADMIN |
Admin wallet private key |
WALLET_PAYER |
Payer wallet private key |
PUBKEY_BAZED_LP |
Bazed LP wallet public key |
WALLET_BAZED_LP |
Bazed LP wallet private key |
TOKEN_BAZED |
Bazed token contract address |
TOKEN_MUSD |
mUSD token contract address |
Built by @sleepbuildrun
Copyright 2025 PayNeu. All rights reserved.