Skip to content

24greyhat/xdotpay.com

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

35 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Abandoned project (fintech is too regulated for my liking but i tried!)

Transparent. Open Source. Non-Custodial.

XDotPay is a payment gateway API for accepting USDC cryptocurrency payments. We are NOT a Virtual Asset Service Provider (VASP) - we don't intercept, hold, or control funds. All payments go directly from payer to merchant's wallet.


πŸš€ Quick Start

Production API


πŸ“š What is XDotPay?

XDotPay is a SaaS platform that provides:

βœ… Non-custodial USDC payments - Funds go directly to your wallet
βœ… Complete API - Full REST API for invoice creation and payment verification
βœ… Dashboard Frontend - Next.js-based merchant dashboard
βœ… Blockchain verification - On-chain payment confirmation via Ethereum RPC
βœ… No intermediaries - Direct peer-to-peer transactions


πŸ”‘ How It Works

1. Sign Up β†’ Create a merchant account

POST https://api.xdotpay.com/api/auth/signup

2. Create Invoice β†’ Generate a payment request

POST https://api.xdotpay.com/api/v1/new/invoice

3. Customer Pays β†’ User sends USDC via MetaMask directly to your wallet

4. Verify Payment β†’ Confirm the transaction on-chain

GET https://api.xdotpay.com/api/v1/verify?invoice_id={id}&tx_hash={hash}

πŸ› οΈ Key Features

Authentication

  • Signup - Register new merchants
  • Login - Authenticate and receive bearer token
  • Account Management - Update merchant wallet address, email, etc.

Payment Gateway

  • Create Invoices - Generate payment requests with custom metadata
  • View Invoices - Retrieve single or multiple invoices
  • Pay Invoice - Record payment details (from_address, tx_hash)
  • Verify Payment - Blockchain verification of USDC transactions
  • Dashboard Stats - Revenue, completed, and pending payment statistics

πŸ“– API Documentation

Full Interactive Docs

Visit https://xdotpay.com for:

  • Complete endpoint documentation
  • Interactive code examples (cURL, JavaScript, Python)
  • Request/Response schemas
  • Setup guides for Dashboard and API

OpenAPI Specification

Access the OpenAPI spec at https://api.xdotpay.com/api/docs


πŸ—οΈ Running Locally

Prerequisites

  • Backend: Django, Python 3.x, Ethereum RPC node access
  • Frontend: Next.js, Node.js, npm/yarn

Backend Setup (Django API)

  1. Clone the repository
git clone https://github.com/24greyhat/xdotpay.com.git
cd xdotpay.com/xdotpayApi
  1. Create .env file with required variables:
ETH_RPC=https://your-ethereum-rpc-node.com
DATABASE_URL=your-database-url
SECRET_KEY=your-secret-key
  1. Install dependencies and run
pip install -r requirements.txt
python manage.py migrate
python manage.py runserver

Frontend Setup (Next.js Dashboard)

  1. Clone the repository
git clone https://github.com/24greyhat/xdotpay.com.git
cd xdotpay.com/dashboard
  1. Create .env file:
NEXT_PUBLIC_API_URL=https://api.xdotpay.com/api/
  1. Install dependencies and run
npm install
npx next dev --turbo

Visit the setup guides at https://xdotpay.com for detailed instructions.


πŸ” Authentication

All authenticated endpoints require a Bearer token in the Authorization header:

Authorization: Bearer <your-token>

Get your token by calling the /api/auth/login endpoint.


πŸ’° Payment Flow Example

Step 1: Create an Invoice

curl -X POST https://api.xdotpay.com/api/v1/new/invoice \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 100.50,
    "metadata": {
      "order_id": "ORDER-123",
      "customer_email": "customer@example.com"
    }
  }'

Step 2: Customer Pays via MetaMask

The customer sends USDC directly to your merchant wallet address using MetaMask.

Step 3: Verify the Payment

curl -X GET "https://api.xdotpay.com/api/v1/verify?invoice_id=1&tx_hash=0xabc123..." \
  -H "Authorization: Bearer YOUR_TOKEN"

The API verifies the transaction on the Ethereum blockchain and confirms the payment.

Note: To see this in action, spin up the dashboard locally and see how i implemented the frontend side of the payment handling.


βš–οΈ Legal & Compliance

VASP Clarification

XDotPay is NOT a Virtual Asset Service Provider (VASP)

We do not:

  • ❌ Intercept funds
  • ❌ Hold custody of funds
  • ❌ Control or manage user wallets
  • ❌ Act as an intermediary in transactions

We only:

  • βœ… Provide API infrastructure for invoice management
  • βœ… Verify blockchain transactions
  • βœ… Facilitate direct peer-to-peer payments

All USDC payments go directly from the payer's wallet to the merchant's wallet.

For full legal details, visit:


🌐 Resources


πŸ§‘β€πŸ’» Technology Stack

  • Backend: Django + NinjaAPI
  • Frontend: Next.js + React
  • Blockchain: Ethereum (USDC on Ethereum)
  • Authentication: Bearer Token (HTTP)
  • Database: PostgreSQL (recommended)

πŸ“ License

This project is open source and transparent. See full terms at https://xdotpay.com/terms-of-service.


🀝 Support

For questions, issues, or support:

  1. Visit the documentation at https://xdotpay.com
  2. Check the API reference at https://api.xdotpay.com/api/docs
  3. Review the setup guides for detailed instructions

Built with ❀️ for transparent, non-custodial cryptocurrency payments

About

Opensource non-custodial usdc payment gateway infrastructure provider.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors