# Pepay: The Payment Layer for Autonomous Agents

*The Missing Piece of the AI Agent Stack*

\
***Built by the team at $Pepay***

***

## The Crypto AI Agent Stack *🔌*

**Brains**: LLMs (DeepSeek, OpenAI, Claude).\
**Bodies**: Frameworks (ai16z, 8n8, Virtuals).\
**Tools**: Trading (GOAT), **Payments (Pepay)**.

**Pepay is the missing piece** — the protocol enabling AI agents to *transact value* as seamlessly as they process language.

***

## The Problem

**AI agents are stuck in a financial straitjacket.** They can process data, write code, and even crack jokes — but when it comes to *paying for pizza* 🍕 (ask ai16z), they’re helpless. Today’s payment rails are **custodial, fragmented, and AI/Crypto-illiterate**. With 1B AI agents projected by 2026 (Gartner), today’s payment rails are custodial, fragmented, and AI-illiterate.

***

## The Solution

**Pepay is the first protocol letting AI agents&#x20;*****own*****&#x20;their economy.**

* 🤖 **Self-Custody Wallets**: Your AI keeps its own keys. *No middlemen, no memecoins wasted.*
* 🌐 **Multi-Chain Fluency**: Pay/accept BNB, SOL, ETH, BASE, etc. — **speaks to every chain** *for a polyglot future.*
* ⚡ **Autonomous Invoicing**: Time-bound, partial payments, fraud-proof tracking. *Set it and forget it.*
* 🔧 **Modular Design:** Swap chains, add features, or fork – no vendor lock-in.

***

## Why Pepay? (TL;DR)

* 🧠 **Completes the Stack**: LLMs think, frameworks act, **Pepay transacts**.
* 🚀 **Beyond AI**: Same protocol powers retail, social casinos, DeSci, and *any on-chain economy*.
* 🛠️ **For Builders**: Modular, open-source, and *actually permissionless*.

***

## How it Works (For the visionaries)

1. **AI Agent**: *“Need to invoice 0.5 ETH for this code review.”* 💻
2. **Pepay**: Generates a self-custody invoice, sets a 24h expiry. ⏳
3. **Customer**: Pays via Phantom, Metamask, etc. *No KYC, no gaslighting.*
4. **AI Agent**: *“Payment settled. Initiating service.”* 🚀

***

## Why This Matters

* **CZ’s Vision, Executed**: AI + crypto isn’t hype — it’s *infrastructure*. Pepay’s the proof.
* **Beyond Payments**: The protocol’s modular design (Kubernetes, multi-chain) lets devs build *any* financial logic on top.

***

## One-Liner for the Ages

> **“Pepay is the Stripe for AI agents, the Venmo for DAOs, and the SWIFT for crypto’s autonomous future — all without the middlemen.”**

***

### What Next:

<table data-view="cards"><thead><tr><th></th><th></th><th data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Entrepreneurs</strong></td><td>Check out our use cases</td><td><a href="/pages/CRpRCAjfxViNlVQn3WEF">/pages/CRpRCAjfxViNlVQn3WEF</a></td><td><a href="/files/GN9bh7yb1fWtIEOXDbk1">/files/GN9bh7yb1fWtIEOXDbk1</a></td><td></td><td><a href="/pages/CyH2xJQs9yWJ1S8BYNav">/pages/CyH2xJQs9yWJ1S8BYNav</a></td></tr><tr><td><strong>DEVS</strong></td><td>Start building brotha</td><td><a href="/pages/QI4T6YqOuJ7rL2BrKiqm">/pages/QI4T6YqOuJ7rL2BrKiqm</a></td><td><a href="/files/rSYWTBdqe6BvYUCdCQ9R">/files/rSYWTBdqe6BvYUCdCQ9R</a></td><td></td><td></td></tr><tr><td><strong>Platform</strong></td><td>Test it out</td><td><a href="https://pepay.io">https://pepay.io</a></td><td><a href="/files/Su8fBTuDAD2rEP9Hpuji">/files/Su8fBTuDAD2rEP9Hpuji</a></td><td></td><td></td></tr></tbody></table>


# Key Features

Pepay was built to break the financial barriers holding back AI agents and on-chain economies. Here are the core features that set Pepay apart:

***

## Multi-Chain Model

Pepay supports multiple blockchain networks (e.g., Ethereum, Solana, BASE), allowing AI agents and merchants to transact in their preferred chain. This **polyglot** approach future-proofs Pepay against shifting market trends—adding new chains is as simple as plugging in a new module.

**Why it matters:**

* **Seamless Cross-Chain Payments**: Accept ETH, SOL, and beyond, all under one unified interface.
* **Future-Proof**: Easily adapt to emerging L2s or new blockchains without overhauling your payment logic.

***

## Self-Custody Architecture

Pepay is **non-custodial** by design, ensuring that merchants and AI agents maintain full control over their private keys. There are no third-party custodians—Pepay simply provides the payment rails. Merchants may use the KMS encrypted custodial wallets or operate with their own wallets

**Why it matters:**

* **Security & Ownership**: Your wallet, your keys. No middleman controlling your funds.
* **Trustless Transactions**: Reduce counterparty risk and remove friction in on-chain payments.

***

## Developer Testnet

Test new payment flows and integrations without risking real funds. Pepay offers a **dedicated testnet** environment to let you break things in a sandbox before going live.

**Why it matters:**

* **Safe Experimentation**: Build and iterate faster without incurring costly on-chain fees.
* **Frictionless Onboarding**: Lower the barrier to entry for developers looking to integrate Pepay into AI agent workflows or merchant platforms.

***

## Partial Payment System

Pepay’s partial payment feature enables you to accept or send payments in increments, rather than settling an invoice in full.

**Why it matters:**

* **Flexible Billing**: Allow your customers or AI agents to pay as they go.
* **Improved Accessibility**: Smaller amounts lower the commitment threshold and widen your user base.

***

## Time-Bound Invoicing

Set an **expiry period** for each invoice, ensuring payments are made within a specific window. If the deadline passes, the invoice expires automatically.

**Why it matters:**

* **Fraud Prevention**: Close payment channels before bad actors exploit them.
* **Revenue Protection**: Keeps payment expectations clear for both AI agents and end users.

***

## Multi-Platform Support

Pepay integrates with popular communication tools and AI frameworks, making it easy to embed payments where conversations and collaborations happen.

**Building Support for :**

* **Multiple AI Agent Models** (AI16z, 8n8, PyDantic, ARC, Virtuals)
* **Discord, Twitter, Telegram** connectors
* **Document Ingestion & Retrieval**: Pepay integrates with AI workflows that require data ingestion and context retrieval for transactions or invoice generation. This could include emails, addresses, or customer information.&#x20;

***

## Observability & Logging

Pepay provides logs, alerts, and health checks to ensure you have full visibility into your payment flows.

**Why it matters:**

* **Real-Time Monitoring**: Quickly diagnose issues or failed transactions.
* **Scalability**: Track metrics as your user base or number of AI agents grows.

***

## Putting It All Together

Pepay doesn’t just handle payments; it **empowers** AI agents, merchants, and users to transact seamlessly in an evolving multi-chain world. Whether you’re building an autonomous AI service, an on-chain social casino, or a retail crypto gateway, Pepay’s flexible, non-custodial, and developer-friendly architecture has you covered.

**Next Steps**

<table data-view="cards"><thead><tr><th></th><th></th><th data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Architecture &#x26; Design</strong></td><td>dive deeper into the tech</td><td><a href="/pages/QI4T6YqOuJ7rL2BrKiqm">/pages/QI4T6YqOuJ7rL2BrKiqm</a></td><td><a href="/files/53PF6z17zvkCTjyObptE">/files/53PF6z17zvkCTjyObptE</a></td><td></td><td></td></tr><tr><td><strong>Getting Started</strong></td><td></td><td></td><td><a href="/files/2ojdeD9NsYaKfuqi2FwA">/files/2ojdeD9NsYaKfuqi2FwA</a></td><td></td><td></td></tr><tr><td><strong>Check out our SDK</strong></td><td>get started with app integrations</td><td></td><td><a href="/files/GN9bh7yb1fWtIEOXDbk1">/files/GN9bh7yb1fWtIEOXDbk1</a></td><td></td><td><a href="/pages/CyH2xJQs9yWJ1S8BYNav">/pages/CyH2xJQs9yWJ1S8BYNav</a></td></tr></tbody></table>


# Use Cases

Grab a slice and lets cook!

***

### AI-Driven Trading Bots

**Context**\
Autonomous bots execute crypto trades and manage real-time financial data flows.

**Why Pepay?**

* **Automated Fee Settlement**: Bots can pay for data feeds, market signals, or advanced analytics instantly.
* **Non-Custodial & Real-Time**: No human intervention needed; transactions confirm on-chain with full transparency.

**Example**\
A trading bot built on an AI framework like ai16z automatically settles subscription fees for premium APIs via Pepay’s Payment Engine—no manual approvals or escrow arrangements required.

***

### AI-Powered Pre-Sales & Product Launches

**Context**\
Brands and projects often host token or product pre-sales, with AI agents handling marketing, user sign-ups, and payment execution.

**Why Pepay?**

* **Early-Bird Access**: Offer exclusive, time-limited rates before a public launch using **time-bound invoices**.
* **Fully Managed**: Seek participants with agents create option to purchase tokens

**Example**\
An AI agent coordinates an NFT or product pre-sale, quickly onboarding customers through Pepay’s single iFrame workflow. Buyers secure their item with a partial deposit and finalize payment when the product is ready to ship or the NFT is minted.

***

### Decentralized Science (DeSci) Payments

**Context**\
Researchers and contributors share access to specialized datasets, lab simulations, or research findings on a decentralized network.

**Why Pepay?**

* **Microtransactions at Scale**: Pepay’s partial payment and multi-chain capabilities let researchers handle pay-per-use models effortlessly.
* **Time-Bound Invoicing**: Control data access windows by setting invoice expiries.

**Example**\
An AI agent querying a decentralized research portal seamlessly settles small payments (e.g., 0.01 ETH per data snippet) via Pepay before returning research insights to the user.

***

### AI-Enhanced Retail Purchases

**Context**\
AI shopping assistants compare product prices and manage orders across multiple blockchain-based marketplaces.

**Why Pepay?**

* **Cross-Chain Checkout**: Accept or pay with SOL, ETH, or any supported token.
* **Gather Customer Data:** Emails, preferences, feedback
* **Single iFrame Workflow**: Smooth user onboarding and checkout experience, all in one unified interface.

**Example**\
Your AI agent scouts the best deals on a Solana-based marketplace and completes checkout via Pepay—executing a partial or full payment, depending on user preferences.

***

### Gaming Ecosystems

**Context**\
AI-driven gaming platforms or metaverse environments allow users to purchase in-game assets, participate in tournaments, and manage microtransactions.

**Why Pepay?**

* **In-Game Currencies**: Supports multiple gaming tokens, bridging cross-chain ecosystems.
* **Partial Payments**: Players can buy assets or upgrades in increments, fueling engagement.

**Example**\
A blockchain game sells NFT skins, with the AI agent (or user) paying via Pepay. Users can opt for partial payments if they only want to put down a deposit initially.

***

### Subscription-Based AI Services

**Context**\
AI frameworks (e.g., AI16z, ARC) offer pay-as-you-go or monthly subscription tiers for advanced model access.

**Why Pepay?**

* **Real-Time Billing**: Charge users per second of compute or per API call, automatically recorded on-chain.
* **Self-Custody**: Service providers never hold user funds; Pepay ensures trustless payment flows.

**Example**\
An AI hosting service charges tokens per GPU hour used. When usage crosses a threshold, Pepay triggers a partial invoice, and the user’s wallet confirms payment.

***

### AI-Powered Marketplaces

**Context**\
Decentralized marketplaces for NFTs, digital goods, or intellectual property rely on AI agents to facilitate discovery and pricing.

**Why Pepay?**

* **Flexible Payment Options**: Multi-chain support for a wide range of cryptocurrencies.
* **Invoice Customization**: Time-bound or partial payments for big-ticket or auctioned items.

**Example**\
An AI agent acting as an NFT “negotiator” automatically finalizes deals on the user’s behalf, using Pepay for secure, non-custodial payments.

***

### On-Demand AI Training and Models

**Context**\
Companies and developers purchase training time or access to specialized AI models hosted on decentralized platforms.

**Why Pepay?**

* **Usage-Based Invoicing**: Pay only for actual training hours, with incremental or partial settlement.
* **Observability**: Monitor training-related costs in real time via Pepay’s logging and dashboards.

**Example**\
A biotech startup’s AI agent spins up a large language model training job on a decentralized HPC network, paying seamlessly in chunks whenever a milestone is reached.

***

### Supply Chain Management

**Context**\
AI agents track and optimize vendor contracts, shipping routes, and inventory levels across multiple global players.

**Why Pepay?**

* **Cross-Border Transactions**: Leverage Pepay to handle varying currencies and chain preferences.
* **Fraud Prevention**: Time-bound invoices ensure vendors ship goods within specific windows before payment expires.

**Example**\
An AI agent compares multiple shipping providers and immediately settles fees with the fastest option using Pepay, ensuring no shipment delays.

***

### Why These Use Cases Matter

In each scenario, Pepay’s **non-custodial**, **multi-chain**, and **developer-friendly** architecture delivers frictionless AI-driven financial transactions. By integrating directly into AI agent frameworks, Pepay becomes the **spine** of next-gen economies—securing, validating, and settling payments with unparalleled efficiency and transparency.

Whether you’re building a **pre-sale platform**, **trading bot**, **AI-based marketplace**, or **subscription service**, Pepay’s **autonomous**, **scalable**, and **observability-focused** infrastructure is designed to support rapid innovation—without the headaches of traditional payment complexities.


# Universal Payment Use Cases

### 1 · E-commerce Checkout Widget

**Elevator Pitch**\
Drop-in plugin (WordPress, WooCommerce, Wix, PrestaShop) that lets any store accept *any* token on *any* chain and settle to the merchant’s preferred stablecoin—100 % non-custodially.

**How It Works**

1. Merchant installs the Pepay plugin.
2. Cart subtotal → fiat-equivalent in shopper’s token of choice (e.g., $49.99 → 37 DOGE).
3. **MCP/SDK bundle** (`amount + token + chain + slippageGuard`) sent as a single JSON.
4. Shopper pays; Pepay routes the swap on the lowest-slippage DEX (< 30 s).
5. **1 % fee auto-burns $RUNEY**; net funds land directly in merchant wallet.

**Why It Matters**

* Avoid 4% Mastercard or Visa processing fees
* Unlocks meme-coin buyers without price-risk.
* No chargebacks, no CEX settlement delays, no PCI scope.
* One plugin ≈ *Coinbase Commerce + Alchemy Pay*—but non-custodial.

***

### 2 · Subscription & SaaS Billing

**Elevator Pitch**\
Recurring-payment API for SaaS teams who want crypto subs with stable-fiat predictability.

**How It Works**

* User approves a **pull-payment smart contract** (no cards).
* Each cycle, Pepay swaps → settles to USD1/USDC → fires webhook.
* Failed swaps auto-retry across fallback tokens/chains.

**Why It Matters**

