Skip to content

Latest commit

Β 

History

History
127 lines (91 loc) Β· 4.14 KB

File metadata and controls

127 lines (91 loc) Β· 4.14 KB

LancePay πŸ’Έ

Instant international payments for Nigerian freelancers β€” powered by Stellar and stablecoins.

LancePay enables freelancers to receive payments from global clients in minutes, not days, with fees under 1%. Blockchain complexity is completely abstracted β€” users see invoices, balances, and bank withdrawals, nothing else.


🎯 What We're Building

A fintech platform that solves the biggest pain point for Nigerian freelancers: receiving international payments quickly and cheaply.

The Problem

  • Traditional payment methods (PayPal, Wise) have high fees (5-10%) and slow settlement (3-7 days)
  • Nigerian freelancers lose significant portions of their earnings to fees and exchange rate markups
  • Crypto solutions are too complex for non-technical users

Our Solution

  • Create invoice β†’ Get shareable payment link
  • Client pays β†’ Card payment converts to USDC on Stellar
  • Instant settlement β†’ Funds arrive in 3-5 seconds
  • Withdraw to bank β†’ Convert to NGN via Yellow Card, instant bank transfer
  • Keep 99%+ of earnings β†’ Fees under 1%

Zero crypto knowledge required β€” users never see wallets, private keys, or blockchain jargon.


πŸ› οΈ Tech Stack

  • Frontend: Next.js 16 (App Router), React 19, Tailwind CSS v4
  • Backend: Next.js API routes, Prisma ORM, PostgreSQL (Neon)
  • Authentication: Privy (OAuth + embedded Stellar wallets)
  • Blockchain: Stellar Network (USDC stablecoin)
  • Payments: MoonPay (on-ramp), Yellow Card (off-ramp to Nigerian banks)
  • Email: Resend

🌟 Why Stellar?

  • βœ… 3-5 second settlement with fees <$0.01
  • βœ… Yellow Card integration β€” Direct off-ramp to Nigerian banks in 20+ African countries
  • βœ… 475,000+ on/off-ramp access points worldwide
  • βœ… Battle-tested β€” Used by MoneyGram, Onafriq, and major African payment providers
  • βœ… Lower costs β€” ~$0.75 per wallet (XLM reserves) vs building custom infrastructure

πŸ“ Project Structure

β”œβ”€β”€ app/              # Next.js app router (pages & API routes)
β”œβ”€β”€ components/       # Reusable UI components
β”œβ”€β”€ lib/              # Utilities, configs, and helpers
β”œβ”€β”€ hooks/            # Custom React hooks
β”œβ”€β”€ prisma/           # Database schema and migrations
β”œβ”€β”€ docs/             # Technical documentation
└── public/           # Static assets

πŸ“– Documentation

For contributors and developers:


πŸ”„ How It Works

Payment Flow

1. Freelancer creates invoice β†’ Unique payment link generated
2. Client opens link β†’ No account needed
3. Client pays via card β†’ MoonPay converts to USDC on Stellar
4. Payment arrives β†’ Freelancer's embedded wallet (3-5 seconds)
5. Email notification β†’ Freelancer sees balance update
6. Freelancer withdraws β†’ Yellow Card converts USDC β†’ NGN
7. Funds arrive β†’ Nigerian bank account (instant)

Technical Flow

Client Card Payment
    ↓
MoonPay (Fiat β†’ USDC on Stellar)
    ↓
Freelancer's Stellar Wallet (Privy embedded)
    ↓
Yellow Card API (USDC β†’ NGN)
    ↓
Nigerian Bank Account

Key Benefits:

  • Freelancers keep 99%+ of earnings (fees <1%)
  • Payments arrive in minutes, not days
  • No crypto knowledge required β€” just invoices and bank transfers

πŸ“„ License

This project is proprietary. All rights reserved.


Built with ❀️ for Nigerian freelancers.


πŸ•°οΈ Cron Jobs

This project uses Vercel Cron Jobs to automate maintenance tasks.

Auto-Cancellation of Overdue Invoices: Runs daily at 2:00 AM UTC (0 2 * * *). It automatically cancels unpaid invoices that meet the following criteria:

  • Status: Pending
  • Due Date: More than 90 days ago
  • Exclusions: Invoices with active escrow, active disputes, or doNotAutoCancel: true are never auto-cancelled.

To manually test the auto-cancellation cron locally, run:

curl -H "Authorization: Bearer YOUR_CRON_SECRET" http://localhost:3000/api/cron/cancel-overdue-invoices