Skip to main content

Verify stablecoin payments on-chain. No custody. No fees. Just truth.

Project description

๐Ÿ” StablePay Verifier

Verify stablecoin payments on-chain. No custody. No fees. Just truth.

PyPI License Python

Why StablePay?

โœ… Read-only - Never touches your funds
โœ… Open-source - Audit every line of code
โœ… BYO-RPC - Use your own node for privacy
โœ… Global - Works anywhere with internet
โœ… Simple - PAID or NOT PAID, that's it

Quick Start

# Install
pip install stablepay-verifier

# Verify a payment
stablepay verify -a 0x742d35... -m 100

# Output
โœ… PAYMENT VERIFIED
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
  Status:        PAID
  Amount:        100.00 USDC
  Transaction:   0x1234...abcd
  Block:         52345678 (150 confirmations)
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

Installation

From PyPI (Recommended)

pip install stablepay-verifier

From Source

git clone https://github.com/yourusername/stablepay-verifier.git
cd stablepay-verifier
pip install -e .

With Poetry

git clone https://github.com/yourusername/stablepay-verifier.git
cd stablepay-verifier
poetry install

Usage

Basic Verification

# Verify 100 USDC payment on Polygon (default)
stablepay verify --address 0x742d35cc6634c0532925a3b844bc9e7595f3a382 --amount 100

# Short form
stablepay verify -a 0x742d35... -m 100

Different Tokens & Chains

# USDT on Ethereum
stablepay verify -a 0x... -m 50 --token USDT --chain ethereum

# DAI on Arbitrum
stablepay verify -a 0x... -m 1000 -t DAI -c arbitrum

Time Window

# Search last 7 days
stablepay verify -a 0x... -m 100 --time-window 7d

# Search last 1 hour
stablepay verify -a 0x... -m 100 -w 1h

Custom RPC (BYO-RPC)

# Use your own RPC endpoint for privacy/reliability
stablepay verify -a 0x... -m 100 --rpc https://your-rpc-endpoint.com

JSON Output (for scripts)

# Get JSON output
stablepay verify -a 0x... -m 100 --output json

# Use with jq
stablepay verify -a 0x... -m 100 -o json | jq '.status'

Filter by Sender

# Only count payments from a specific address
stablepay verify -a 0x... -m 100 --sender 0xabc123...

Supported Chains & Tokens

Chain USDC USDT DAI
Polygon โœ… โœ… โœ…
Ethereum โœ… โœ… โœ…
Arbitrum โœ… โœ… โŒ
Base โœ… โŒ โŒ
Optimism โœ… โœ… โŒ

Run stablepay info to see all supported chains and tokens.

Exit Codes

Code Status Meaning
0 PAID Payment verified
1 NOT_PAID No matching payment
2 PARTIAL Partial payment
3 PENDING Awaiting confirmations
10 ERROR Invalid input
11 RPC_ERROR Network error

Use exit codes in scripts:

stablepay verify -a 0x... -m 100 -q && echo "Payment received!"

Configuration

Command Line Options

Flag Short Default Description
--address -a Required Receiver wallet address
--amount -m Required Expected payment amount
--token -t USDC Token symbol
--chain -c polygon Blockchain network
--rpc -r Auto Custom RPC endpoint
--time-window -w 24h Search time window
--sender -s Any Filter by sender
--min-confirmations 12 Required confirmations
--tolerance 0.01 Amount tolerance (1%)
--output -o text Output format
--quiet -q Minimal output
--verbose -v Debug info

Use Cases

Freelancers

Verify client payments before delivering work:

stablepay verify -a $MY_WALLET -m 500 -w 24h

E-commerce Integration

Check payments in your backend:

from stablepay_verifier import verify_payment, VerifyRequest

result = verify_payment(VerifyRequest(
    address="0x...",
    amount=99.99,
    token="USDC",
    chain="polygon",
))

if result.is_paid:
    process_order()

Automated Systems

Use in CI/CD or cron jobs:

#!/bin/bash
if stablepay verify -a $WALLET -m $AMOUNT -q; then
    echo "Payment confirmed, proceeding..."
    ./next_step.sh
else
    echo "Payment not found"
    exit 1
fi

BYO-RPC Model

Public RPCs have rate limits and privacy concerns. For production use, we recommend using your own RPC endpoint:

stablepay verify -a 0x... -m 100 --rpc https://polygon-mainnet.g.alchemy.com/v2/YOUR_KEY

Development

Setup

git clone https://github.com/yourusername/stablepay-verifier.git
cd stablepay-verifier
poetry install --with dev

Run Tests

poetry run pytest

Lint & Format

poetry run ruff check .
poetry run ruff format .

Type Check

poetry run mypy src

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests and linting
  5. Submit a pull request

License

MIT License - see LICENSE for details.

Security

This tool is read-only and never requests private keys or signing capabilities. It only queries public blockchain data.

If you find a security issue, please report it privately to security@example.com.


Built with โค๏ธ for the global stablecoin community

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stablepay_verifier-0.1.0.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stablepay_verifier-0.1.0-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file stablepay_verifier-0.1.0.tar.gz.

File metadata

  • Download URL: stablepay_verifier-0.1.0.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.10.11 Windows/10

File hashes

Hashes for stablepay_verifier-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0397472a8a456faae2268ceeea25f83c290dea28e85f23447991215e4805b381
MD5 b7ab734edc861c2dc8fccb2d6c4deba4
BLAKE2b-256 7ae8f3713b689120fadd75bfba95efc64546fb62985a59f79136e35dcb4eede8

See more details on using hashes here.

File details

Details for the file stablepay_verifier-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for stablepay_verifier-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 57815e0ff9bc4d30b3069aedc723fd8ef0e6fe35aa006f655a286c7c28a5b757
MD5 6862a14ba7362e84cc6b565e143628ed
BLAKE2b-256 4c037e631be771f8a5783b4151d7fbafb2e078a33af823b338e148be6218e7c0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page