* Predictable MRR in fiat, flexible pay-in for users.
* Zero PCI overhead; merchant never touches keys.
* Ideal for VPNs, dev tools, newsletters, game passes.

***

### 3 · Freelance Escrow & Marketplace Payouts

**Elevator Pitch**\
Lightweight escrow layer that drops marketplace rake from 20 % to \~1 %.

**How It Works**

1. Client creates escrow via Pepay SDK, funding with any asset.
2. Funds lock until `POST /release` signed by both parties or arbiter.
3. Pepay swaps to freelancer’s chosen coin; settles instantly.
4. **Fee split:** 0.7 % burned, 0.3 % rebated to marketplace.

**Why It Matters**

* Global talent paid same-day, minus pennies in gas.
* Marketplaces earn *without* custody, KYC headache, or FX spread.
* Goodbye Upwork/PayPal hold periods.

***

### 4 · In-Game Micro-Transactions

**Elevator Pitch**\
Unity/Godot SDK for on-chain IAP—skins, loot boxes, DLC—priced in stables, payable in gamers’ meme holdings.

**How It Works**

* Player picks token; SDK  handles swap + dev treasury settlement.
* NFT asset mints & delivers in one tx.

**Why It Matters**

* Avoids Apple/Steam 30 % cut.
* Directly works within gaming frameworks rather than building chain centric games&#x20;
* Build token-centric game ecosystem efficiently.&#x20;
* “Any-token onboarding” slashes friction for degen gamers.
* Gas abstraction hides blockchain UX from casual users.

***

### 5 · Point-of-Sale (POS) for Brick-and-Mortar

> **Key Promise**\
> If the price tag says **$4.50**, *exactly* $4.50 lands in the merchant’s wallet—every time.

**Elevator Pitch**\
Tablet/phone POS for cafés, events, pop-ups—tap to pay with any token, instant stablecoin settlement.

**How It Works**

1. Cashier types amount → QR with MCP bundle appears.
2. Customer scans & pays.
3. Pepay webhook confirms payment; receipt prints.
4. Works offline—QRs queue until connection resumes.

**Why It Matters**

* Instant finality, zero FX fees, no hardware swap.
* “Pennies to Teslas” scalability—any ticket size, same UX.
* Every sale burns a bit of $RUNEY: built-in loyalty story for crypto crowds.

***

### 6 · Crowdfunding & Pre-Sale Platforms

**Elevator Pitch**\
Kickstarter-style campaigns that accept any token while tracking progress in fiat.

**How It Works**

* Creator sets goal & accepted tokens.
* Backers pledge; Pepay swaps in-flight to campaign treasury.
* Real-time USD dashboard; milestone-based vesting.

**Why It Matters**

* Eliminates volatility for project owners.
* Backers pledge with on-hand coins—no off-ramp friction.
* Built-in escrow / vesting = higher trust, less fraud.

***

### 7 · Payroll & Mass Payouts

**Elevator Pitch**\
Bulk-payment wizard for DAOs, esports teams, global startups.

**How It Works**

1. HR uploads CSV (`address, amountUSD`).
2. Pepay batches swaps, nets gas, executes multi-send across chains.
3. Ledger returns fiat-exact receipt per employee.

**Why It Matters**

* One-click weekly payroll, no manual swaps.
* Contributors choose token; company books clean USD expense.
* Beats Wise/Payoneer fees for emerging-market talent.

***

### 8 · Real-World Asset (RWA) Settlement Rail

**Elevator Pitch**\
Pepay serves as the compliant settlement layer for tokenized invoices, real-estate shares, carbon credits.

**How It Works**

1. Buyer pays with any token; funds escrow until off-chain asset transfer.
2. Seller receives stablecoin immediately upon oracle confirmation.
3. Hash-linked audit trail logged on-chain.

**Why It Matters**

* Replaces slow, expensive banking rails.
* Non-custodial flow meets “no-commingling” rules.
* Precise fiat parity keeps auditors and regulators happy.

***

> **Bill Walsh, Jeff Bezos, Walt Disney—same principle:**\
> *Execute flawlessly on what you control; the score (and revenue) takes care of itself.*

**Pepay** gives builders that control—outside the AI-agent niche—unlocking fee-generating volume across **commerce, gaming, finance, and the physical world.**


# Business Use Cases

## 🏢 Business Use Cases

> **Promise to the enterprise:**\
> *Universal asset in, exact-fiat ou, audit trails, and sub-30-second finality.*

***

### 1 · Cross-Border Supplier Payments & Treasury FX Netting

**Scenario**\
A US electronics brand owes ¥32 million to three Shenzhen suppliers. Instead of wiring USD → CNH through correspondent banks, the treasury desk settles in USDC, while each supplier auto-receives CNH-pegged stablecoins. Pepay:

* Merchants runs supplier **KYC / sanctions screening** on-chain.
* Executes atomic swaps on DEX liquidity, locking FX at time of send.
* Writes a hash-linked settlement record (ISO-20022 payload) for auditors.

**Why It Matters**

* **T+0 finality**, vs. 2-3 business-day wires.
* 50-80 bp cheaper than SWIFT FX margin.
* Immutable audit log → SOX & IFRS compliant.

***

### 2 · KYC-Enforced Global Payroll

**Scenario**\
A 1 200-person remote workforce spans 34 countries. Pepay’s payroll API:

* Accepts a single USD ledger from SAP SuccessFactors.
* Performs **geo-fenced KYC/AML** per employee.
* Multi-sends local-currency stables (BRL-c, GBP-g, PHP-p) in one batch.
* Returns a reconciled journal entry in USD1 for the ERP.

**Why It Matters**

* Eliminates 3rd-party pay agents and middle-office FX fees.
* Employees receive funds in minutes, not days.
* Company books a single fiat expense line for clean accounting.

***

### 3 · Chain-of-Custody Trade Finance & Invoice Factoring

**Scenario**\
A logistics firm tokenises $5 M of freight invoices as NFTs. Institutional buyers purchase the receivables in WBTC; Pepay:

1. **Escrows** buyer funds until IoT oracle confirms cargo arrival.
2. Executes swap → pays originator in USD1.
3. Logs a notarised PDF + tx hash into the ERP’s document store.

**Why It Matters**

* Cuts invoice discounting time from 30 d to < 24 h.
* Removes double-financing risk via on-chain provenance.
* Provides banks an immutable trail for Basel III compliance.

***

### 4 · Carbon-Credit Settlement & ESG Reporting

**Scenario**\
A Fortune 500 pledges net-zero. It buys tokenised carbon credits from five registries across three chains. Pepay:

* Screens sellers via **KYB & Verra certificate hashes**.
* Swaps the buyer’s treasury USDC into registry-specific tokens.
* Burns credits on-chain and exports a Form 8936-ready CSV.

**Why It Matters**

* One-click compliance with SEC Scope-3 disclosure rules.
* Eliminates brokerage middlemen and registry lock-in.
* Real-time dashboard proves retirement to shareholders.

***

### 5 · Rebate & Loyalty Settlement for Multinational Retail

**Scenario**\
Walmart issues **WalmartUSD** stable-coin rebates. A franchisee in Mexico wants pesos; a supplier in India wants USDT. Pepay routes every claim:

* Verifies **CIP/KYC** of claimant.
* Converts loyalty token → local-currency stable → claimant wallet.
* Pushes settlement data to Oracle NetSuite for tax reporting.

**Why It Matters**

* Global, instant redemption with no FX spread.
* Reduces loyalty liability on corporate balance sheet in real time.
* In-house finance teams keep GAAP-grade records automatically.

***

### 6 · High-Value B2B Escrow with Multi-Sig Governance

**Scenario**\
Two Fortune 100s execute a $75 M IP licensing deal. Terms require staged payments tied to patent-office milestones. Pepay:

* Creates a **multi-sig escrow** (双方 + neutral arbiter).
* Releases tranches automatically when Chainlink attests milestone IDs.
* Provides board-level PDF statements signed by a Big 4 audit plug-in.

**Why It Matters**

* Removes irrevocable letter-of-credit costs (\~1 % face value).
* Transparent milestone tracking lowers counterparty risk.
* Satisfies internal audit & SEC material-contract tracing.

***

> **Enterprise takeaway:**\
> With Pepay, any asset—future AmazonUSD, a regional CBDC, or today’s meme coin—can settle into the precise fiat figure your ledger demands, wrapped in KYC, AML, and audit layers your CFO and regulators will love.


# Competitors

<figure><img src="/files/QcHXJR5shJAl3sJVcQs5" alt=""><figcaption></figcaption></figure>


# Architecture & Technical Design

Pepay’s design philosophy revolves around **modularity**, **scalability**, and **observability**, ensuring a robust payment layer for AI agents across multiple blockchains. This section dives into how Pepay processes payments, integrates with AI frameworks, and scales to meet demand.

<figure><img src="/files/AnhkqsDKL2h6VjaOlH2G" alt=""><figcaption></figcaption></figure>

***

## High-Level Overview

**Core Concept**\
At the center of Pepay is a **Payment Engine** that orchestrates transactions, records data (e.g., customer info, inventory), and communicates with multiple blockchain networks. AI agent plugins (e.g., ai16z, ARC, ZeroBird) interface directly with this engine to request or process payments in a trustless, non-custodial manner.

**Key Components**

* **Blockchain Connectors**: Each supported network (e.g., Solana, Base, Ethereum) has its own service module.
* **AI Agent Integrations**: Plugins for AI agent frameworks, powered by Pepay’s Core SDK.
* **Non-Custodial Wallets**: Each AI agent or merchant retains full control of their private keys.
* **Data Layer**: Tracks transactions, inventory, and customer info across multiple networks.

***

## Payment Engine

The **Payment Engine** is the heart of Pepay’s workflow. It receives payment requests (invoices, partial payments, etc.) from AI agents or merchant apps, then orchestrates the transaction flow across various blockchains.

* **Transaction Lifecycle**:
  1. **Invoice Generation**: AI agent or merchant requests an invoice, specifying amount, chain, and any time-bound or partial payment constraints.
  2. **Payment Validation**: The engine verifies chain compatibility, calculates gas/fees, and prepares the transaction details.
  3. **Wallet Interaction**: Since Pepay is non-custodial, the user or AI agent signs transactions locally via wallet solutions (e.g., Phantom, MetaMask).
  4. **Settlement & Recording**: Once the transaction is confirmed on-chain, the engine logs the payment status and updates inventory/customer records.
  5. **Client Notification:** After settlement, merchants are notified via webhook or rpc base on preference
* **Service-Oriented Workflow**:
  * Each network connector (e.g., SolanaService, BaseService) is implemented as a **service class**.
  * The engine routes requests to the appropriate service based on chain selection.
  * Facilitates parallel or sequential processing for complex multi-chain tasks.

***

## Modular, Service-Oriented Design

**Why Modularity?**\
Blockchains evolve fast. Pepay embraces a **router pattern** where each blockchain network is encapsulated in its own service module. This means adding or upgrading a chain’s connector is as simple as plugging in (or unplugging) a new class.

* **Easy Addition of New Networks**: Each service conforms to a standard interface (e.g., `createInvoice()`, `checkCustomerId()`).
* **Independent Updates**: Hotfix or upgrade a single connector without overhauling the entire system.
* **Dynamic Registration**: Pepay automatically registers any newly added service based on configuration.

***

## Scalable, Resilient Infrastructure

#### Kubernetes-Based Deployment

Pepay is cloud-native, leveraging **Kubernetes** for container orchestration:

* **Horizontal Scaling**: Spin up additional instances of the Payment Engine on demand.
* **Connection Pooling & Rate Limiting**: Maintain stable throughput during traffic spikes.
* **Health Monitoring**: Automated probes and rolling updates minimize downtime.

#### Resilience & Fault Tolerance

* **Retry Mechanisms**: In the event of network or API failures, Pepay retries transactions following exponential back-off rules.
* **Graceful Degradation**: If one chain’s service goes offline, requests for that chain are halted without affecting other services.
* **System Status Alerts**: Real-time monitoring and alerting on transaction errors, CPU usage, or memory constraints.

***

## Observability & Logging

Pepay’s **Observable Framework** ensures full visibility across the payment flow:

* **Comprehensive Logs**: Detailed logs for transaction requests, confirmations, and errors.
* **Health Checks**: Periodic checks on each chain connector and the core Payment Engine.
* **Monitoring Dashboards**: Metrics on transactions per minute, average confirmation time, and success/fail rates.

This unified observability helps developers pinpoint issues quickly—critical for high-traffic scenarios and real-time AI agent interactions.

***

## AI Agent Integration

Pepay extends its capabilities to AI agents through **plugins** built on a Core SDK (written in TypeScript). These plugins serve as the bridge between AI frameworks (e.g., ai16z, ARC) and Pepay’s Payment Engine:

* **Core SDK**:
  * Exposes functions like `createInvoice()`, `checkBalance()`, `recordPayment()`.
  * Manages authentication, signing, and consistent data handling across multiple blockchains.
* **Plugin Ecosystem**:
  * Pre-built adapters for popular AI frameworks.
  * Customizable interfaces to tailor the user experience (partial invoices, time-bound payments, etc.).
* **Workflow**:
  1. AI Agent triggers a payment request via the plugin.
  2. The plugin calls the Pepay Payment Engine (through the Core SDK).
  3. The agent  or merchant receives a link or sdk embedded iframe
  4. Clients receive the link from the agent and pay the invoice
  5. the agent is notified of completion and find all data regarding the client

***

## Technical Stack

Pepay’s stack emphasizes **TypeScript** and proven web3 libraries, running on a robust containerized environment.

* **Languages & Frameworks**:
  * **Node.js** + **TypeScript** for backend services and the Core SDK.
  * **web3.js** and **ethers.js** for blockchain interactions.
* **Infrastructure**:
  * **Kubernetes** for container orchestration.
  * **Docker** images for each network connector and the Payment Engine.
* **Databases**:
  * Depending on your needs, Pepay can integrate with various databases (SQL or NoSQL) for transaction logging, user data, etc.
* **CI/CD**:
  * Automated tests and deployment pipelines ensure reliable upgrades and quick turnaround on new features.

###


# Product Workflow

## Merchant Workflow&#x20;

<figure><img src="/files/m2jBouOOifM4mi6mJAiN" alt=""><figcaption></figcaption></figure>

***

## Agent Workflow

<figure><img src="/files/DuJcDoUoLPfFwFG7hyOb" alt=""><figcaption></figcaption></figure>

### Notes

* **Security**: All transactions and updates are secured via authenticated channels.
* **Transparency**: Customers can view invoices and payment statuses in real-time.
* **Automation**: AI agents handle all interactions to minimize manual intervention.


# FAQ

#### 🌟 **What is Peperuney and Pepay?**

Peperuney is our ecosystem token and Pepay is our project. We chose to create a community represented token and ai agent product behind it for long term growth purposes. We have several other projects in the future.&#x20;

PePay is a secure, flexible, and user-friendly crypto payment gateway that allows businesses to accept and manage cryptocurrency payments seamlessly. It supports multiple tokens and chains, making it ideal for businesses of all sizes. 💰

***

#### 🚀 **How do I get started with PePay?**

Getting started is simple! Visit the Getting Started Guide for detailed steps, including prerequisites, installation, and setup instructions. You’ll be up and running in no time! 🛠️

***

#### 💡 **What cryptocurrencies does PePay support?**

PePay supports a wide range of cryptocurrencies, including Ethereum (ETH), Solana (SOL), USDC, and more. You can customize which tokens you accept at the global, merchant, or invoice level. 🌐

***

#### 🔐 **Is PePay custodial or non-custodial?**

PePay is **non-custodial**, meaning businesses retain full control over their private keys and funds. This ensures maximum security and minimizes centralized risks. 🔒

***

#### 📊 **Does PePay support automatic conversion to fiat or stablecoins?**

Yes, PePay allows businesses to choose between keeping payments in their original cryptocurrency or converting them automatically to stablecoins like USDC. This flexibility sets PePay apart from competitors. 💹

***

#### 🛠️ **What integrations does PePay offer?**

PePay integrates seamlessly with platforms like:

* Discord for bot integration 🤖
* Twitter for payment notifications 🐦
* Telegram for quick alerts and interactions 📲

Check out the **Platform Integration** section in the documentation for setup guides! 🚀

***

#### 💸 **What are PePay’s pricing and fees?**

PePay offers **transparent pricing**, with either a small flat fee or percentage-based transaction fees. There are no hidden costs, making it ideal for small to mid-sized businesses. 💵

***

#### ⏱️ **What is the time-based API key feature in PePay?**

PePay’s **time-based API keys** enhance security by ensuring keys automatically expire after a set duration. This protects your system from unauthorized or stale API calls. 🔑

***

#### 🤔 **What happens if a payment is underpaid, overpaid, or late?**

PePay is designed to handle edge cases intelligently:

* **Underpayment**: Flagged as "underpaid" for merchant review.
* **Overpayment**: Marked as "paid," and the excess can be managed manually.
* **Late Payment**: Marked as "expired" unless the merchant chooses to accept it manually.

These safeguards ensure smooth and fair payment handling. ✅

***

#### 📱 **Can PePay be used on mobile devices?**

Yes! PePay offers mobile-friendly payment links and iframe options, ensuring a seamless experience for users on smartphones and tablets. 📲

***

#### 🌎 **Does PePay support multi-chain payments?**

Absolutely! PePay is **chain-agnostic**, supporting multiple blockchain networks like Ethereum, Solana, and more, making it highly versatile. 🔗

***

#### 🔧 **Where can I get support if I run into issues?**

Our team is here to help! For support, you can:

* Join our Discord Community 🤝
* Check out our Troubleshooting Guide 📘
* Contact us at <support@pepay.com> ✉️

***

#### 🛡️ **How secure is PePay?**

PePay is designed with **Fort Knox-level security**:

* Encrypted API keys 🔒
* Secure HTTPS protocols 🌐
* Webhook signature verification 🖋️ Your payments and data are always protected. 🔐

***

#### 🎉 **What’s next after setup?**

After completing the setup, you can:

* Create custom payment invoices 🧾
* Customize accepted tokens 🪙
* Integrate with platforms like Discord, Twitter, or Telegram for added functionality 🌟

## FAQ: Frequently Asked Questions about PePay ❓💬

#### 🌟 **What is PePay?**

PePay is a secure, flexible, and user-friendly crypto payment gateway that allows businesses to accept and manage cryptocurrency payments seamlessly. It supports multiple tokens and chains, making it ideal for businesses of all sizes. 💰

***

#### 🚀 **How do I get started with PePay?**

Getting started is simple! Visit the Getting Started Guide for detailed steps, including prerequisites, installation, and setup instructions. You’ll be up and running in no time! 🛠️

***

#### 💡 **What cryptocurrencies does PePay support?**

PePay supports a wide range of cryptocurrencies, including Ethereum (ETH), Solana (SOL), USDC, and more. You can customize which tokens you accept at the global, merchant, or invoice level. 🌐

***

#### 🔐 **Is PePay custodial or non-custodial?**

PePay is **non-custodial**, meaning businesses retain full control over their private keys and funds. This ensures maximum security and minimizes centralized risks. 🔒

***

#### 📊 **Does PePay support automatic conversion to fiat or stablecoins?**

Yes, PePay allows businesses to choose between keeping payments in their original cryptocurrency or converting them automatically to stablecoins like USDC. This flexibility sets PePay apart from competitors. 💹

***

#### 🛠️ **What integrations does PePay offer?**

PePay integrates seamlessly with platforms like:

* Discord for bot integration 🤖
* Twitter for payment notifications 🐦
* Telegram for quick alerts and interactions 📲

Check out the **Platform Integration** section in the documentation for setup guides! 🚀

***

#### 💸 **What are PePay’s pricing and fees?**

PePay offers **transparent pricing**, with either a small flat fee or percentage-based transaction fees. There are no hidden costs, making it ideal for small to mid-sized businesses. 💵

***

#### ⏱️ **What is the time-based API key feature in PePay?**

PePay’s **time-based API keys** enhance security by ensuring keys automatically expire after a set duration. This protects your system from unauthorized or stale API calls. 🔑

***

#### 🤔 **What happens if a payment is underpaid, overpaid, or late?**

PePay is designed to handle edge cases intelligently:

* **Underpayment**: Flagged as "underpaid" for merchant review.
* **Overpayment**: Marked as "paid," and the excess can be managed manually.
* **Late Payment**: Marked as "expired" unless the merchant chooses to accept it manually.

These safeguards ensure smooth and fair payment handling. ✅

***

#### 📱 **Can PePay be used on mobile devices?**

Yes! PePay offers mobile-friendly payment links and iframe options, ensuring a seamless experience for users on smartphones and tablets. 📲

***

#### 🌎 **Does PePay support multi-chain payments?**

Absolutely! PePay is **chain-agnostic**, supporting multiple blockchain networks like Ethereum, Solana, and more, making it highly versatile. 🔗

***

#### 🔧 **Where can I get support if I run into issues?**

Our team is here to help! For support, you can:

* Join our Discord Community 🤝
* Check out our Troubleshooting Guide 📘
* Contact us at <support@pepay.com> ✉️

***

#### 🛡️ **How secure is PePay?**

PePay is designed with **Fort Knox-level security**:

* Encrypted API keys 🔒
* Secure HTTPS protocols 🌐
* Webhook signature verification 🖋️ Your payments and data are always protected. 🔐

***

#### 🎉 **What’s next after setup?**

After completing the setup, you can:

* Create custom payment invoices 🧾
* Customize accepted tokens 🪙
* Integrate with platforms like Discord, Twitter, or Telegram for added functionality 🌟


# Pepay API

## PEPAY API Reference

Welcome to the PEPAY API documentation. This guide covers all API endpoints available through our REST API for cryptocurrency payment processing.

### Authentication

All API requests require authentication using an API key. Include your API key in the request headers:<br>

<pre class="language-javascript"><code class="lang-javascript"><strong>'x-api-key': 'your_api_key'
</strong></code></pre>

### Base URL

```
https://api.pepay.io
```

### Invoices

#### Create Invoice

Create a new payment invoice.

**POST** `/api/v1/invoices`

**Headers:**

```json
{
  "Content-Type": "application/json",
  "x-api-key": "your_api_key",
  "Idempotency-Key": "unique_request_id"
}
```

**Request Body:**

```json
{
  "amount_usd": 100.00,          // Required: Amount in USD (0.01-1,000,000)
  "description": "Order #1234",   // Optional: Invoice description
  "customer_id": "cust_123",     // Optional: Your customer identifier
  "metadata": {                  // Optional: Additional data
    "order_id": "1234",
    "product_id": "prod_456"
  },
  "expires_in": 3600000         // Optional: Expiration time in ms (default: 12h)
}
```

**Response:** `200 OK`

```json
{
  "id": "inv_abc123",
  "amount_usd": 100.00,
  "status": "unpaid",
  "payment_url": "https://pay.pepay.io/inv_abc123",
  "created_at": "2024-03-21T10:30:00Z",
  "expires_at": "2024-03-21T22:30:00Z",
  "customer_id": "cust_123",
  "metadata": {
    "order_id": "1234",
    "product_id": "prod_456"
  }
}
```

#### Get Invoice

Retrieve details of a specific invoice.

**GET** `/api/v1/invoices/{customer_id}`

**Headers:**

```json
{
  "x-api-key": "your_api_key"
}
```

**Response:** `200 OK`

```json
{
  "id": "inv_abc123",
  "amount_usd": 100.00,
  "status": "paid",
  "payment_url": "https://pay.pepay.io/inv_abc123",
  "created_at": "2024-03-21T10:30:00Z",
  "paid_at": "2024-03-21T10:35:00Z",
  "payment_details": {
    "network": "solana",
    "transaction_hash": "5KKsX...",
    "amount_paid": 100.00
  }
}
```

#### List Invoices

Get a paginated list of invoices.

**GET** `/api/v1/invoices`

**Query Parameters:**

* `page`: Page number (default: 1)
* `status`: Filter by status ('paid', 'unpaid', 'expired', 'all')
* `customer_id`: Filter by customer

**Headers:**

```json
{
  "x-api-key": "your_api_key"
}
```

**Response:** `200 OK`

```json
{
  "items": [...],
  "total": 50,
  "page": 1,
  "has_more": true
}
```

#### Get Invoice Totals

Get aggregated invoice statistics.

**GET** `/api/v1/invoices/totals`

**Headers:**

```json
{
  "x-api-key": "your_api_key"
}
```

**Response:** `200 OK`

```json
{
  "total_amount_usd": 1000.00,
  "total_paid_usd": 750.00,
  "total_unpaid_usd": 250.00,
  "total_expired_usd": 0.00,
  "invoice_count": {
    "total": 10,
    "paid": 7,
    "unpaid": 3,
    "expired": 0
  }
}
```

### Webhooks

#### Webhook Events

PEPAY sends webhook notifications for the following events:

| Event Type                | Description                     |
| ------------------------- | ------------------------------- |
| `invoice.paid`            | Full payment received           |
| `invoice.expired`         | Invoice expired without payment |
| `invoice.partial_payment` | Partial payment received        |
| `invoice.overpaid`        | Payment exceeds invoice amount  |

#### Webhook Payload

```json
{
  "id": "evt_123",
  "type": "invoice.paid",
  "created": 1679395200,
  "data": {
    "invoice_id": "inv_abc123",
    "status": "paid",
    "amount_paid": 100.00,
    "payment_network": "solana",
    "transaction_hash": "5KKsX..."
  }
}
```

#### Webhook Security

Verify webhook authenticity using the signature in headers:

* `x-pepay-signature`: HMAC SHA-256 signature
* `x-pepay-timestamp`: Unix timestamp of the request

### Error Handling

All API errors follow this format:

```json
{
  "error": "Error message",
  "code": "ERROR_CODE"
}
```

Common error codes:

* `INVALID_AMOUNT_FORMAT`: Invalid amount format
* `INVALID_AMOUNT_RANGE`: Amount outside allowed range
* `IDEMPOTENCY_KEY_MISSING`: Missing idempotency key
* `INVOICE_CREATE_FAILED`: Generic creation failure

### Rate Limits

* 100 requests per minute per API key
* Webhook retries: 3 attempts with exponential backoff


# Pepay SDK

> **Welcome to the official Pepay SDK Documentation!**\
> This guide explains how to install, configure, and integrate the Pepay SDK into your Node.js/TypeScript applications for seamless cryptocurrency payment processing.

***

### 1. Introduction

#### Overview

The **Pepay SDK** is a TypeScript/Node.js library that integrates seamlessly with the Pepay API. It enables merchants and developers to create invoices, manage payments, and set up webhooks for real-time notifications—while supporting features like multi-chain transactions, non-custodial wallets, and time-bound invoices.

#### Who Should Use This SDK?

* **Developers** building AI agent frameworks or merchant apps needing a crypto payment gateway.
* **Teams** seeking an easy-to-use integration that handles invoice creation, listing, and management via the Pepay platform.

### 2. Installation

#### NPM/Yarn

```bash
npm install @pepay/sdk
# or
yarn add @pepay/sdk
```

#### Requirements

* **Node.js** v14+
* **TypeScript** (optional but recommended)
* A valid **Pepay API key** (generated in the Pepay dashboard)

### 3. Quick Start

```typescript
import { PepaySDK } from '@pepay/sdk';

(async () => {
  // 1. Initialize SDK
  const pepay = new PepaySDK('YOUR_API_KEY');

  // 2. Create an invoice
  const invoice = await pepay.createInvoice({
    amount_usd: 99.99,
    description: 'Premium Subscription',
    customer_id: 'cust_123',
  });

  console.log('Invoice Created:', invoice);
})();
```

**Key Steps**

1. Install the SDK
2. Import `PepaySDK` into your application
3. Instantiate the SDK with your API key
4. Create and manage invoices as needed

### 4. Core Concepts

#### Invoices

* **Purpose**: Request and collect crypto payments from customers.
* **Attributes**: Each invoice has a unique ID, amount in USD, description, and expiration time.
* **Payment URLs**: A secure link is generated for customers to complete their payment in various cryptocurrencies.

#### Authentication

* **API Key**: All requests to the Pepay API must include a valid key.
* **Key Rotation**: API keys can be regenerated in the Pepay dashboard. They should be kept confidential and secured.

#### Idempotency

* **Usage**: Employ a unique idempotency key for each write operation (e.g., UUIDv4).
* **Benefit**: Prevents duplicate invoice creation and ensures reliable retries in case of network issues.

### 5. API Reference

#### 5.1 `createInvoice()`

Creates a new invoice for a specified USD amount.

```typescript
const invoice = await pepay.createInvoice({
  amount_usd: 100.00,         // Required
  description: 'Order #1234', // Optional
  customer_id: 'cust_123',    // Optional
  metadata: {                 // Optional
    order_id: '1234',
    product_id: 'prod_456'
  },
  expires_in: 3600000         // Optional, in ms
});
```

**Parameters**

* `amount_usd: number` – Invoice amount in USD
* `description: string` – Optional description of the invoice
* `customer_id: string` – Optional customer identifier
* `metadata: object` – Optional additional data
* `expires_in: number` – Optional custom expiration duration (in milliseconds)

**Returns**

* `Promise<Invoice>` – The created invoice object

***

#### 5.2 `listInvoices()`

Retrieves a paginated list of invoices based on specified criteria.

```typescript
typescriptCopyEditconst invoices = await pepay.listInvoices({
  page: 1,
  status: 'unpaid' // 'paid' | 'unpaid' | 'expired' | 'all'
});
```

**Parameters**

* `page: number` – Page number for pagination
* `status: string` – Invoice status filter (`paid`, `unpaid`, `expired`, or `all`)

**Returns**

* `Promise<Invoice[]>` – Array of invoices matching the filter

***

#### 5.3 `getCustomerInvoices()`

Lists all invoices associated with a specific customer.

```typescript
typescriptCopyEditconst customerInvoices = await pepay.getCustomerInvoices('cust_123');
```

**Parameters**

* `customer_id: string` – Unique identifier for the customer

**Returns**

* `Promise<Invoice[]>` – Array of invoices for the given customer

***

#### 5.4 `getInvoiceTotals()`

Retrieves a summary of total amounts and invoice counts for your Pepay account.

```typescript
const totals = await pepay.getInvoiceTotals();
/*
{
  total_amount_usd: 1000.00,
  total_paid_usd: 750.00,
  total_unpaid_usd: 250.00,
  total_expired_usd: 0.00,
  invoice_count: {
    total: 10,
    paid: 7,
    unpaid: 3,
    expired: 0
  }
}
*/
```

**Returns**

* `Promise<Totals>` – An object with aggregated invoice data

### 6. Webhook Integration

#### Overview

Pepay sends **webhook** events to notify your application about invoice status changes in real-time (e.g., when an invoice is paid, expires, or is partially paid). Handling these events ensures your system stays in sync with the latest payment state.

#### 6.1 Setting Up Webhooks

1. Configure your **webhook URL** in the Pepay dashboard.
2. Store your **webhook secret** securely—used for verifying request signatures.
3. Implement an endpoint in your application that can parse raw JSON bodies.

#### 6.2 Webhook Events

* `invoice.paid`
* `invoice.expired`
* `invoice.partial_payment`
* `invoice.overpaid`

#### 6.3 Sample Webhook Handler

```typescript
import express from 'express';
import crypto from 'crypto';

const app = express();

app.post('/webhooks/pepay', express.raw({ type: 'application/json' }), async (req, res) => {
  const signature = req.headers['x-pepay-signature'] as string;
  const timestamp = req.headers['x-pepay-timestamp'] as string;

  const isValid = verifyWebhookSignature(
    req.body,
    signature,
    timestamp,
    process.env.WEBHOOK_SECRET!
  );

  if (!isValid) {
    return res.status(400).send('Invalid signature');
  }

  const event = JSON.parse(req.body.toString());

  switch (event.type) {
    case 'invoice.paid':
      await handlePaidInvoice(event.data);
      break;
    case 'invoice.expired':
      await handleExpiredInvoice(event.data);
      break;
    // ... handle other events
  }

  res.json({ received: true });
});

function verifyWebhookSignature(
  payload: Buffer,
  signature: string,
  timestamp: string,
  secret: string
): boolean {
  const signedPayload = `${timestamp}.${payload.toString()}`;
  const expectedSignature = crypto
    .createHmac('sha256', secret)
    .update(signedPayload)
    .digest('hex');
  
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expectedSignature)
  );
}
```

### 7. Error Handling

All errors from the SDK are thrown as `PepayError`, which contains a `code` and a descriptive `message`.

```typescript
try {
  const invoice = await pepay.createInvoice({ amount_usd: 100 });
} catch (error) {
  if (error instanceof PepayError) {
    console.error(`Error ${error.code}: ${error.message}`);
  }
}
```

#### Common Error Codes

* `INVALID_AMOUNT_FORMAT`
* `INVALID_AMOUNT_RANGE`
* `IDEMPOTENCY_KEY_MISSING`
* `INVOICE_CREATE_FAILED`

### 8. Best Practices

1. **Idempotency**: Use a unique key (e.g., UUIDv4) for each write operation to handle retries safely.
2. **Error Handling**: Always catch and log `PepayError` to provide clear feedback in production.
3. **Webhook Integration**: Ensure real-time updates by subscribing to invoice events.
4. **Amount Validation**: Keep invoice amounts within `0.01–1,000,000.00 USD`.
5. **Expiration Times**: Configure durations that match your business needs, using the `expires_in` parameter.

### 9. Support & Resources

* **API & Docs**: <https://docs.pepay.io>
* **Status Page**: <https://status.pepay.io>&#x20;
* **Support Email**: <support@peperuney.pizza>
* **GitHub**: <https://github.com/peperuney/pepay-sdk>

### 10. Changelog & Versioning

* **v1.0.0**: Initial release, featuring invoice creation, listing, and webhook handling
* **v1.1.0**: Added partial payment functionality and improved logging

Stay updated by watching the [GitHub releases](https://github.com/peperuney/peperuney-sdk/releases).

***

**© 2025 Pepay. All rights reserved.**


# Pepay N8N

(Coming Soon)

## PEPAY n8n Integration

Transform your n8n workflows with PEPAY's cryptocurrency payment processing capabilities. Automate payment collection, invoice management, and payment status tracking seamlessly within your n8n instance.

> ⚠️ **BETA NOTICE**: This integration is currently in beta. While fully functional, features and APIs may change. While available on github,developers must create their own N8N credentials at this time.&#x20;

### Features

#### Payment Processing

* Create cryptocurrency payment invoices programmatically
* Support for multiple cryptocurrencies
* Real-time payment status tracking
* Automatic exchange rate calculations

#### Invoice Management

* Create and manage invoices
* Track payment statuses
* Search and filter invoices
* Calculate payment totals

#### Webhook Integration

* Real-time payment notifications
* Secure webhook validation
* Multiple event types support
* Automatic retry mechanism

### Installation (Coming Soon)

```javascript
npm install n8n-nodes-pepay
```

### Node Types

#### 1. PEPAY Node

Regular node for invoice operations:

* Create Invoice
* Get Invoice Details
* List Invoices
* Calculate Totals

#### 2. PEPAY Trigger Node

Webhook trigger node for real-time events:

* Payment Received
* Invoice Expired
* Partial Payment
* Payment Overpaid

### Configuration

#### Credentials Setup

1. Navigate to n8n Credentials
2. Add new credential
3. Select "PEPAY API"
4. Configure:
   * API Key
   * Environment (Production/Testnet)
   * Webhook Secret (for triggers)

#### Basic Usage

1. **Creating an Invoice**

```typescript


```

2. **Setting up Webhooks**

```typescript
```

### Node Reference

#### PEPAY Node Operations

**Create Invoice**

* **Input Parameters:**
  * Amount (USD)
  * Description
  * Customer ID (optional)
  * Metadata (optional)
  * Expiration Time (optional)

**Get Invoice**

* **Search Options:**
  * By Invoice ID
  * By Customer ID

**List Invoices**

* **Filtering Options:**
  * Status (paid/unpaid/expired)
  * Date Range
  * Customer ID

#### PEPAY Trigger Node

**Supported Events**

* `invoice.paid`: Full payment received
* `invoice.expired`: Invoice expiration
* `invoice.partial_payment`: Partial payment received
* `invoice.overpaid`: Payment exceeds invoice amount

**Security**

* Automatic signature verification
* Timestamp validation
* Secure webhook secrets

### Examples

#### Basic Payment Flow

```typescript
```

#### Advanced Usage

```typescript
```

### Error Handling

The integration provides comprehensive error handling:

* API errors with detailed messages
* Webhook validation failures
* Network connectivity issues
* Rate limiting handling

### Best Practices

1. **Webhook Security**
   * Always use HTTPS endpoints
   * Validate webhook signatures
   * Store webhook secrets securely
2. **Error Handling**
   * Implement proper error catching
   * Use retry mechanisms for transient failures
   * Log failed webhook deliveries
3. **Performance**
   * Use pagination for large invoice lists
   * Process webhooks asynchronously
   * Implement proper timeout handling

### Support & Resources

* <https://github.com/peperuney/pepay-n8n>
* [API Reference](/developers/pepay-api)
* [GitHub Issues](https://github.com/peperuney/pepay-n8n)
* Email: <support@peperuney.pizza>

### Coming Soon

* Advanced filtering options
* Batch operations
* Custom notification templates
* Enhanced reporting features
* Multi-currency support
* Advanced webhook configurations


# Pepay-ElizaOS


# API Documentation

### Overview

PEPAY provides a set of APIs for seamless integration with its AI-powered payment gateway system. These APIs enable developers to manage API keys, access invoice data, process payments, and customize settings for their use cases.

***

### Authentication

PEPAY uses API keys for authenticating API requests. Ensure that you include the API key in the headers of every request. Unauthorized requests will return a `401 Unauthorized` response.

***

### API Endpoints

#### **1. API Key Management**

**Create API Key**

* **Description**: Generate a new API key for authentication.
* **Method**: POST
* **Parameters**: None
* **Response**: Returns the newly created API key.

**Delete API Key**

* **Description**: Revoke an existing API key.
* **Method**: DELETE
* **Parameters**: API key to be deleted
* **Response**: Confirmation of deletion.

***

#### **2. Merchant APIs**

**GetInvoice by Customer ID**

* **Description**: Retrieve all invoices associated with a specific customer ID.
* **Method**: GET
* **Parameters**:
  * `customer_id`: The unique ID of the customer
* **Response**: List of invoices.

**GetInvoice by Payment Status**

* **Description**: Retrieve invoices filtered by payment status.
* **Method**: GET
* **Parameters**:
  * `status`: The payment status (e.g., `paid`, `pending`, `failed`)
* **Response**: List of invoices matching the specified status.

**Total Payment in USD**

* **Description**: Get the total value of payments made in USD.
* **Method**: GET
* **Parameters**: None
* **Response**: Total payment amount in USD.

**Select Supported Networks**

* **Description**: Choose which blockchain networks are supported for transactions.
* **Method**: POST
* **Parameters**:
  * `networks`: List of supported networks (e.g., Solana, Polygon, BSC)
* **Response**: Confirmation of selected networks.

**Get Total Invoice in USD**

* **Description**: Retrieve the total invoice amount in USD.
* **Method**: GET
* **Parameters**: None
* **Response**: Total invoice amount in USD.

***

#### **3. Invoice APIs**

**CreateInvoice**

* **Description**: Create a new invoice for a transaction.
* **Method**: POST
* **Parameters**:
  * `customer_id`: Unique ID of the customer
  * `additional_data`: Optional additional metadata
  * `questions`: Optional questions or prompts associated with the invoice
* **Response**: Confirmation of invoice creation.

***

#### **4. Configuration APIs**

**SetRPC**

* **Description**: Configure the Remote Procedure Call (RPC) endpoint for blockchain operations.
* **Method**: POST
* **Parameters**:
  * `rpc_url`: The URL of the RPC endpoint
* **Response**: Confirmation of RPC configuration.

**SetWebHook**

* **Description**: Configure a webhook for real-time notifications.
* **Method**: POST
* **Parameters**:
  * `webhook_url`: The URL of the webhook
* **Response**: Confirmation of webhook configuration.

***

### SDKs and Integrations

#### **SDK**

* **GitHub Link**: \[Insert Link Here]

#### **AI Integrations**

* **AI16z**: Coming Soon
* **ARC**: Coming Soon

***

### Notes

* Ensure proper handling of API keys to prevent unauthorized access.
* Use supported blockchain networks for transactions.
* For additional support, contact the PEPAY development team.


# Quickstart Guide

```
git clone https://github.com/elizaos/eliza.git 
```

### Prerequisites 📋

Before getting started with PePay, ensure you have:

* **Node.js 23+** 🟢\
  [Download Node.js](https://nodejs.org/)
* **pnpm 9+** 📦\
  Install pnpm
* **Git for version control** 🔄\
  [Get Git](https://git-scm.com/)
* **A code editor (VS Code or VSCodium recommended)** 🖥️\
  [Download VS Code](https://code.visualstudio.com/)
* **CUDA Toolkit** (optional, for GPU acceleration) ⚡\
  [Install CUDA Toolkit](https://developer.nvidia.com/cuda-downloads)

### Installation 🔧

#### Clone and Install 🖇️

1. **Clone the Repository**:

   ```bash
   bashCopyEditgit clone https://github.com/pepay/pepay.git
   ```
2. **Enter the Directory**:

   ```bash
   bashCopyEditcd pepay
   ```
3. **Switch to Latest Tagged Release**:

   ```bash
   bashCopyEditgit checkout $(git describe --tags --abbrev=0)
   ```
4. **Install Dependencies** (for the initial run):

   ```bash
   bashCopyEditpnpm install --no-frozen-lockfile
   ```

   Learn more about pnpm installation

PEPAY is a decentralized AI payment gateway system designed to streamline transactions and interactions between blockchain ecosystems, AI agents, and end-user applications such as trading bots, retail purchases, DeSci, and gaming. It serves as a critical intermediary that leverages blockchain networks, AI libraries, and customer/inventory data to facilitate secure, efficient, and intelligent payment operations\
\
**Key Components**

## 1. Input Sources📥

PePay integrates multiple blockchain ecosystems and AI libraries to gather transactional data and enable seamless payment functionality.

**Blockchain Networks 🌐**

* Solana
* Polygon
* Binance Smart Chain (BSC)
* Avalanche
* Arbitrum

**AI Agent Frameworks 🤖**

* Ai16z
* ZeroBro
* ARC
* Virtuals
* ElizaOS

**LLM Frameworks 🧠**

* DeepSeek
* Anthropic
* Grok
* ChatGPT
* Gemini

## 2. Core Pepay Engine⚙️

The PePay engine is the heart of the architecture, comprising the following modules:

* **AI Agent Libraries**: Provide tools and frameworks for AI agents to process payment instructions and make intelligent decisions. 🧩
* **Non-Custodial Wallets**: Enable secure, decentralized storage and transfer of digital assets without intermediaries. 🔒
* **Customer Data**: A repository for user and client metadata to enhance personalization and transaction accuracy. 🗂️
* **Inventory Data**: Manages asset stock levels, ensuring reliable availability for AI-driven operations. 📦

## 2. **Core PEPAY Engine**

## 3. **AI Agents**&#x20;

AI Agents are the primary beneficiaries of PePay, utilizing the payment gateway’s tools to enable functionality in various domains:

**Use Cases 💡**

* **Trading Bots**: Execute automated trading strategies with real-time access to blockchain transactions and analytics. 📈
* **Retail Purchases**: Facilitate e-commerce and point-of-sale transactions. 🛍️
* **DeSci (Decentralized Science)**: Drive decentralized funding, collaboration, and payments for scientific research projects. 🔬
* **Gaming**: Support in-game economies, micropayments, and cross-platform transactions. 🎮

## Interactions & Overview🔄

Process Overview 🌀

### Scalability and Extensibility 🚀

## API Documentation 🔐

###

## Getting Started with PepePay 🚀💰🌟

### Prerequisites 🛠️✅📋

Before diving into PepePay, ensure you have the following ready:

* **Node.js 16+**: [Download Node.js](https://nodejs.org/). 🖥️✨
* **A PepePay Account**: [Sign up for PepePay](https://pepepay.com/register). 🖊️🔑
* **Git for Version Control**: [Install Git](https://git-scm.com/). 📂🔄
* **Code Editor**: [Download VS Code](https://code.visualstudio.com/). 🖌️📘

### Installation 🖥️📦✨

Follow these steps to set up PepePay on your local environment:

1. **Clone the Repository** 🛠️:

   ```bash
   git clone https://github.com/pepepay/pepepay.git
   ```
2. **Enter the Directory** 📂:

   ```bash
   cd pepepay
   ```
3. **Install Dependencies** 📥:

   ```bash
   npm install
   ```
4. **Build the Project** 🏗️:

   ```bash
   npm run build
   ```
5. **Configure Environment Variables** 🔧: Copy the example `.env` file and customize it for your setup:

   ```bash
   cp .env.example .env
   ```

   Edit `.env` to include your keys:

   ```
   API_KEY=your_api_key_here
   WEBHOOK_URL=https://yourdomain.com/webhook
   ```

### Choose Your Payment Model 🔄💵💡

PepePay supports various payment models to suit your business needs:

* **Hosted Payment Links** 🌐: Perfect for quick payment setups.
* **Embeddable Iframes** 🖼️: Seamlessly integrate with your website.
* **API Integration** 🔑: Build custom payment flows with full flexibility.

Refer to the [PepePay API Documentation](https://pepepay.com/docs/api) for detailed setup instructions. 📚✨

### Local Testing & Inference 🧪⚙️🔍

Set up a local testing environment to simulate payments:

1. **Start the Local Server** 🖥️:

   ```bash
   npm run start
   ```
2. **Access the Dashboard** 📊: Open [http://localhost:3000](http://localhost:3000/) in your browser. 🌐✨
3. **Simulate Payments** 💳: Use the dashboard to create invoices and test payment flows. 🔄💡

### Create Your First Invoice 🧾📥🎉

1. **Log In to Your Account** 🔐: Visit [PepePay Login](https://pepepay.com/login) and enter your credentials. 🔑✨
2. **Navigate to Invoices** 📂: Go to the "Invoices" section in the dashboard. 📊📘
3. **Fill in Details** 📝:
   * Enter the amount in USD.
   * Select accepted cryptocurrencies.
   * Add optional metadata (e.g., order ID). 💵🧾
4. **Generate Invoice** 🔄: Click "Create" to generate the payment link or iframe. 🌐✨

### Platform Integration 🌍🔗📜

PePay offers integrations with popular platforms:

#### Discord Bot Setup 🤖💬✨

1. **Create a Bot**:
   * Visit the [Discord Developer Portal](https://discord.com/developers/applications). 🔗
   * Create a new application and generate a bot token. 🔑
2. **Configure PepePay**:
   * Add your bot token to `.env`:

     ```
     DISCORD_BOT_TOKEN=your_discord_token_here
     ```
3. **Run the Bot**:

   ```bash
   npm run discord-bot
   ```
4. **Add to Server**: Use the OAuth2 URL to invite the bot to your Discord server. 💬✨

### Basic Usage Examples 🛠️📚🎯

#### Chat with PePay 💬💡

Start the chat interface to interact with PePay:

```bash
npm run chat
```

#### Create Multiple Invoices 📊📂

Use the dashboard or API to create and manage multiple invoices at once. 🚀🎉

### Common Issues & Solutions 🔧❓✅

1. **Node.js Version Error**:
   * Ensure Node.js 16+ is installed. Use:

     ```bash
     node -v
     ```
2. **Missing Dependencies**:
   * Run:

     ```bash
     npm install
     ```
3. **Environment Variable Issues**:
   * Verify `.env` is correctly configured. 🌟🔍

### Next Steps 🌟🚀📈

Now that you’re set up, explore:

* [**Advanced Features**](https://pepepay.com/docs/advanced): Dive deeper into PePay’s capabilities. 📘✨
* [**Join the Community**](https://pepepay.com/community): Connect with other users and developers. 💬🌟
* [**API Documentation**](https://pepepay.com/docs/api): Build custom integrations with our detailed API docs. 📚🔗


# FAQ

#### 🌟 **What is PePay?**

PePay is a secure, flexible, and user-friendly crypto payment gateway that allows businesses to accept and manage cryptocurrency payments seamlessly. It supports multiple tokens and chains, making it ideal for businesses of all sizes. 💰

***

#### 🚀 **How do I get started with PePay?**

Getting started is simple! Visit the Getting Started Guide for detailed steps, including prerequisites, installation, and setup instructions. You’ll be up and running in no time! 🛠️

***

#### 💡 **What cryptocurrencies does PePay support?**

PePay supports a wide range of cryptocurrencies, including Ethereum (ETH), Solana (SOL), USDC, and more. You can customize which tokens you accept at the global, merchant, or invoice level. 🌐

***

#### 🔐 **Is PePay custodial or non-custodial?**

PePay is **non-custodial**, meaning businesses retain full control over their private keys and funds. This ensures maximum security and minimizes centralized risks. 🔒

***

#### 📊 **Does PePay support automatic conversion to fiat or stablecoins?**

Yes, PePay allows businesses to choose between keeping payments in their original cryptocurrency or converting them automatically to stablecoins like USDC. This flexibility sets PePay apart from competitors. 💹

***

#### 🛠️ **What integrations does PePay offer?**

PePay integrates seamlessly with platforms like:

* Discord for bot integration 🤖
* Twitter for payment notifications 🐦
* Telegram for quick alerts and interactions 📲

Check out the **Platform Integration** section in the documentation for setup guides! 🚀

***

#### 💸 **What are PePay’s pricing and fees?**

PePay offers **transparent pricing**, with either a small flat fee or percentage-based transaction fees. There are no hidden costs, making it ideal for small to mid-sized businesses. 💵

***

#### ⏱️ **What is the time-based API key feature in PePay?**

PePay’s **time-based API keys** enhance security by ensuring keys automatically expire after a set duration. This protects your system from unauthorized or stale API calls. 🔑

***

#### 🤔 **What happens if a payment is underpaid, overpaid, or late?**

PePay is designed to handle edge cases intelligently:

* **Underpayment**: Flagged as "underpaid" for merchant review.
* **Overpayment**: Marked as "paid," and the excess can be managed manually.
* **Late Payment**: Marked as "expired" unless the merchant chooses to accept it manually.

These safeguards ensure smooth and fair payment handling. ✅

***

#### 📱 **Can PePay be used on mobile devices?**

Yes! PePay offers mobile-friendly payment links and iframe options, ensuring a seamless experience for users on smartphones and tablets. 📲

***

#### 🌎 **Does PePay support multi-chain payments?**

Absolutely! PePay is **chain-agnostic**, supporting multiple blockchain networks like Ethereum, Solana, and more, making it highly versatile. 🔗

***

#### 🔧 **Where can I get support if I run into issues?**

Our team is here to help! For support, you can:

* Join our Discord Community 🤝
* Check out our Troubleshooting Guide 📘
* Contact us at <support@pepay.com> ✉️

***

#### 🛡️ **How secure is PePay?**

PePay is designed with **Fort Knox-level security**:

* Encrypted API keys 🔒
* Secure HTTPS protocols 🌐
* Webhook signature verification 🖋️ Your payments and data are always protected. 🔐

***

#### 🎉 **What’s next after setup?**

After completing the setup, you can:

* Create custom payment invoices 🧾
* Customize accepted tokens 🪙
* Integrate with platforms like Discord, Twitter, or Telegram for added functionality 🌟

## FAQ: Frequently Asked Questions about PePay ❓💬

#### 🌟 **What is PePay?**

PePay is a secure, flexible, and user-friendly crypto payment gateway that allows businesses to accept and manage cryptocurrency payments seamlessly. It supports multiple tokens and chains, making it ideal for businesses of all sizes. 💰

***

#### 🚀 **How do I get started with PePay?**

Getting started is simple! Visit the Getting Started Guide for detailed steps, including prerequisites, installation, and setup instructions. You’ll be up and running in no time! 🛠️

***

#### 💡 **What cryptocurrencies does PePay support?**

PePay supports a wide range of cryptocurrencies, including Ethereum (ETH), Solana (SOL), USDC, and more. You can customize which tokens you accept at the global, merchant, or invoice level. 🌐

***

#### 🔐 **Is PePay custodial or non-custodial?**

PePay is **non-custodial**, meaning businesses retain full control over their private keys and funds. This ensures maximum security and minimizes centralized risks. 🔒

***

#### 📊 **Does PePay support automatic conversion to fiat or stablecoins?**

Yes, PePay allows businesses to choose between keeping payments in their original cryptocurrency or converting them automatically to stablecoins like USDC. This flexibility sets PePay apart from competitors. 💹

***

#### 🛠️ **What integrations does PePay offer?**

PePay integrates seamlessly with platforms like:

* Discord for bot integration 🤖
* Twitter for payment notifications 🐦
* Telegram for quick alerts and interactions 📲

Check out the **Platform Integration** section in the documentation for setup guides! 🚀

***

#### 💸 **What are PePay’s pricing and fees?**

PePay offers **transparent pricing**, with either a small flat fee or percentage-based transaction fees. There are no hidden costs, making it ideal for small to mid-sized businesses. 💵

***

#### ⏱️ **What is the time-based API key feature in PePay?**

PePay’s **time-based API keys** enhance security by ensuring keys automatically expire after a set duration. This protects your system from unauthorized or stale API calls. 🔑

***

#### 🤔 **What happens if a payment is underpaid, overpaid, or late?**

PePay is designed to handle edge cases intelligently:

* **Underpayment**: Flagged as "underpaid" for merchant review.
* **Overpayment**: Marked as "paid," and the excess can be managed manually.
* **Late Payment**: Marked as "expired" unless the merchant chooses to accept it manually.

These safeguards ensure smooth and fair payment handling. ✅

***

#### 📱 **Can PePay be used on mobile devices?**

Yes! PePay offers mobile-friendly payment links and iframe options, ensuring a seamless experience for users on smartphones and tablets. 📲

***

#### 🌎 **Does PePay support multi-chain payments?**

Absolutely! PePay is **chain-agnostic**, supporting multiple blockchain networks like Ethereum, Solana, and more, making it highly versatile. 🔗

***

#### 🔧 **Where can I get support if I run into issues?**

Our team is here to help! For support, you can:

* Join our Discord Community 🤝
* Check out our Troubleshooting Guide 📘
* Contact us at <support@pepay.com> ✉️

***

#### 🛡️ **How secure is PePay?**

PePay is designed with **Fort Knox-level security**:

* Encrypted API keys 🔒
* Secure HTTPS protocols 🌐
* Webhook signature verification 🖋️ Your payments and data are always protected. 🔐

***

#### 🎉 **What’s next after setup?**

After completing the setup, you can:

* Create custom payment invoices 🧾
* Customize accepted tokens 🪙
* Integrate with platforms like Discord, Twitter, or Telegram for added functionality 🌟


# Pepay Protocol Roadmap

Tasks coming up for Pepay

As the protocol reaches full production readiness, the following roadmap outlines the immediate next steps toward scaling adoption, ensuring system robustness, and expanding multi-chain coverage.

***

### 🔄 Phase: Transition to Full MainNet Availability

**Status: In Progress ✅**

The core payment infrastructure is live and operational across supported networks. The next focus is ensuring long-term reliability, secure settlement pipelines, and developer tooling for broader adoption.

#### ✅ MainNet Transition Milestones

* ✅ **Testnet/Mainnet Parity Achieved** — Unified RPC layer for cross-environment consistency
* 🚧 **99.9% Uptime SLA** — Moving toward enterprise-grade availability targets
* ◻️ **Increasing Settlement Robustnes - Making sure on failure cases automation in place to handle especially in dynamic swaps**
* ✅ **Audititable Settlement Pipeline** — Verifiable logs and dispute resolution architecture
* ◻️ **Mainnet Usage Analytics** — Volume, error rate, uptime, transaction speed monitoring

***

### 🔌 Phase: Agent SDK & Decentralized Marketplace 🚀

**Focus: Enable open discovery, self-service onboarding, and verifiable performance**

#### 🧱 Core Agent Layer (Planned)

* ◻️ **Agent SDK** — UI components & backend wrappers for agent integration
* ◻️ **Agent Discovery Protocol** — Public marketplace to browse by category, service, rating
* ◻️ **Agent service search**— Agent discovery. Agent availability, pricing, and verified performance metrics
* ◻️ **Performance Analytics** — Built-in dashboards for agents to track growth and reputation

This layer formalizes the **trustless agent economy** on top of your composable service/payment rails.

***

### 🔁 Phase: Ecosystem Hardening & Chain Expansion (Gen1 🔜)

**Focus: Infrastructure resilience and developer scalability**

#### ⚙️ Network Stability

* 🚧 **Multi-Network Support in RPC Layer** — Current testnet/mainnet shared architecture
* ◻️ **Gas Fee Optimization Engine** — Estimate & auto-adjust gas costs across chains
* ◻️ **Fiat Equivalent Stables optomisation** — Estimate & auto-adjust gas costs across chains

#### 🔗 New Chains & Protocols

* 🚧 **Avalanche (AVAX) Testnet Integration**
* ◻️ **Cross-Chain Transfer Routes** — Generalized asset routing logic
* ✅ **Token Expansion Framework** — Easily onboard new tokens with on-chain config, Built for solana, bnb, base, any evm&#x20;
  * add SUI APTO AND XRP&#x20;

#### 👨‍💻 Developer Tooling

* ✅ **User Onboarding Flow (Internal)**
* ◻️ **Python SDK**
* ◻️ **Admin Inventory Management Tools**
* ◻️ **Farcaster Frames Integration**
* 🚧 **Pydantic-Based Type Enforcement (Backend Stability)**
* ◻️ **Virtuals Integration for AI Agent Compatibility**

***

### 🌟 Gen2 – Yield & Protocol-Owned Liquidity (R\&D)

**Focus: Ecosystem value capture and decentralized capital flows**

Planned modules:

* ◻️ **Yield Layer for $USD1** — Protocol-native stablecoin yield strategy
* ◻️ **Liquidity Routing Vaults** — Custom routing for LP-backed yield products
* ◻️ **Settlement Buffer Contracts** — Hold-and-distribute contracts to absorb volatility
* ◻️ **On-Chain Fee Streams** — Trackable, redeemable protocol revenue in real time

***

### 🛒 E-Commerce Integrations

**Focus: Embedded crypto checkout across major site builders & open-source commerce platforms**

Your protocol is becoming plug-and-play across the most widely used CMS and commerce platforms. The goal: make it effortless for creators, merchants, and nonprofits to accept crypto payments on their own sites — no coding required.

#### ✅ Completed

* **WordPress Plugin** — Full Pepay integration via shortcode or widget
  * Drag-and-drop embed
  * Admin UI for connecting wallets & supported tokens
  * Auto-generation of invoices via WooCommerce hooks (optional)

#### 🚧 In Progress

* **Wix Plugin**
  * Web-based iframe drop-in
  * OAuth-based creator login with keyless connection
* **PrestaShop Integration**
  * Open-source module
  * Full crypto payment flow for merchants with zero custody

#### 🔜 Planned (Q3)

* **OpenCart**
* **Magento**
* **Ghost CMS**
* **Drupal Commerce**

These integrations will follow the same model:

* Non-custodial wallet setup (with optional escrow)
* Configurable tokens/networks per store
* Payment status webhooks and invoice tracking

#### ❌ Not Currently Supported

* **Shopify**
  * Due to API limitations on custom payment providers
  * Under evaluation pending future partnership/Shopify Plus support

***

**Why it matters:**\
This layer unlocks *massive real-world utility*—turning basic websites into crypto-native storefronts and donation portals with 5-minute installs. From WordPress bloggers to PrestaShop retailers, your protocol meets users where they are.

***

### 🧱 Ongoing Infrastructure Upgrades

* ◻️ **Continued Network Hardening** — Monitoring, rate limiting, cache isolation
* ◻️ **Settlement Failure Simulation** — Internal tooling to test protocol-wide settlement failure conditions
* ◻️ **Security Reviews** — Recurring internal + external audits (Q3 onwards)
* ◻️ **Token Whitelisting Portal** — Permissionless but verifiable token addition mechanism
* ◻️ **Multi-Region Redundancy** — Geo-distributed RPC + webhook system resilience

***

### 🔭 Summary

Next step: unlock developer velocity and liquidity loopbacks.

* ◻️ Unified Assets System
* ◻️ Multiple Off-Ramp APIs&#x20;

***

### Future Improvements 🔮

| Category           | Initiatives                          | Status           |
| ------------------ | ------------------------------------ | ---------------- |
| **Chain Support**  | Polygon ◻️, TON ◻️, Near Protocol ◻️ | In consideration |
| **Dev Experience** | Python SDK 🚧                        | Q2 target        |
| **Security**       | Third-party audits ✅                 | 🚧 In Progress   |
| **Community**      | Ambassador program 🚧                | Onboarded 100+   |

**Key**:\
✅ = Completed | 🚧 = In Progress | ◻️ = Not Started

***

> *"Shipping beats perfection"* - Updated weekly in our development sprints


# Milestones & Accomplishments

> **“The best way to prove your value is to work. It is to learn, it is to absorb and be a sponge.**\
> **But you always want to outwork your potential. As hard as you believe you can work, you can work harder than that.”**\
> — *Kobe Bryant*

***

<details>

<summary>🚧 <strong>Phase: Dough</strong> — Core Infrastructure &#x26; Multi-Chain Foundation</summary>

#### 🔧 Core Services

* ✅ **Supported Blockchains** — Solana, BSC, Base, USD1
* ✅ **Webhook Notification System** — Real-time transaction updates with built-in redundancy
* ✅ **Redundancy Systems** — Multi-node logging & automatic failovers
* ✅ **TypeScript SDK** — Node-based developer toolkit with full type definitions
* ✅ **Dev Console** — API key management, invoice dashboard & token settings
* ✅ **Pepay Purchase Iframe** — Secure, embeddable checkout widget
* ✅ **Merchant Webhook Integration** — Instant backend event delivery
* ✅ **Frames Builder** — No-code iframe generator for quick embeds
* ✅ **Testnet APIs (v0.1)** — Early developer access endpoints
* ✅ **Gated Mainnet Router** — Controlled production environment entry

#### 🛠 Developer Tools & Integrations

* ✅ **n8n Workflow Node** — Automated backend workflows
* ✅ **AI16z Agent Plugin** — AI-swarm orchestration utilities
* ✅ **WordPress Plugin** — Simple shortcode/embed support
* 🔜 **Wix & PrestaShop Modules** — Q3 rollout
* 🔜 **OpenCart & Magento Extensions** — Planning stage

</details>

***

<details>

<summary>🧀 <strong>Phase: Cheese</strong> — Agent Commerce System</summary>

#### 🧩 Agent Core

* ✅ **Agent Categories DB** — Admin-managed hierarchical taxonomy
* ✅ **Agent Registration & Verification** — Self-service onboarding with optional KYC
* ✅ **Secure API Keys** — 2-key limit, per-agent rate limiting
* ✅ **Marketplace Integration** — Agent services alongside merchant products

#### 💬 Communication & Workflow

* ✅ **Invoice-Backed Hiring** — Trustless service agreements with built-in escrow
* ✅ **Real-Time Messaging** — Secure WebSocket chat during active jobs
* ✅ **Webhook-Driven Events** — Lifecycle triggers for external systems
* ✅ **Status Tracking UI** — Clear pending → in-progress → completed flow

#### 💸 Trust & Escrow

* ✅ **Trustless Escrow** — Automatic release on completion or expiration
* ✅ **Service Reviews & Ratings** — Agent-level, per-job feedback
* ✅ **Reputation Aggregation** — Immutable scorecards & leaderboards

#### 🔒 Security & Compliance

* ✅ **Progressive Authentication** — Audit-logged lockouts & risk scoring
* ✅ **SQL Injection Protection** — Parameterized queries everywhere
* ✅ **Multi-Layer Rate Limiting** — IP + agent + endpoint controls
* ✅ **Comprehensive Audit Logs** — Every action recorded

#### 🛠️ Agent Developer Experience

* ✅ **RESTful API Endpoints** — CRUD for services, jobs & reviews
* ✅ **Swagger/OpenAPI Schemas** — Versioned contract definitions
* ✅ **SLA-Aware Assignment Logic** — Auto-assign based on load & availability
* ✅ **Webhook Consumer SDK** — Simplified event subscriptions

</details>

***

<details>

<summary>🌐 <strong>Phase: Sauce</strong> — Fiat Equivalent Settlment, Fee Payer, &#x26; Cross-Chain Asset Unification</summary>

* ✅ **Native EVM Gas Swaps** — Abstract gas fees at checkout
* ✅ **Stablecoin Settlements** — Auto-convert to USDC & USD1
* ✅ **Testnet Faucet** — Pre-funded Pepay USD stablecoins for QA & demos
* 🔜 **Cross-Chain Analytics** — End-to-end tracing of asset flows
* 🔜 **Slippage Optimization Engine** — Minimize costs on large transfers

</details>

***

<details>

<summary>💰 <strong>Creator &#x26; Consumer Payment Platform</strong> — Days from Production Ready</summary>

#### 👤 Account Infrastructure

* ✅ **Multi-Account Types** — Specialized dashboards for Influencers & NPOs
* ✅ **Elite Authentication** — Progressive lockouts, 2FA & audit trails
* ✅ **Admin Verification** — Manual approval workflow for NPO legitimacy
* ✅ **Custom Profiles** — Media galleries, branding & social links

#### 💳 Payment Infrastructure

* ✅ **Multi-Chain Support** — Solana, BSC, Base & USD1
* ✅ **Non-Custodial Wallets** — Users retain full private-key control
* ✅ **Single-Address Receiving** — Simplified entry point per network
* ✅ **WebSocket Notifications** — Instant transaction alerts

#### 🎯 Creator Monetization Features

* ✅ **Donation Workflows** — Custom amounts, messages & goal tracking
* ✅ **Auto Goal Renewal** — Monthly target rollover automation
* ✅ **Settlement Preferences** — Choose stablecoin vs. original token payouts

#### 🖼️ Public Profile UX

* ✅ **Branded Pages** — Custom banners, CTAs & media embeds
* ✅ **Social Integrations** — One-click linkouts to major platforms
* ✅ **Promotional Widgets** — Highlight fundraising campaigns

#### 🕊️ NPO-Specific Enhancements

* ✅ **Mission Statements** — Dedicated fields & prominent display
* ✅ **Extended Campaigns** — Multi-year timelines (up to 30 years)
* ✅ **Enhanced KYC & Reporting** — Donor transparency & compliance

#### 🧾 Advanced Payment Capabilities

* ✅ **Automated Invoicing** — On-chain receipts for every transaction
* ✅ **Immutable Logs** — Verifiable history for auditors
* ✅ **Cross-Network Parity** — Mainnet & testnet functionality
* ✅ **Donor Feedback Loop** — Built-in “thank you” messaging system

#### 🔐 Security & Admin Controls

* ✅ **Encrypted Key Vault** — Pincode-protected private keys
* ✅ **Risk Scoring & Alerts** — Adaptive security measures
* ✅ **Full Audit Logging** — Every account action recorded
* ✅ **Admin Control Panel** — Account activation/deactivation & logs

### 📝 Core Content Management System

* &#x20;✅ Markdown Content Engine — Full rich text support with security sanitization
* ✅ Multi-Format Content Storage — Raw markdown, HTML render, and plain text indexing
* ✅ DOMPurify Security Layer — XSS prevention with strict HTML allowlist
* ✅ 5,000 Character Posts — Increased from 2,500 for rich article support
* ✅ Freemium Post Model — First 5 posts free, unlimited subscriber content
* ✅ Post Promotion/Demotion — Dynamic tier management between free/subscriber
* ✅ Single Pin System — One pinned post per account for clean profiles

### 🔒 Security & Content Safety

* ✅ CSAM Detection Integration&#x20;
* ✅ Content Sanitization&#x20;
* ✅ Rate Limiting&#x20;
* ✅ Input Validation&#x20;
* ✅ Authentication Layers&#x20;
* ✅ Security Incident Logging&#x20;

### 🌐 Multi-Chain Wallet Authentication

* ✅ Blockchain Support&#x20;
* ✅ Challenge-Response Auth&#x20;
* ✅ Donation-Based Access&#x20;
* ✅ Wallet Credentials&#x20;
* ✅ Access Control Matrix&#x20;

### 📊 Database Architecture

* ✅ Content Schema&#x20;
* ✅ Post Management&#x20;
* ✅ Freemium Tracking&#x20;
* ✅ Security Tables&#x20;
* ✅ Performance Indexing — Optimized queriess

### ⚡ Performance Optimizations

* ✅ Write-Time Processing — Markdown→HTML conversion at creation (not read-time)
* ✅ Two-Tier API Design — Lightweight lists + full details endpoints
* ✅ Intelligent Cachin
* ✅ Async Operations — Non-blocking view counts and media deletion
* ✅ Query Optimization
* ✅ Signed URL Management

### 🛠 API Routes & Endpoints

* ✅ Account Posts API — -- markdown validation
* ✅ Public Posts Discovery&#x20;
* ✅ Private Posts Access
* ✅ Freemium Status&#x20;
* ✅ Post Management — Pin/unpin, promote/demote, publish controls

### 📚 Developer Experience

* ✅ Comprehensive Swagger Docs
* s✅ Markdown Guide Integration&#x20;
* ✅ Response Standardization&#x20;
* ✅ Type Safety — Full schema definitions for all request/response objects
* ✅ Error Handling — Graceful degradation with detailed error context

### 🎯 Content Creator Features

* ✅ Rich Text Authoring&#x20;
* ✅ Media Attachments — 10MB limit with image/video/audio support
* ✅ Content Scheduling — Publish/unpublish
* ✅ Subscriber Previews — Truncated content teasers for non-subscribers
* ✅ Analytics Tracking&#x20;

### 🔄 Validation & Middleware

* ✅ Markdown Validator — Secure content processing with syntax validation
* ✅ File Type Validation — JavaScript-compatible media formats only
* ✅ UUID Validation — Proper format checking for all resource IDs
* ✅ Pagination Logic — Safe offset/limit handling with performance caps✅ Authentication Pipeline — Multi-layer auth with graceful fallbacks

</details>

***

<details>

<summary> 💳 Payment Iframe System — <em>Production Deployed</em></summary>

#### 🧱 Frontend Interface

* ✅ React-Based Payment UI — Material-UI, responsive
* ✅ Multi-Network Support — Solana, BSC, Base with testnet/mainnet toggle
* ✅ Token Selector — Real-time pricing
* ✅ QR Code Generation — Mobile wallet ready

#### 🔐 Wallet Integration

* ✅ Phantom (Solana)
* ✅ RainbowKit (EVM: MetaMask, Coinbase, WalletConnect, etc.)
* ✅ Network Auto-Detection
* ✅ Transaction Validation & Expiry

#### 🌐 Chain Support

* ✅ BNB&#x20;
* ✅ Solana
* ✅ Base
* ✅ Real-Time Processing via WebSockets

#### 🧠 UX Features

* ✅ Status Tracking
* ✅ Network Switch Modal
* ✅ Expiration Countdown
* ✅ Error Handling

#### ⚙️ Infra & DevOps

* ✅ Google Cloud CI/CD with PowerShell
* ✅ Global CDN, SSL, Static IP, Load Balancer
* ✅ Secure CORS Configuration

#### 👨‍💻 Developer Experience

* ✅ Modular React Components
* ✅ Environment Config Management
* ✅ Central Token Registry
* ✅ Build Optimization

#### 🔒 Security

* ✅ Tab Conflict Prevention
* ✅ Network Enforcement
* ✅ CSP Headers for Iframe Security

#### 🧩 Iframe Integration

* ✅ Embeddable Anywhere
* ✅ CORS Support
* ✅ Fully Responsive
* ✅ Custom Theme Support

</details>

***

<details>

<summary>🔍 Bonus Accomplishment Dump (Stuff That Didn't Fit Neatly But Slaps)</summary>

Sometimes greatness is too detailed to be boxed in. Here’s the **overflow bin of flexes**:

* ✅ **Merchant Webhook Integration** – We speak fluent webhook. Your server knows the second anything moves.
* ✅ **Frames Builder** – Like Squarespace for payment embeds, but cooler and for nerds.
* ✅ **Goal Auto-Renewal** – Set it and forget it. Your fundraising goals will outlive your calendar.
* ✅ **Donation Responses** – Donors get love too. Send automated “thanks, legend” notes.
* ✅ **Cross-Origin Support** – Our iframe has better boundaries than most exes.
* ✅ **Static IP & Load Balancer** – Because your checkout deserves 99.9% swagger uptime.
* ✅ **Pincode-Protected Key Access** – More secure than your phone when someone asks “who’s texting you?”
* ✅ **Full Audit Logs** – Every click, every commit, every villain arc—logged.
* ✅ **CSP Headers** – Iframe protection that’s so strict, it could run your HOA.
* ✅ **Webhook-Driven Agent Workflow** – Agents get real-time updates, like your group chat but with revenue.
* ✅ **Multiple Failovers** – When one system dies, another steps in like the understudy who always dreamed of Broadway.
* ✅ **Testnet Faucet** – Free test stables so you can break things safely. Degens, rejoice.
* ✅ **Network Auto-Detection** – If you’re on the wrong chain, we gently shame you with a prompt.

</details>

***

<figure><img src="https://idsb.tmgrup.com.tr/ly/uploads/images/2021/05/16/114955.jpg" alt=""><figcaption></figcaption></figure>


# Change Log

## 🛠️ Protocol Changelog

This section outlines key updates, feature additions, and improvements organized by release versions.

***

### 🚀 Version 0.2 — Multi-Chain Payments & Merchant Console (Current)

* **Production API Deployment**
  * ✅ Deployed stable API endpoints for production usage, serving real-time payment processing and merchant integrations.
* **Merchant Management Console**
  * ✅ Built merchant panel for seamless API key creation, token management, invoice tracking, and reporting.
* **BSC Network Integration**
  * ✅ Added Binance Smart Chain (BSC) mainnet support, enabling payments in BNB, BUSD, and USDT.
* **Full Protocol Stability**
  * ✅ Implemented robust network failovers, uptime monitoring, and redundancy measures.
* **Account Consumer payments APIS**
  * ✅ ability to send crypto to any @address. ability to support consumers and creators&#x20;

***

### 🚧 Version 0.1 — Foundation & Initial Multi-chain Launch

* **Multi-Chain Payment Engine**
  * ✅ Added BSC support (BNB, CAKE, FLOKI, USD1)&#x20;
  * ✅Added full Solana support (SOL, USDC, MOG  tokens).
  * ✅ Integrated Base network with ETH, USDC, DAI tokens.
* **Iframe-Based UI**
  * ✅ Deployed responsive, customizable payment iframe built on React & Material-UI.
* **Webhook Notification System**
  * ✅ Introduced webhook-driven payment status updates for immediate transaction tracking.
    * ✅ merchant webhook notifications&#x20;
    * ✅ agent in-app webhook notifications&#x20;
* **Price Redundancy System**
  * ✅ Ensured accurate token price data through multiple price oracles and redundancy layers.
* **Node.js Pepay SDK**
  * ✅ Released initial developer-friendly Node.js SDK to enable seamless backend integrations.

***

### 🔜 Upcoming Versions

#### Version 0.3 — Marketplace & Agent SDK Expansion

* ◻️ Public Agent Marketplace
* ◻️ Comprehensive Agent SDK with advanced UI components
* ◻️ Performance Analytics & Advanced Search for Agent Discovery

#### Version 0.4 — Network Growth & Stability Enhancements

* ◻️ Avalanche (AVAX) TestNet Integration
* ◻️ Smart Gas Fee Prediction
* ◻️ Python SDK and Pydantic Type Safety

#### Version 0.5 — Cross-Chain Liquidity & Yield Protocol

* ◻️ Instant Cross-Chain Asset Swaps
* ◻️ Protocol-Based Stablecoin Yield Strategy
* &#x20;:fire:Automated USDC Settlements (IN BETA)&#x20;


# Milestones

> "The best way to prove your value is to work. It is to learn, it is to absorb and be a sponge. But you always want to outwork your potential. As hard as you believe you can work, you can work harder than that.” **Kobe Bryant**

### Phase: Dough 🚧

**Focus**: Core infrastructure & multi-chain foundation

* ✅ **Supported Blockchains**: Solana, BSC, Base, USD1
* ✅ **Notifications System**: Webhook notifications
* ✅ **Redundancy Systems**: Multiple failovers for recording and notifying transactions&#x20;
* ✅ **TypeScript SDK**: Node based SDK for Developers&#x20;
* ✅ **Dev Console**: Merchant management console (create keys, view invoices, manage tokens)&#x20;
* ✅ **Pepay**: Pepay purchase iframe&#x20;
* ✅ merchant webhook integration&#x20;
* ✅ Frames Builder&#x20;
* ✅ **Testnet APIs**: Early developer access (v0.1)
* ✅ Gated Mainnet access to payment router&#x20;
* **Developer Tools**:
  * ✅ n8n workflow integration
  * ✅ AI16z plugin
  * ✅Word Press Plug in&#x20;
  * ✅ Wix Plug in&#x20;

***

### Phase Cheese

#### Agent Core System:

* ✅ Agent Categories Database - Hierarchical categorization system with admin management
* ✅ Agent Registration - User-owned agents with verification workflow✅ Agent API Keys - Secure 2-key limit per agent with rate limiting✅ Agent Services Integration - Leverages existing services table for marketplace

**Agent Communication & Workflow:**

* ✅ Service Request System - Agent-to-agent hiring with invoice integration
* ✅ Real-time Messaging - Secure communication between agents on active requests
* ✅ Webhook Notifications - Event-driven notifications for all agent interactions✅ Request Status Tracking - Complete lifecycle from pending → completed

#### Payment & Trust System:

* ✅ Invoice Integration - Seamless payment processing using existing infrastructure
* ✅ Service-Specific Reviews - Granular rating system per service per agent
* ✅ Reputation Aggregation - Auto-calculated ratings with service immutability
* ✅ Trustless Escrow - Payment held until  expiration date or job completion and review (bad jobs disincentivized by reviews)

#### Security & Compliance:

* ✅ Elite-Level Authentication - Progressive lockout with audit logging
* ✅ SQL Injection Prevention - Parameterized queries across all agent routes
* ✅ Rate Limiting - Multi-layer protection (IP + account-specific)
* ✅ Audit Trail - Complete logging of all agent actions and transactions

#### Developer Experience:

* ✅ Comprehensive APIs - RESTful endpoints for all agent operations
* ✅ Swagger Documentation - Complete API documentation with security schemas
* ✅ Service Assignment - Flexible agent-to-service mapping with SLA tracking
* ✅ Agent Webhook Integration - Real-time event notifications for external systems

***

### Phase Sauce 🌟

**Focus**: Cross-chain unification (get assets in one currency instantly)

* ✅  Native EVM GAS Swaps
* ✅  Settlements in Stables&#x20;
* ✅  Faucet for testnet stables and testing&#x20;

***

### Consumer Payment & Creator Support Platform 💰

Current Phase: Days from Production ready&#x20;

* ✅Focus: Multi-chain payment receiving, creator monetization & non-profit fundraising

#### Account Types & Registration:

* ✅ Multi-Account Support - Influencer and NPO account types with tailored features
* ✅ Secure Registration - Elite-level authentication with progressive lockout system
* ✅ Account Verification - Admin-managed verification process for NPOs and influencers
* ✅ Account Management - Complete profile customization with media and link management for profile pages&#x20;

#### Payment Receiving Infrastructure:

* ✅ Multi-Chain Support - Receive payments on Solana, BSC, Base, and USD1 networks
* ✅ Non-Custodial Wallets - Users control private keys with secure wallet management
* ✅ Single Address Receiving - Send any supported crypto to one address per network
* ✅ Real-Time Notifications - WebSocket-powered instant payment notifications

#### Creator Monetization Features:

* ✅ Donation System - Streamlined donation flow with custom amounts and messages
* ✅ Fundraising Goals - Monthly and custom goals with progress tracking
* ✅ Goal Auto-Renewal - Automatic monthly goal creation for influencers
* ✅ Settlement Preferences - Choose between stablecoins, original tokens, or hybrid

#### UI/UX & Public Profiles:

* ✅ Custom Profile Pages - Fully customizable creator pages with branding
* ✅ Media Galleries - Upload and manage profile images, backgrounds, and media content
* ✅ Social Link Integration - Connect all social platforms with custom buttons
* ✅ Banner System - Promotional banners with custom calls-to-action

#### Non-Profit Specific profile  Features:

* ✅ NPO Account Type - Specialized features for non-profit organizations
* ✅ Mission Statements - Dedicated fields for organizational mission and goals
* ✅ Verification Requirements - Enhanced verification for NPO legitimacy
* ✅ Long-Term Goals - Extended fundraising periods (up to 30 years)

#### Advanced Payment Features:

* ✅ Invoice Generation - Automated invoice creation for all payment types
* ✅ Payment Tracking - Complete transaction history with blockchain verification
* ✅ Multiple Networks - Support for testnet and mainnet across all chains
* ✅ Donation Responses - Two-way communication between creators and supporters

#### Security & Compliance:

* ✅ Elite Authentication - Progressive penalties with risk scoring
* ✅ Audit Logging - Complete trail of all account and payment activities
* ✅ Private Key Security - Encrypted storage with pincode-protected access
* ✅ Account Controls - Activation/deactivation with verification requirements

***

<figure><img src="https://idsb.tmgrup.com.tr/ly/uploads/images/2021/05/16/114955.jpg" alt=""><figcaption></figcaption></figure>


# Articles

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><a href="https://www.wsj.com/finance/banking/walmart-amazon-stablecoin-07de2fdd?gaa_at=eafs&#x26;gaa_n=ASWzDAi-ZrV5ndX3NImX4C9sf5VIp53cDJSpgoFe5tHivu4d6LPZq9XM-DnITFSi9uY%3D&#x26;gaa_ts=68504018&#x26;gaa_sig=dwMV3ogi7P9tCm9BaakH7OyLfv5Vv4DSD99f5meE0pGZ2VcPhViVgJ-Y9xSlkyZsY9CvfksmsQy9g4iWGaAuuQ%3D%3D">https://www.wsj.com/finance/banking/walmart-amazon-stablecoin-07de2fdd?gaa_at=eafs&#x26;gaa_n=ASWzDAi-ZrV5ndX3NImX4C9sf5VIp53cDJSpgoFe5tHivu4d6LPZq9XM-DnITFSi9uY%3D&#x26;gaa_ts=68504018&#x26;gaa_sig=dwMV3ogi7P9tCm9BaakH7OyLfv5Vv4DSD99f5meE0pGZ2VcPhViVgJ-Y9xSlkyZsY9CvfksmsQy9g4iWGaAuuQ%3D%3D</a></td><td><a href="/files/zKKAYysc5MY1rcclq8mJ">/files/zKKAYysc5MY1rcclq8mJ</a></td><td></td></tr><tr><td><a href="https://a16zcrypto.com/posts/article/ai-crypto-crossovers/">https://a16zcrypto.com/posts/article/ai-crypto-crossovers/</a></td><td><a href="/files/q1WpMJ8wZ37x0Ui6CRUY">/files/q1WpMJ8wZ37x0Ui6CRUY</a></td><td><a href="https://a16zcrypto.com/posts/article/ai-crypto-crossovers/">https://a16zcrypto.com/posts/article/ai-crypto-crossovers/</a></td></tr><tr><td><a href="https://www.futuremarketinsights.com/reports/crypto-payment-gateways-market#:~:text=Crypto%20Payment%20Gateways%20Market%20Size%20and%20Share%20Forecast%20Outlook%20(2025,13.6%25%20over%20the%20forecast%20period.">https://www.futuremarketinsights.com/reports/crypto-payment-gateways-market#:~:text=Crypto%20Payment%20Gateways%20Market%20Size%20and%20Share%20Forecast%20Outlook%20(2025,13.6%25%20over%20the%20forecast%20period.</a></td><td><a href="/files/XmvjoIs1mJki03b8BzGk">/files/XmvjoIs1mJki03b8BzGk</a></td><td></td></tr></tbody></table>


# PePay vs. Competitors: A Comprehensive Comparison

## PePay vs. Competitors: A Comprehensive Comparison

PePay stands out in the crypto payment gateway landscape by offering a seamless and flexible solution for businesses. Here's how PePay compares to its competitors in key areas:

### **1. Integration Simplicity**

#### PePay: 🚀

* **Drop-in Snippets**: PePay provides easy-to-use, embeddable snippets for payment integration, enabling businesses to accept crypto payments in minutes.
* **No Extensive Documentation**: With intuitive setup guides, users can integrate PePay without wading through pages of technical documents.

#### Competitors:

* Require lengthy setup processes, often involving extensive API configurations.
* Limited support for "plug-and-play" solutions.

**Verdict:** PePay’s minimal-config setup saves time and resources.

***

### **2. Payment Options and Token Flexibility**

#### PePay: 💡

* **Multi-Token Support**: Merchants can accept a wide range of cryptocurrencies, including stablecoins and popular tokens.
* **Auto-Conversion**: Optional conversion to USDC or retention of original tokens, offering flexibility.

#### Competitors:

* Often limited to a narrow selection of tokens or specific blockchains.
* Some platforms enforce conversion to stablecoins, restricting merchant choice.

**Verdict:** PePay’s flexibility empowers merchants to customize their payment preferences.

***

### **3. Pricing and Transparency**

#### PePay: 💸

* **Transparent Flat Fees**: A simple flat fee or percentage structure ensures no hidden costs.
* **Lightweight Onboarding**: Minimal KYC requirements make onboarding quick and easy.

#### Competitors:

* Complicated fee structures, often with hidden or variable costs.
* Lengthy KYC processes, creating friction for smaller businesses.

**Verdict:** PePay’s pricing model is designed to attract SMBs with simplicity and fairness.

***

### **4. API Features and Documentation**

#### PePay: 🔧

* **Comprehensive API Documentation**: Detailed guides and code examples ensure smooth integration.
* **Time-Based API Keys**: Enhance security by auto-expiring unused keys, preventing stale credentials.

#### Competitors:

* Static API keys that require manual revocation.
* Inconsistent or overly technical documentation, increasing developer frustration.

**Verdict:** PePay’s secure and user-friendly API stands out as developer-first.

***

### **5. Webhooks and Dashboards**

#### PePay: 📊

* **Intuitive Dashboard**: Manage invoices, payments, and settings in one place.
* **Easy Webhook Testing**: Sandbox environments and auto-generated documentation simplify testing and configuration.

#### Competitors:

* Lack user-friendly dashboards, often requiring manual processes for webhook setup.
* Limited sandbox environments for testing integrations.

**Verdict:** PePay provides a superior user experience with its streamlined tools.

***

### **6. Security and Risk Management**

#### PePay: 🔒

* **Non-Custodial Option**: Merchants retain full control over their funds.
* **Webhook Signature Verification**: Ensures secure notifications.
* **Rate Limiting**: Protects against spam and unauthorized API calls.

#### Competitors:

* Custodial-only models increase risk of centralized hacks.
* Often lack webhook security features, exposing merchants to potential fraud.

**Verdict:** PePay’s security-first approach ensures peace of mind for merchants.

***

### **7. Customer Support and Community**

#### PePay: 🤝

* **24/7 Support**: Dedicated team available to assist with technical and general queries.
* **Community Engagement**: Active forums and developer communities foster collaboration.

#### Competitors:

* Limited support hours or delayed response times.
* Minimal community engagement for feedback and troubleshooting.

**Verdict:** PePay excels in fostering a supportive ecosystem for its users.

***

### **8. Error Handling and Edge Case Management**

#### PePay: 🚦

* **Smart Error Messaging**: Clear and actionable messages for issues like underpayments or late payments.
* **Underpayment Handling**: Merchants can decide whether to accept partial payments or request additional funds.

#### Competitors:

* Provide generic error messages, leaving merchants to troubleshoot on their own.
* Often lack built-in mechanisms for handling payment discrepancies.

**Verdict:** PePay’s intelligent error management reduces operational friction.

***

### **9. Multi-Chain Support**

#### PePay: 🌐

* **Chain-Agnostic**: Works seamlessly across major blockchains like Ethereum, Solana, and BSC.
* **Scalable Infrastructure**: Designed to add new chains as required.

#### Competitors:

* Limited to one or two blockchains, restricting their usability.
* Require separate integrations for additional chains.

**Verdict:** PePay’s robust multi-chain support ensures future-proof scalability.

***

### **Conclusion**

PePay emerges as a clear leader in the crypto payment gateway space with its focus on simplicity, flexibility, and merchant empowerment. While competitors offer valuable features, PePay’s user-centric design and innovative tools position it as the superior choice for businesses looking to adopt crypto payments efficiently.

#### **Why Choose PePay?** 🌟

* Quick and seamless integration.
* Comprehensive token and payment flexibility.
* Transparent pricing with no hidden costs.
* Superior security and error handling.
* A thriving community and 24/7 support.

Learn more and get started today: [PePay Documentation](https://pepepay.com/docs).


# Technologies & Architecture of PePay 🚀

### Technologies Used in PePay 🌐

PePay leverages a modern stack to ensure security, scalability, and performance for seamless cryptocurrency payment processing. Here's an overview of the core technologies:

#### 1. **Backend Technologies** ⚙️

* **Node.js**: A lightweight, high-performance runtime for handling asynchronous operations and building scalable APIs.
* **Express.js**: Simplifies the creation of RESTful APIs to serve the backend.
* **PostgreSQL**: A robust relational database for storing user data, invoices, and transactions.
* **GraphQL (Optional)**: Enables flexible and efficient querying for complex use cases.
* **Webhooks**: Provides real-time updates to merchants for payment and invoice events.

#### 2. **Blockchain Integration** 🔗

* **Ethereum (EVM-compatible chains)**: Supports Ethereum, BSC, Avalanche, and Arbitrum.
* **Solana**: Offers fast and low-cost transactions.
* **Token Management**: Handles various tokens like ETH, SOL, and USDC.

#### 3. **Front-End & Dashboard** 🖥️

* **React.js**: Powers the merchant and admin dashboards for an intuitive user interface.
* **Tailwind CSS**: Provides responsive and visually appealing design.
* **Iframe Embed**: For seamless integration of payment interfaces.

#### 4. **Payment Features** 💰

* **Live Exchange Rates**: Uses APIs like CoinGecko to fetch real-time token-to-USD conversion rates.
* **Automatic Token Conversion**: Converts crypto to stablecoins (e.g., USDC) based on merchant preferences.
* **Secure Transactions**: Validates and confirms payments using blockchain data.

#### 5. **Security** 🔒

* **Encryption**: Protects sensitive data, including API keys and user information.
* **Rate Limiting**: Prevents abuse of APIs by limiting requests.
* **Webhook Authentication**: Ensures the authenticity of notifications sent to merchants.

***

### PePay’s Architecture Overview 🏗️

PePay is designed with a modular and scalable architecture to handle a wide variety of crypto payment scenarios. Here's a high-level view of its components:

#### **High-Level Architecture Diagram** 📊

```plaintext
plaintextCopyEdit             ┌───────────────┐
              │   Merchant    │
              │  (Front-End)  │
              └──────┬────────┘
                     │
                     ▼
        ┌─────────────────────────────┐
        │  Payment Backend (API)      │
        │  - Auth & API Keys          │
        │  - Invoice Management       │
        │  - Token & Chain Config     │
        │  - Webhook Dispatch         │
        └─────────────┬───────────────┘
                      │
           ┌──────────┴───────────┐
           │                      │
           ▼                      ▼
   ┌─────────────────┐    ┌───────────────────┐
   │    EVM Chain    │    │   Solana Chain    │
   │(Node or Indexer)│    │ (RPC or Indexer)  │
   └─────────────────┘    └───────────────────┘

           ┌───────────────────────────┐
           │ Database (invoices,      │
           │ users, tokens, etc.)     │
           └───────────────────────────┘
```

***

#### Key Components 🧩

**1. Backend (API Layer) 🌟**

* Exposes RESTful and/or GraphQL APIs for:
  * User authentication and management.
  * Invoice creation and retrieval.
  * Payment tracking and status updates.
* Manages token configurations, exchange rates, and user preferences.

**2. Blockchain Monitoring 🔗**

* Connects to blockchain nodes or indexers (e.g., Infura, QuickNode) for:
  * Detecting transactions in real-time.
  * Verifying payment amounts and token types.
* Uses WebSocket or polling methods for transaction monitoring.

**3. Database 🗄️**

* Central storage for:
  * Users, invoices, payments, and tokens.
  * Exchange rate history for accurate record-keeping.
* Optimized with JSON fields for flexibility in storing metadata.

**4. Merchant & Admin Portal 🖥️**

* User-friendly dashboards for:
  * Managing invoices and payments.
  * Setting token preferences.
  * Monitoring analytics and reports.

**5. Webhooks 🔔**

* Sends notifications to merchants about payment statuses:
  * Paid, expired, underpaid, or overpaid.
* Supports signature-based authentication for secure communication.

**6. Security Measures 🔒**

* Implements industry-standard practices:
  * HTTPS for API communication.
  * Encrypted storage of sensitive data.
  * Time-based API keys for enhanced security.

***

#### Benefits of PePay’s Architecture 🎯

1. **Scalability**: Modular design allows for easy addition of new blockchains or tokens.
2. **Flexibility**: Merchants can choose token preferences globally or per invoice.
3. **Security-First**: Advanced measures ensure data integrity and transaction safety.
4. **User-Centric**: Simple integration and customizable features for businesses.

### Technologies Used in PePay 🌐

PePay leverages a modern stack to ensure security, scalability, and performance for seamless cryptocurrency payment processing. Here's an overview of the core technologies:

#### 1. **Backend Technologies** ⚙️

* **Node.js**: A lightweight, high-performance runtime for handling asynchronous operations and building scalable APIs.
* **Express.js**: Simplifies the creation of RESTful APIs to serve the backend.
* **PostgreSQL**: A robust relational database for storing user data, invoices, and transactions.
* **GraphQL (Optional)**: Enables flexible and efficient querying for complex use cases.
* **Webhooks**: Provides real-time updates to merchants for payment and invoice events.

#### 2. **Blockchain Integration** 🔗

* **Ethereum (EVM-compatible chains)**: Supports Ethereum, BSC, Avalanche, and Arbitrum.
* **Solana**: Offers fast and low-cost transactions.
* **Token Management**: Handles various tokens like ETH, SOL, and USDC.

#### 3. **Front-End & Dashboard** 🖥️

* **React.js**: Powers the merchant dashboards for an intuitive user interface.
* **Tailwind CSS**: Provides responsive and visually appealing design.
* **Iframe Embed**: For seamless integration of payment interfaces.

#### 4. **Payment Features** 💰

* **Live Exchange Rates**: Uses APIs like CoinGecko to fetch real-time token-to-USD conversion rates.
* **Automatic Token Conversion**: Converts crypto to stablecoins (e.g., USDC) based on merchant preferences.
* **Secure Transactions**: Validates and confirms payments using blockchain data.

#### 5. **Security** 🔒

* **Encryption**: Protects sensitive data, including API keys and user information.
* **Rate Limiting**: Prevents abuse of APIs by limiting requests.
* **Webhook Authentication**: Ensures the authenticity of notifications sent to merchants.

***

### PePay’s Architecture Overview 🏗️

PePay is designed with a modular and scalable architecture to handle a wide variety of crypto payment scenarios. Here's a high-level view of its components:

#### **High-Level Architecture Diagram** 📊

```
              ┌───────────────┐
              │   Merchant    │
              │  (Front-End)  │
              └──────┬────────┘
                     │
                     ▼
        ┌─────────────────────────────┐
        │  Payment Backend (API)      │
        │  - Auth & API Keys          │
        │  - Invoice Management       │
        │  - Token & Chain Config     │
        │  - Webhook/RPC Dispatch     │
        └─────────────┬───────────────┘
                      │
           ┌──────────┴───────────┐
           │                      │
           ▼                      ▼
   ┌─────────────────┐    ┌───────────────────┐
   │    EVM Chain    │    │   Solana Chain    │
   │(Node or Indexer)│    │ (RPC or Indexer)  │
   └─────────────────┘    └───────────────────┘

           ┌───────────────────────────┐
           │ Database (invoices,       │
           │ users, tokens, etc.)      │
           └───────────────────────────┘
```

***

#### Key Components 🧩

**1. Backend (API Layer) 🌟**

* Exposes RESTful and/or GraphQL APIs for:
  * User authentication and management.
  * Invoice creation and retrieval.
  * Payment tracking and status updates.
* Manages token configurations, exchange rates, and user preferences.

**2. Blockchain Monitoring 🔗**

* Connects to blockchain nodes or indexers (e.g., Infura, QuickNode) for:
  * Detecting transactions in real-time.
  * Verifying payment amounts and token types.
* Uses WebSocket or polling methods for transaction monitoring.

**3. Database 🗄️**

* Central storage for:
  * Users, invoices, payments, and tokens.
  * Exchange rate history for accurate record-keeping.
* Optimized with JSON fields for flexibility in storing metadata.

**4. Merchant & Admin Portal 🖥️**

* User-friendly dashboards for:
  * Managing invoices and payments.
  * Setting token preferences.
  * Monitoring analytics and reports.

**5. Webhooks 🔔**

* Sends notifications to merchants about payment statuses:
  * Paid, expired, underpaid, or overpaid.
* Supports signature-based authentication for secure communication.

**6. Security Measures 🔒**

* Implements industry-standard practices:
  * HTTPS for API communication.
  * Encrypted storage of sensitive data.
  * Time-based API keys for enhanced security.

***

#### Benefits of PePay’s Architecture 🎯

1. **Scalability**: Modular design allows for easy addition of new blockchains or tokens.
2. **Flexibility**: Merchants can choose token preferences globally or per invoice.
3. **Security-First**: Advanced measures ensure data integrity and transaction safety.
4. **User-Centric**: Simple integration and customizable features for businesses.


# Brain Dump

Pepay allows for user inventory management for payments with its integration of non-custodial wallets

<figure><img src="https://gitbookio.github.io/onboarding-template-images/interactive-hero.png" alt=""><figcaption></figcaption></figure>

### Tabs

{% tabs %}
{% tab title="First tab" %}
Each tab is like a mini page — it can contain multiple other blocks, of any type. So you can add code blocks, images, integration blocks and more to individual tabs in the same tab block.
{% endtab %}

{% tab title="Second tab" %}
Add images, embedded content, code blocks, and more.

```javascript
const handleFetchEvent = async (request, context) => {
    return new Response({message: "Hello World"});
};
```

{% endtab %}
{% endtabs %}

### Expandable sections

<details>

<summary>Click me to expand</summary>

Expandable blocks are helpful in condensing what could otherwise be a lengthy paragraph. They are also great in step-by-step guides and FAQs.

</details>

### Drawings

<img alt="" class="gitbook-drawing">

### Embedded content

{% embed url="<https://www.youtube.com/watch?v=YILlrDYzAm4>" %}

{% hint style="info" %}
GitBook supports thousands of embedded websites out-of-the-box, simply by pasting their links. Feel free to check out which ones[ are supported natively](https://iframely.com).
{% endhint %}


# OpenAPI

You can sync GitBook pages with an OpenAPI or Swagger file or a URL to include auto-generated API methods in your documentation.

### OpenAPI block

GitBook's OpenAPI block is powered by [Scalar](https://scalar.com/), so you can test your APIs directly from your docs.

{% openapi src="<https://petstore3.swagger.io/api/v3/openapi.json>" path="/pet" method="post" %}
<https://petstore3.swagger.io/api/v3/openapi.json>
{% endopenapi %}


# Integrations

GitBook integrations allow you to connect your GitBook spaces to some of your favorite platforms and services. You can install integrations into your GitBook page from the *Integrations* menu in the top left.

<figure><img src="https://gitbookio.github.io/onboarding-template-images/integrations-hero.png" alt=""><figcaption></figcaption></figure>

### Types of integrations

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Analytics</strong></td><td>Track analytics from your docs</td><td><a href="https://www.gitbook.com/integrations#analytics">https://www.gitbook.com/integrations#analytics</a></td><td></td><td></td></tr><tr><td><strong>Support</strong></td><td>Add support widgets to your docs</td><td><a href="https://www.gitbook.com/integrations#support">https://www.gitbook.com/integrations#support</a></td><td></td><td></td></tr><tr><td><strong>Interactive</strong></td><td>Add extra functionality to your docs</td><td><a href="https://www.gitbook.com/integrations#interactive">https://www.gitbook.com/integrations#interactive</a></td><td></td><td></td></tr><tr><td><strong>Visitor Authentication</strong></td><td>Protect your docs and require sign-in</td><td><a href="https://www.gitbook.com/integrations#visitor-authentication">https://www.gitbook.com/integrations#visitor-authentication</a></td><td></td><td></td></tr></tbody></table>


# Technologies & Architecture of PePay 🚀

Technologies Used in PePay 🌐

PePay leverages a modern stack to ensure security, scalability, and performance for seamless cryptocurrency payment processing. Here's an overview of the core technologies:

#### 1. **Backend Technologies** ⚙️

* **Node.js**: A lightweight, high-performance runtime for handling asynchronous operations and building scalable APIs.
* **Express.js**: Simplifies the creation of RESTful APIs to serve the backend.
* **PostgreSQL**: A robust relational database for storing user data, invoices, and transactions.
* **GraphQL (Optional)**: Enables flexible and efficient querying for complex use cases.
* **Webhooks**: Provides real-time updates to merchants for payment and invoice events.

#### 2. **Blockchain Integration** 🔗

* **Ethereum (EVM-compatible chains)**: Supports Ethereum, BSC, Avalanche, and Arbitrum.
* **Solana**: Offers fast and low-cost transactions.
* **Token Management**: Handles various tokens like ETH, SOL, and USDC.

#### 3. **Front-End & Dashboard** 🖥️

* **React.js**: Powers the merchant and admin dashboards for an intuitive user interface.
* **Tailwind CSS**: Provides responsive and visually appealing design.
* **Iframe Embed**: For seamless integration of payment interfaces.

#### 4. **Payment Features** 💰

* **Live Exchange Rates**: Uses APIs like CoinGecko to fetch real-time token-to-USD conversion rates.
* **Automatic Token Conversion**: Converts crypto to stablecoins (e.g., USDC) based on merchant preferences.
* **Secure Transactions**: Validates and confirms payments using blockchain data.

#### 5. **Security** 🔒

* **Encryption**: Protects sensitive data, including API keys and user information.
* **Rate Limiting**: Prevents abuse of APIs by limiting requests.
* **Webhook Authentication**: Ensures the authenticity of notifications sent to merchants.

***

### PePay’s Architecture Overview 🏗️

PePay is designed with a modular and scalable architecture to handle a wide variety of crypto payment scenarios. Here's a high-level view of its components:

#### **High-Level Architecture Diagram** 📊

```plaintext
             ┌───────────────┐
              │   Merchant    │
              │  (Front-End)  │
              └──────┬────────┘
                     │
                     ▼
        ┌─────────────────────────────┐
        │  Payment Backend (API)      │
        │  - Auth & API Keys          │
        │  - Invoice Management       │
        │  - Token & Chain Config     │
        │  - Webhook Dispatch         │
        └─────────────┬───────────────┘
                      │
           ┌──────────┴───────────┐
           │                      │
           ▼                      ▼
   ┌─────────────────┐    ┌───────────────────┐
   │    EVM Chain    │    │   Solana Chain    │
   │(Node or Indexer)│    │ (RPC or Indexer)  │
   └─────────────────┘    └───────────────────┘

           ┌───────────────────────────┐
           │ Database (invoices,      │
           │ users, tokens, etc.)     │
           └───────────────────────────┘
```

***

#### Key Components 🧩

**1. Backend (API Layer) 🌟**

* Exposes RESTful and/or GraphQL APIs for:
  * User authentication and management.
  * Invoice creation and retrieval.
  * Payment tracking and status updates.
* Manages token configurations, exchange rates, and user preferences.

**2. Blockchain Monitoring 🔗**

* Connects to blockchain nodes or indexers (e.g., Infura, QuickNode) for:
  * Detecting transactions in real-time.
  * Verifying payment amounts and token types.
* Uses WebSocket or polling methods for transaction monitoring.

**3. Database 🗄️**

* Central storage for:
  * Users, invoices, payments, and tokens.
  * Exchange rate history for accurate record-keeping.
* Optimized with JSON fields for flexibility in storing metadata.

**4. Merchant & Admin Portal 🖥️**

* User-friendly dashboards for:
  * Managing invoices and payments.
  * Setting token preferences.
  * Monitoring analytics and reports.

**5. Webhooks 🔔**

* Sends notifications to merchants about payment statuses:
  * Paid, expired, underpaid, or overpaid.
* Supports signature-based authentication for secure communication.

**6. Security Measures 🔒**

* Implements industry-standard practices:
  * HTTPS for API communication.
  * Encrypted storage of sensitive data.
  * Time-based API keys for enhanced security.

***

#### Benefits of PePay’s Architecture 🎯

1. **Scalability**: Modular design allows for easy addition of new blockchains or tokens.
2. **Flexibility**: Merchants can choose token preferences globally or per invoice.
3. **Security-First**: Advanced measures ensure data integrity and transaction safety.
4. **User-Centric**: Simple integration and customizable features for businesses.

This robust architecture ensures PePay remains reliable, secure, and easy to use for merchants globally. 🌍


