AlgoVoi is available for acquisition — docs.algovoi.co.uk/acquisition
AlgoVoi Platform Adapters
Drop-in payment adapters for connecting e-commerce platforms, AI agent frameworks, and automation tools to AlgoVoi — a compliance-aware crypto payment gateway where agents negotiate a shared stablecoin settlement lane: seven native mainnet chains, with cross-chain settlement negotiated between agents on any two of them. The adapters in this repository are end-to-end tested on the seven native chains (Algorand, VOI, Hedera, Stellar, Base, Solana, Tempo).
What is AlgoVoi?
AlgoVoi is compliance-aware payment infrastructure for stablecoin settlement. The same gateway that negotiates settlement across seven native mainnet chains — in any cross-chain pairing among them — also runs continuous sanctions screening, KYB gating, and a write-once SHA-256 audit chain on every payment — so merchants and autonomous agents don't quietly carry UK MLRs / OFAC / SAMLA exposure they didn't sign up for. Compliance posture is published live at /compliance/attestation.
The compliance perimeter is the product. Multi-chain breadth — seven native mainnet chains (Algorand, VOI, Hedera, Stellar, Base, Solana, Tempo), with settlement negotiated between agents on any two of them rather than fixed to one — and protocol coverage (x402, MPP, AP2, A2A) are how we deliver it on a single endpoint, without merchants having to manage wallets or blockchain integrations directly.
Supported settlement assets:
These seven are the native chains; agents on different chains negotiate a shared lane and settle once, any cross-chain pairing among them. The hosted AlgoVoi pay rail additionally settles natively on Arc, Monad, Polygon, Arbitrum and OP Mainnet. The platform integration guides and adapter smoke tests in this repository cover the seven native chains above.
What is this repository?
This repository contains production-ready payment adapters and integration documentation for connecting e-commerce platforms, custom applications, and AI agent services to AlgoVoi Tenant Services.
Included:
- Recurring / standing-authority subscriptions (
Recurr/) — Tier 2 lets a customer sign ONCE and AlgoVoi auto-pulls per cycle on all 7 chains (Algorand SpendingCapVault, EVM ERC-20 approve, Solana SPL Approve, Hedera HTS allowance, Stellar Soroban auth_entry, VOI). Per-chain wallet-side reference flows + chain-agnostic merchant-side examples.native-python/algovoi.pyv1.2.0+ ships the merchant HTTP wrappers (8 lifecycle methods) - Drop-in plugins for WooCommerce, OpenCart, PrestaShop, and Shopware (tested and deployed)
- CMS payment gateways for Drupal Commerce, Easy Digital Downloads (WordPress), and Ghost — all Comet-validated 2026-04-15
- Native adapters for PHP, Python, Go, Rust, and TypeScript (zero external dependencies) — all at v1.2.0 with full Tier 2 (recurring) surface
- Agent protocol middleware for MPP and AP2 (gate APIs behind payment challenges)
- AI platform adapters for OpenAI, Claude, Gemini, Bedrock, Cohere, xAI/Grok, and Mistral (MPP + AP2 + x402, all 7 chains)
- AI agent framework adapters for LangChain, LlamaIndex, CrewAI, Hugging Face, AutoGen, Semantic Kernel, Pydantic AI, DSPy, Vercel AI SDK, Google A2A, LangGraph, and Agno — gate LLM-agnostic pipelines, RAG chains, multi-agent crews, and autonomous agents (MPP + AP2 + x402, all 7 chains)
- No-code / automation adapters for Zapier, Make (Integromat), n8n, and X (Twitter) — drop-in Python classes that bridge AlgoVoi payment flows into any no-code workflow, with webhook verification, MPP + x402 + AP2 challenge generation, and all 14 networks (7 mainnet + 7 testnet); the X adapter auto-posts payment confirmations and checkout links to X via webhook (OAuth 1.0a, stdlib-only, 4-chain mainnet verified 2026-04-18)
- MCP server (
@algovoi/mcp-server/algovoi-mcp) — exposes 13 AlgoVoi tools natively inside Claude Desktop, Claude Code, Cursor, and Windsurf via the Model Context Protocol - x402 embeddable widget for any HTML page (Cloudflare Pages)
- Integration guides and Python adapters for 45+ platforms — all end-to-end tested on
api.algovoi.co.ukacross all 7 chains
AlgoVoi Cloud — No-Code Dashboard
The fastest way to accept stablecoin payments — no server access or code required. dash.algovoi.co.uk is the hosted SaaS version of AlgoVoi: sign up with your email, verify your identity, and connect your platforms through a guided dashboard wizard. Each wizard takes under 5 minutes.
Sign up
- Go to dash.algovoi.co.uk/signup
- Enter your email and choose your account type (Individual, Sole Trader, or Company)
- Your AlgoVoi API key is shown once on screen — copy it immediately
- Complete KYC/KYB verification in the dashboard to unlock mainnet payments
Supported chains: Algorand, VOI, Hedera, Stellar, Base, Solana, Tempo
Connect a platform
After signing in, open Connect from the sidebar. Every integration has a setup badge:
E-commerce
Automation
Messaging Bots
AI Assistants
KYC / KYB verification
Before your first mainnet payment, upload the required documents through the Onboarding page:
Accepted formats: PDF, JPEG, PNG, WebP — max 50 MB per file. The dashboard auto-advances to active status when all required documents are collected.
Repository structure
platform-adapters/
├── Recurr/ # Tier 2 — standing-authority recurring payments (per-chain
│ # wallet-side flows + chain-agnostic merchant examples).
│ # Lives alongside the language adapters which carry
│ # the merchant HTTP wrappers (native-python v1.2.0+).
├── woocommerce/ # WooCommerce plugin (single PHP file)
├── opencart/ # OpenCart 4 extensions (hosted + wallet)
├── prestashop/ # PrestaShop 8 modules (hosted + wallet)
├── shopware/ # Shopware 6 plugin (Symfony handlers)
├── native-php/ # Framework-free PHP adapter
├── native-python/ # Stdlib-only Python adapter
├── native-go/ # Stdlib-only Go package
├── native-rust/ # Zero-crate Rust library
├── native-typescript/ # Single-file TS adapter (Node 18+/Bun/Deno/browsers/Edge)
├── magento2/ # Magento 2 / Adobe Commerce module (PHP)
├── amazon-mws/ # Amazon SP-API webhook adapter (Python)
├── tiktok-shop/ # TikTok Shop Open Platform adapter (Python)
├── squarespace/ # Squarespace Commerce webhook adapter (Python)
├── wix/ # Wix Payment Provider SPI (Velo)
├── mpp-adapter/ # MPP server middleware (Python)
├── ap2-adapter/ # AP2 server middleware (Python)
├── shopify-app/ # Private — Shopify payment app (Cloudflare Pages, not distributed)
├── x402-widget/ # Embeddable payment widget (Web Component)
│
│ — Live-tested Python webhook adapters (4 original chains verified 2026-04-14; Base + Solana added 2026-04-22/23; Tempo added 2026-04-23) —
├── allegro/ # Allegro marketplace (Poland / CEE)
├── bigcommerce/ # BigCommerce webhook adapter (partial — see note)
├── bolcom/ # Bol.com (Netherlands / Belgium)
├── cdiscount/ # Cdiscount (France / Belgium)
├── cex/ # CeX (webstore operator bypass)
├── discord/ # Discord interactions payment adapter (Ed25519 — needs real app keypair)
├── ebay/ # eBay Platform Notifications adapter
├── ecwid/ # Ecwid / Lightspeed E-Series adapter
├── etsy/ # Etsy webhook adapter
├── faire/ # Faire B2B wholesale adapter (docs only — API approval required)
├── flipkart/ # Flipkart Seller API adapter (India)
├── freshbooks/ # FreshBooks invoice payment adapter
├── instagram-shops/ # Instagram & Facebook Shops adapter
├── jumia/ # Jumia seller adapter (docs only — no webhook endpoint)
├── lazada/ # Lazada open platform adapter (SE Asia)
├── mercadolibre/ # Mercado Libre adapter (Latin America)
├── myob/ # MYOB AccountRight poll-based adapter
├── onbuy/ # OnBuy marketplace adapter (UK)
├── printful/ # Printful print-on-demand adapter
├── printify/ # Printify print-on-demand adapter (docs only — no webhook endpoint)
├── quickbooks-online/ # QuickBooks Online invoice adapter
├── rakuten/ # Rakuten marketplace adapter
├── sage-business-cloud/ # Sage Business Cloud invoice adapter
├── shopee/ # Shopee open platform adapter (SE Asia)
├── telegram/ # Telegram Bot payment adapter
├── tokopedia/ # Tokopedia seller adapter (Indonesia)
├── truelayer/ # TrueLayer open banking adapter (ES512 — needs real signing key)
├── walmart/ # Walmart Marketplace adapter
├── wave/ # Wave Accounting invoice adapter
├── whatsapp/ # WhatsApp Business API adapter
├── wormhole/ # Wormhole cross-chain bridge adapter
├── x402-ai-agents/ # x402 autonomous AI agent payment adapter
├── ai-adapters/
│ ├── openai/ # Payment-gated OpenAI / compatible API wrappers (MPP + AP2 + x402)
│ ├── claude/ # Payment-gated Anthropic Claude wrappers (MPP + AP2 + x402)
│ ├── gemini/ # Payment-gated Google Gemini wrappers (MPP + AP2 + x402)
│ ├── bedrock/ # Payment-gated Amazon Bedrock Converse API wrappers (MPP + AP2 + x402)
│ ├── cohere/ # Payment-gated Cohere ClientV2 wrappers (MPP + AP2 + x402)
│ ├── xai/ # Payment-gated xAI Grok wrappers (MPP + AP2 + x402)
│ └── mistral/ # Payment-gated Mistral AI wrappers (MPP + AP2 + x402)
├── ai-agent-frameworks/
│ ├── langchain/ # LangChain gate — any ChatModel, LCEL chain, RAG pipeline, or ReAct agent
│ ├── llamaindex/ # LlamaIndex gate — QueryEngine, ChatEngine, RAG pipeline, or ReAct agent
│ ├── crewai/ # CrewAI gate — crew.kickoff() + BaseTool for multi-agent crews
│ ├── huggingface/ # Hugging Face gate — InferenceClient, transformers pipeline, smolagents tool
│ ├── autogen/ # AutoGen gate — initiate_chat() + callable tool (0.2.x + 0.4.x)
│ ├── semantic-kernel/ # Semantic Kernel gate — chat completion, KernelFunction, SK plugin
│ ├── pydantic-ai/ # Pydantic AI gate — any Agent, deps injection, provider:model strings
│ ├── dspy/ # DSPy gate — any Predict / ChainOfThought / ReAct / compiled program
│ ├── vercel-ai-sdk/ # Vercel AI SDK gate — generateText, streamText, tool() — TypeScript
│ ├── a2a/ # Google A2A gate — A2A v1.0 REST (6 routes), agent card + extended card, task store
│ ├── langgraph/ # LangGraph gate — StateGraph invoke/stream, ToolNode, create_react_agent
│ └── agno/ # Agno gate — pre_hooks, ASGI middleware (AgentOS), run_agent + arun_agent
├── no-code/ # No-code / automation adapters (Zapier, Make, n8n, X) — v1.0.0, 225+ tests
│ ├── zapier/ # AlgoVoiZapier — ZapierActionResult, webhook bridge, action handlers
│ ├── make/ # AlgoVoiMake — Make bundle dict, module handlers
│ ├── n8n/ # AlgoVoiN8n — n8n item dict, operation handlers
│ └── x/ # AlgoVoiX — X (Twitter) webhook adapter; auto-posts payment confirmations & checkout links via OAuth 1.0a
├── mcp-server/ # MCP server — 13 AlgoVoi tools for Claude Desktop / Claude Code / Cursor / Windsurf
│ ├── typescript/ # @algovoi/mcp-server (npm) — `npx -y @algovoi/mcp-server`
│ └── python/ # algovoi-mcp (PyPI) — `uvx algovoi-mcp`
├── drupal-commerce/ # Drupal 10/11 + Commerce 2/3 payment gateway module
├── easy-digital-downloads/ # EDD 3.2+ WordPress plugin (digital downloads, licensing)
├── ghost/ # Ghost 5.x paid-membership grant-on-payment adapter
├── xero/ # Xero invoice payment adapter
├── yapily/ # Yapily open banking adapter
├── zoho-books/ # Zoho Books invoice adapter
│
├── {platform}.md # Integration guides (45+ platforms)
└── README.md
Live-tested adapters
The following adapters have been end-to-end tested against a live AlgoVoi tenant on algorand_mainnet, voi_mainnet, hedera_mainnet, stellar_mainnet, base_mainnet, and solana_mainnet:
Last webhook test: 14 April 2026 — all 39 testable adapters passed on all 4 original chains (algorand_mainnet, voi_mainnet, hedera_mainnet, stellar_mainnet); Base and Solana added 2026-04-22/23. Checkout pages validated live via Comet CDP. 6 adapters skipped: BigCommerce (partial — order-amount fetch needs real API credentials), Discord (Ed25519), TrueLayer (ES512), Faire/Jumia/Printify (docs only).
Accounting adapters unit tests: 339 passing, 0 failing (includes replay attack prevention coverage — commit 5025c4e)
AI agent adapters — production ready as of 13 April 2026:
- x402: spec v1 compliant —
x402Version: 1,acceptsarray, CAIP-2 network IDs, string microunit amounts,payload.signatureproof format. Real payments smoke-tested on all 4 original chains (Algorand, VOI, Stellar, Hedera mainnet); Base and Solana added 2026-04-22/23.x402/verifyconfirmedverified:trueon each. 76/76 unit tests passing. Adapter v2.0.0. - MPP: 100% IETF spec compliant (v2.1.0) —
id(HMAC-SHA256),method,intent="charge",request=(charge intent object),expires, challenge echo validation (Table 3), CAIP-2 network routing, replay protection, spec-compliantPayment-Receipt. On-chain verification smoke-tested on all 4 original chains (Algorand, VOI, Hedera, Stellar) 13 Apr 2026 ×2; Base and Solana added 2026-04-22/23. 153/153 unit tests. - AP2: production ready (v2.0.0) — AP2 v0.1 CartMandate/PaymentMandate with AlgoVoi crypto-algo extension. CartMandate issues
PaymentMethodDataper extension schema (network,receiver,amount_microunits,asset_id,min_confirmations,memo_required). PaymentMandate acceptspayment_response.details.{network, tx_id, note_field}. ed25519 sig + on-chain AVM verification. PyNaCl + cryptography fallback both confirmed. 81/81 tests.
Two payment flows
Hosted checkout — Customer is redirected to a secure AlgoVoi-hosted payment page. Supports Algorand, VOI, Hedera, Stellar, Base, Solana, and Tempo. Works with any wallet (Pera, Defly, Lute, HashPack, Freighter, LOBSTR, MetaMask, Phantom, …). Payment confirmed via webhook or API status check. Used by all platforms including Shopify.
Extension payment — Customer pays directly on the store page using the AlgoVoi browser extension and algosdk. Supports Algorand and VOI only (AVM chains). Buyers paying on Hedera or Stellar use hosted checkout with their chain-native wallet. No redirect required for extension flow. Available on WooCommerce, OpenCart, PrestaShop, and Shopware.
Shopify checkout extension — "Pay with Crypto →" link rendered on the thank-you page via Shopify Checkout UI Extension (Preact). Customer selects their chain on a dedicated pay page. Webhook automatically adds payment link to order notes.
E-commerce integrations
CMS integrations
Drop-in payment gateways for major content-management and publishing platforms. All three were shipped together on 15 April 2026 and Comet-validated end-to-end. Each adapter applies the full April 2026 + pass-2 hardening set (cancel-bypass guard, empty-secret HMAC reject, timing-safe compare, 64 KB body cap, https-only outbound, amount sanity, scheme guards, token length caps, mandatory payment cross-check on webhooks).
Each adapter folder ships a README.md with a how-it-works diagram, quick-start, supported chains, webhook endpoint, security posture table, and dependency list.
Regional & international marketplace integrations
All regional marketplace adapters have been end-to-end tested on 14 April 2026 across all 4 original chains; Base and Solana added 2026-04-22/23. Checkout pages validated live via Comet CDP.
Accounting integrations
All 7 accounting adapters are end-to-end tested on 14 April 2026 against api.algovoi.co.uk across all 4 original chains (28/28 pass); Base and Solana added 2026-04-22/23.
Adapter source is not publicly distributed. Integration guides are below. Download your adapter from the AlgoVoi dashboard after signing in with your API key.
Social commerce integrations
Financial services integrations
AI agent & machine payment adapters
AI Platform Adapters
Drop-in payment gates for AI provider APIs. Each adapter wraps the AI call behind an on-chain payment check — the caller pays 0.01 USDC (or any configured amount) before the AI responds. All adapters accept OpenAI-format message lists and share a common interface: check(headers, body) → result, complete(messages) → str, flask_guard() convenience method.
All adapters support all 7 chains (Algorand, VOI, Hedera, Stellar, Base, Solana, Tempo) and all 3 payment protocols (MPP, AP2, x402).
OpenAI — MPP Quick start
from mpp_algovoi import AlgoVoiMppAI
gate = AlgoVoiMppAI(
openai_key = "sk-...",
algovoi_key = "algv_...",
tenant_id = "your-tenant-uuid",
payout_address = "YOUR_ALGORAND_ADDRESS",
networks = ["algorand_mainnet"], # or voi_mainnet / hedera_mainnet / stellar_mainnet
amount_microunits = 10000, # 0.01 USDC per call
resource_id = "ai-chat",
)
@app.route("/ai/chat", methods=["POST"])
def chat():
result = gate.check(dict(request.headers))
if result.requires_payment:
return result.as_flask_response() # 402 + WWW-Authenticate: Payment challenge
# result.receipt.payer, .tx_id, .amount available
return jsonify({"content": gate.complete(request.json["messages"])})
Supports any OpenAI-compatible provider via base_url:
OpenAI — AP2 Quick start
from ap2_algovoi import AlgoVoiAp2AI
gate = AlgoVoiAp2AI(
openai_key = "sk-...",
algovoi_key = "algv_...",
tenant_id = "your-tenant-uuid",
payout_address = "YOUR_ALGORAND_ADDRESS",
networks = ["algorand-mainnet", "voi-mainnet"],
amount_microunits = 10000, # 0.01 USDC per call
)
@app.route("/ai/chat", methods=["POST"])
def chat():
body = request.get_json(silent=True) or {}
result = gate.check(dict(request.headers), body)
if result.requires_payment:
return result.as_flask_response() # 402 + X-AP2-Cart-Mandate header
# result.mandate.payer_address, .network, .tx_id available
return jsonify({"content": gate.complete(body["messages"])})
Claude — Quick start
from claude_algovoi import AlgoVoiClaude
gate = AlgoVoiClaude(
anthropic_key = "sk-ant-...",
algovoi_key = "algv_...",
tenant_id = "your-tenant-uuid",
payout_address = "YOUR_ALGORAND_ADDRESS",
protocol = "mpp", # "mpp" | "ap2" | "x402"
network = "algorand-mainnet",
amount_microunits = 10000, # 0.01 USDC per call
)
@app.route("/ai/chat", methods=["POST"])
def chat():
body = request.get_json(silent=True) or {}
result = gate.check(dict(request.headers), body)
if result.requires_payment:
return result.as_flask_response()
return jsonify({"content": gate.complete(body["messages"])})
Models: claude-opus-4-7 · claude-sonnet-4-6 (default) · claude-haiku-4-5-20251001
Gemini — Quick start
from gemini_algovoi import AlgoVoiGemini
gate = AlgoVoiGemini(
gemini_key = "AIza...",
algovoi_key = "algv_...",
tenant_id = "your-tenant-uuid",
payout_address = "YOUR_ALGORAND_ADDRESS",
protocol = "mpp", # "mpp" | "ap2" | "x402"
network = "algorand-mainnet",
amount_microunits = 10000, # 0.01 USDC per call
)
@app.route("/ai/chat", methods=["POST"])
def chat():
body = request.get_json(silent=True) or {}
result = gate.check(dict(request.headers), body)
if result.requires_payment:
return result.as_flask_response()
return jsonify({"content": gate.complete(body["messages"])})
Models: gemini-2.0-flash (default) · gemini-2.0-flash-lite · gemini-2.5-pro
Bedrock — Quick start
from bedrock_algovoi import AlgoVoiBedrock
gate = AlgoVoiBedrock(
aws_access_key_id = "AKIA...", # or set AWS_ACCESS_KEY_ID env var
aws_secret_access_key = "wJal...", # or set AWS_SECRET_ACCESS_KEY env var
aws_region = "us-east-1",
algovoi_key = "algv_...",
tenant_id = "your-tenant-uuid",
payout_address = "YOUR_ALGORAND_ADDRESS",
protocol = "mpp", # "mpp" | "ap2" | "x402"
network = "algorand-mainnet",
amount_microunits = 10000, # 0.01 USDC per call
model = "amazon.nova-pro-v1:0",
)
@app.route("/ai/chat", methods=["POST"])
def chat():
body = request.get_json(silent=True) or {}
result = gate.check(dict(request.headers), body)
if result.requires_payment:
return result.as_flask_response()
return jsonify({"content": gate.complete(body["messages"])})
Models (any model exposed by Bedrock Converse in your AWS region/account):
amazon.nova-pro-v1:0 (default) · amazon.nova-lite-v1:0 · anthropic.claude-3-5-sonnet-20241022-v2:0 · meta.llama3-70b-instruct-v1:0 · amazon.titan-text-premier-v1:0
Cohere — Quick start
from cohere_algovoi import AlgoVoiCohere
gate = AlgoVoiCohere(
cohere_key = "...", # Cohere API key
algovoi_key = "algv_...",
tenant_id = "your-tenant-uuid",
payout_address = "YOUR_ALGORAND_ADDRESS",
protocol = "mpp", # "mpp" | "ap2" | "x402"
network = "algorand-mainnet",
amount_microunits = 10000, # 0.01 USDC per call
model = "command-r-plus-08-2024",
)
@app.route("/ai/chat", methods=["POST"])
def chat():
body = request.get_json(silent=True) or {}
result = gate.check(dict(request.headers), body)
if result.requires_payment:
return result.as_flask_response()
return jsonify({"content": gate.complete(body["messages"])})
Models: command-r-plus-08-2024 (default — most capable) · command-r-08-2024 (balanced) · command-r7b-12-2024 (fastest)
xAI (Grok) — Quick start
from xai_algovoi import AlgoVoiXai
gate = AlgoVoiXai(
xai_key = "xai-...", # xAI API key
algovoi_key = "algv_...",
tenant_id = "your-tenant-uuid",
payout_address = "YOUR_ALGORAND_ADDRESS",
protocol = "mpp", # "mpp" | "ap2" | "x402"
network = "algorand-mainnet",
amount_microunits = 10000, # 0.01 USDC per call
model = "grok-4",
)
@app.route("/ai/chat", methods=["POST"])
def chat():
body = request.get_json(silent=True) or {}
result = gate.check(dict(request.headers), body)
if result.requires_payment:
return result.as_flask_response()
return jsonify({"content": gate.complete(body["messages"])})
Models: grok-4 (default — latest, most capable) · grok-3 · grok-3-mini (fast + cheap) · grok-2-1212 · grok-2-vision-1212
Mistral — Quick start
from mistral_algovoi import AlgoVoiMistral
gate = AlgoVoiMistral(
mistral_key = "...", # Mistral API key
algovoi_key = "algv_...",
tenant_id = "your-tenant-uuid",
payout_address = "YOUR_ALGORAND_ADDRESS",
protocol = "mpp", # "mpp" | "ap2" | "x402"
network = "algorand-mainnet",
amount_microunits = 10000, # 0.01 USDC per call
model = "mistral-large-latest",
)
@app.route("/ai/chat", methods=["POST"])
def chat():
body = request.get_json(silent=True) or {}
result = gate.check(dict(request.headers), body)
if result.requires_payment:
return result.as_flask_response()
return jsonify({"content": gate.complete(body["messages"])})
Models: mistral-large-latest (default — flagship) · mistral-medium-latest · mistral-small-latest · codestral-latest · open-mistral-nemo · pixtral-large-latest
OpenAI-format messages work across all seven platforms — system roles are extracted automatically where required (Claude, Bedrock), Gemini assistant roles are mapped to model internally, and Cohere, xAI, and Mistral all accept the system role natively via their respective SDKs.
AI Agent Framework Adapters
Gate entire orchestration frameworks behind on-chain payment — not just a single model provider. These adapters are LLM-agnostic: pass any pre-built ChatModel, LCEL chain, RAG pipeline, or ReAct agent and the payment check wraps the whole thing.
LangChain — Quick start
from langchain_algovoi import AlgoVoiLangChain
gate = AlgoVoiLangChain(
openai_key = "sk-...", # OpenAI key (or pass llm= to use any ChatModel)
algovoi_key = "algv_...",
tenant_id = "your-tenant-uuid",
payout_address = "YOUR_ALGORAND_ADDRESS",
protocol = "mpp", # "mpp" | "ap2" | "x402"
network = "algorand-mainnet",
amount_microunits = 10000, # 0.01 USDC per call
)
@app.route("/ai/chat", methods=["POST"])
def chat():
body = request.get_json(silent=True) or {}
result = gate.check(dict(request.headers), body)
if result.requires_payment:
return result.as_flask_response()
return jsonify({"content": gate.complete(body["messages"])})
Bring your own model — pass any pre-built LangChain ChatModel instead of an OpenAI key:
from langchain_anthropic import ChatAnthropic
gate = AlgoVoiLangChain(
algovoi_key = "algv_...",
tenant_id = "...",
payout_address = "...",
llm = ChatAnthropic(model="claude-opus-4-7"),
)
Gate any LCEL chain or RAG pipeline:
chain = ChatPromptTemplate.from_template("Answer: {question}") | ChatOpenAI() | StrOutputParser()
result = gate.check(headers, body)
if not result.requires_payment:
output = gate.invoke_chain(chain, {"question": body["question"]})
Drop into a ReAct agent as a BaseTool:
tool = gate.as_tool(resource_fn=lambda q: my_handler(q), tool_name="premium_kb")
from langchain.agents import create_react_agent, AgentExecutor
agent = create_react_agent(llm, tools=[tool], prompt=prompt)
executor = AgentExecutor(agent=agent, tools=[tool])
The tool accepts {"query": "...", "payment_proof": "<base64>"}. Returns a challenge JSON dict if proof is absent or invalid; calls resource_fn(query) and returns the result if verified.
All 7 chains and all 3 protocols supported. Full reference: ai-agent-frameworks/langchain/README.md
LlamaIndex — Quick start
from llamaindex_algovoi import AlgoVoiLlamaIndex
gate = AlgoVoiLlamaIndex(
openai_key = "sk-...",
algovoi_key = "algv_...",
tenant_id = "your-tenant-uuid",
payout_address = "YOUR_ALGORAND_ADDRESS",
protocol = "mpp",
network = "algorand-mainnet",
amount_microunits = 10000,
)
# Gate a LlamaIndex QueryEngine (RAG pipeline)
result = gate.check(headers, body)
if not result.requires_payment:
answer = gate.query_engine_query(query_engine, body["query"])
# Gate a ChatEngine (multi-turn)
if not result.requires_payment:
reply = gate.chat_engine_chat(chat_engine, body["message"])
ReAct agent tool — drop into any LlamaIndex agent:
from llama_index.core.agent import ReActAgent
tool = gate.as_tool(resource_fn=my_handler, tool_name="premium_kb")
agent = ReActAgent.from_tools([tool], llm=llm, verbose=True)
The tool accepts {"query": "...", "payment_proof": "<base64>"}. Returns a ToolOutput with .content (challenge JSON or resource result), .tool_name, .raw_input, .raw_output.
Bring your own LlamaIndex LLM (Anthropic, Google, Cohere, Bedrock, etc.):
from llama_index.llms.anthropic import Anthropic
gate = AlgoVoiLlamaIndex(
algovoi_key = "algv_...",
tenant_id = "...",
payout_address = "...",
llm = Anthropic(model="claude-opus-4-7"),
)
All 7 chains and all 3 protocols supported. Full reference: ai-agent-frameworks/llamaindex/README.md
CrewAI — Quick start
from crewai_algovoi import AlgoVoiCrewAI
from crewai import Agent, Task, Crew, LLM
gate = AlgoVoiCrewAI(
openai_key = "sk-...",
algovoi_key = "algv_...",
tenant_id = "your-tenant-uuid",
payout_address = "YOUR_ALGORAND_ADDRESS",
protocol = "mpp",
network = "algorand-mainnet",
amount_microunits = 10000,
)
# Gate a crew.kickoff() call
result = gate.check(headers, body)
if not result.requires_payment:
output = gate.crew_kickoff(my_crew, inputs={"topic": body["topic"]})
# Or use flask_guard with an inputs extractor
@app.route("/ai/research", methods=["POST"])
def research():
return gate.flask_guard(my_crew, inputs_fn=lambda b: {"topic": b.get("topic", "")})
Add AlgoVoiPaymentTool to any CrewAI agent:
tool = gate.as_tool(resource_fn=my_handler, tool_name="premium_kb")
researcher = Agent(
role = "Research Analyst",
goal = "Use premium_kb to answer questions.",
backstory = "Expert researcher.",
tools = [tool],
llm = LLM(model="openai/gpt-4o"),
)
The tool uses PaymentToolInput (Pydantic args_schema) — the agent generates {"query": "...", "payment_proof": "<base64>"}, CrewAI validates it, and _run(query, payment_proof) is called directly as kwargs. Any crewai.LLM provider (OpenAI, Anthropic, Gemini, Bedrock, Groq, Together AI, …) is supported via the LiteLLM router.
All 7 chains and all 3 protocols supported. Full reference: ai-agent-frameworks/crewai/README.md
Hugging Face — Quick start
from huggingface_algovoi import AlgoVoiHuggingFace
gate = AlgoVoiHuggingFace(
hf_token = "hf_...",
algovoi_key = "algv_...",
tenant_id = "your-tenant-uuid",
payout_address = "YOUR_ALGORAND_ADDRESS",
protocol = "mpp",
network = "algorand-mainnet",
amount_microunits = 10000,
model = "meta-llama/Meta-Llama-3-8B-Instruct",
)
# Gate InferenceClient.chat_completion()
result = gate.check(headers, body)
if not result.requires_payment:
reply = gate.complete(body["messages"])
# Gate a transformers pipeline
from transformers import pipeline
pipe = pipeline("text-generation", model="HuggingFaceH4/zephyr-7b-beta", token="hf_...")
if not result.requires_payment:
answer = gate.inference_pipeline(pipe, body["messages"])
Drop into a smolagents ToolCallingAgent:
from smolagents import ToolCallingAgent, InferenceClientModel
tool = gate.as_tool(resource_fn=my_handler, tool_name="premium_kb")
model = InferenceClientModel(model_id="meta-llama/Meta-Llama-3-8B-Instruct")
agent = ToolCallingAgent(tools=[tool], model=model)
agent.run("Use premium_kb to answer my question.")
The tool accepts query and payment_proof (base64) as kwargs. Returns challenge JSON if proof absent/invalid; calls resource_fn(query) and returns the result if verified. Works with any smolagents agent type (ToolCallingAgent, CodeAgent, custom).
All 7 chains and all 3 protocols supported. Full reference: ai-agent-frameworks/huggingface/README.md
AutoGen — Quick start
from autogen_algovoi import AlgoVoiAutoGen
gate = AlgoVoiAutoGen(
openai_key = "sk-...",
algovoi_key = "algv_...",
tenant_id = "your-tenant-uuid",
payout_address = "YOUR_ALGORAND_ADDRESS",
protocol = "mpp",
network = "algorand-mainnet",
amount_microunits = 10000,
)
# Build agents from gate.llm_config
from autogen import AssistantAgent, UserProxyAgent
assistant = AssistantAgent("assistant", llm_config=gate.llm_config)
user_proxy = UserProxyAgent("user_proxy", human_input_mode="NEVER",
max_consecutive_auto_reply=3,
code_execution_config=False)
# Gate a conversation
result = gate.check(headers, body)
if not result.requires_payment:
output = gate.initiate_chat(assistant, user_proxy, body["message"], max_turns=5)
Callable tool — AutoGen 0.2.x:
tool = gate.as_tool(resource_fn=my_handler, tool_name="premium_kb")
@user_proxy.register_for_execution()
@assistant.register_for_llm(description=tool.description, name=tool.name)
def premium_kb(query: str, payment_proof: str = "") -> str:
return tool(query=query, payment_proof=payment_proof)
AutoGen 0.4.x FunctionTool:
from autogen_core.tools import FunctionTool
fn_tool = FunctionTool(tool, description=tool.description, name=tool.name)
All 7 chains and all 3 protocols supported. Full reference: ai-agent-frameworks/autogen/README.md
Semantic Kernel — Quick start
from semantic_kernel_algovoi import AlgoVoiSemanticKernel
gate = AlgoVoiSemanticKernel(
openai_key = "sk-...",
algovoi_key = "algv_...",
tenant_id = "your-tenant-uuid",
payout_address = "YOUR_ALGORAND_ADDRESS",
protocol = "mpp",
network = "algorand-mainnet",
amount_microunits = 10000,
model = "gpt-4o",
)
# Gate SK chat completion (sync wrapper around async SK API)
result = gate.check(headers, body)
if not result.requires_payment:
reply = gate.complete(body["messages"])
# Gate any KernelFunction
output = gate.invoke_function(kernel, summarise_fn, input=body["text"])
Add as a @kernel_function plugin:
plugin = gate.as_plugin(resource_fn=my_handler, plugin_name="premium_kb")
kernel.add_plugin(plugin, plugin_name="premium_kb")
# The LLM can select plugin.gate() via function calling (auto-invocation)
The gate function accepts query and payment_proof (base64). Returns challenge JSON if proof absent/invalid; calls resource_fn(query) and returns the result if verified.
All 7 chains and all 3 protocols supported. Full reference: ai-agent-frameworks/semantic-kernel/README.md
Pydantic AI — Quick start
from pydanticai_algovoi import AlgoVoiPydanticAI
gate = AlgoVoiPydanticAI(
openai_key = "sk-...",
algovoi_key = "algv_...",
tenant_id = "your-tenant-uuid",
payout_address = "YOUR_ALGORAND_ADDRESS",
protocol = "mpp",
network = "algorand-mainnet",
amount_microunits = 10000,
model = "openai:gpt-4o", # any Pydantic AI provider:model string
)
# Gate chat completion
result = gate.check(headers, body)
if not result.requires_payment:
reply = gate.complete(body["messages"])
# Gate any pre-built Agent (with optional dependency injection)
from pydantic_ai import Agent
my_agent = Agent("anthropic:claude-opus-4-7", system_prompt="Be concise.")
output = gate.run_agent(my_agent, body["prompt"], deps=my_deps)
Add as a pydantic_ai.tools.Tool:
from pydantic_ai.tools import Tool
tool = gate.as_tool(resource_fn=my_handler, tool_name="premium_kb")
agent = Agent("openai:gpt-4o", tools=[Tool(tool, name=tool.name, description=tool.description)])
The tool accepts query and payment_proof (base64). Returns challenge JSON if proof absent/invalid; calls resource_fn(query) if verified. Supports all Pydantic AI providers — OpenAI, Anthropic, Google, Groq, Ollama, and any OpenAI-compatible endpoint via base_url.
All 7 chains and all 3 protocols supported. Full reference: ai-agent-frameworks/pydantic-ai/README.md
DSPy — Quick start
from dspy_algovoi import AlgoVoiDSPy
gate = AlgoVoiDSPy(
openai_key = "sk-...",
algovoi_key = "algv_...",
tenant_id = "your-tenant-uuid",
payout_address = "YOUR_ALGORAND_ADDRESS",
protocol = "mpp",
network = "algorand-mainnet",
amount_microunits = 10000,
model = "openai/gpt-4o", # DSPy provider/model string (slash, not colon)
)
# Gate any DSPy module
import dspy
class QA(dspy.Signature):
"""Answer the question."""
question: str = dspy.InputField()
answer: str = dspy.OutputField()
result = gate.check(headers, body)
if not result.requires_payment:
answer = gate.run_module(dspy.ChainOfThought(QA), question=body["question"])
Gate a compiled DSPy program:
# Works with any compiled / optimised DSPy program (Predict, ChainOfThought, ReAct, MIPROv2…)
result = gate.run_module(my_compiled_program, question=body["question"])
Drop into a ReAct agent as a plain callable tool:
tool = gate.as_tool(resource_fn=my_handler, tool_name="premium_kb")
react = dspy.ReAct(QA, tools=[tool])
lm = gate._ensure_lm()
with dspy.context(lm=lm):
out = react(question=body["question"])
All LLM calls use dspy.context(lm=...) — global dspy.configure() state is never modified. DSPy's provider/model string format is supported for OpenAI, Anthropic, Google, Cohere, Groq, Ollama, and Azure OpenAI.
All 7 chains and all 3 protocols supported. Full reference: ai-agent-frameworks/dspy/README.md
Vercel AI SDK — Quick start
import { openai } from "@ai-sdk/openai";
import { AlgoVoiVercelAI } from "./vercel_ai_algovoi";
const gate = new AlgoVoiVercelAI({
algovoiKey: "algv_...",
tenantId: "your-tenant-uuid",
payoutAddress: "YOUR_ALGORAND_ADDRESS",
protocol: "mpp",
network: "algorand-mainnet",
amountMicrounits: 10_000,
model: openai("gpt-4o"), // any @ai-sdk/* provider
});
// Next.js App Router — one-liner
export const POST = (req: Request) => gate.nextHandler(req);
Streaming:
export async function POST(req: Request) {
const body = await req.json();
const result = await gate.check(req.headers, body);
if (result.requiresPayment) return result.as402Response();
return gate.streamText(body.messages).toDataStreamResponse();
}
Payment tool for LLM function calling:
const tool = gate.asTool(
async (query) => myPremiumHandler(query),
{ toolName: "premium_kb", toolDescription: "Access premium knowledge base." }
);
// Use in generateText({ tools: { premium_kb: tool } })
Supports any @ai-sdk/* provider — OpenAI, Anthropic, Google, Groq, Mistral, Cohere, Ollama, Azure. Uses node:crypto for MPP HMAC; requires Node.js runtime (not Edge) for MPP. x402 and AP2 work on Edge runtimes.
All 7 chains and all 3 protocols supported. Full reference: ai-agent-frameworks/vercel-ai-sdk/README.md
Google A2A — Quick start
from a2a_algovoi import AlgoVoiA2A
gate = AlgoVoiA2A(
algovoi_key="algv_...",
tenant_id="your-tenant-uuid",
payout_address="YOUR_ALGORAND_ADDRESS",
protocol="mpp",
network="algorand-mainnet",
amount_microunits=10_000,
agent_name="My AlgoVoi Agent",
)
# Flask A2A server
from flask import Flask, jsonify
app = Flask(__name__)
@app.route("/a2a", methods=["POST"])
def a2a_endpoint():
return gate.flask_agent(lambda text: my_llm(text))
@app.route("/.well-known/agent-card.json")
def card():
return jsonify(gate.agent_card("https://myhost.com/a2a"))
# A2A client — call another agent
response = gate.send_message("https://other-agent.example.com/a2a", "hello", payment_proof="proof")
task = response["result"] # {"id": "...", "status": {"state": "completed"}, "artifacts": [...]}
# Payment tool for A2A pipelines
tool = gate.as_tool(lambda q: fetch_kb(q), tool_name="premium_kb")
All 7 chains and all 3 protocols supported. Full reference: ai-agent-frameworks/a2a/README.md
No-Code / Automation Adapters
Drop-in Python classes that bridge AlgoVoi crypto payment flows into Zapier, Make (Integromat), and n8n — the three leading no-code / low-code automation platforms. Each adapter is a single file with zero external dependencies (stdlib HTTP only), mirrors the native Python adapter pattern, and applies the full April 2026 + pass-2 security hardening.
All three adapters were shipped on 17 April 2026 and are Comet-validated end-to-end.
Total: 225/225 tests · 21/21 smoke checks (Phase 1) · 3/3 live create_payment_link + verify_payment (Phase 2)
Supported across all 14 networks (7 mainnet + 7 testnet) on Algorand, VOI, Hedera, Stellar, Base, Solana, and Tempo. All three adapters support MPP, x402, and AP2 challenge generation.
Zapier — Quick start
from zapier_algovoi import AlgoVoiZapier
handler = AlgoVoiZapier(
algovoi_key = "algv_...",
tenant_id = "your-tenant-uuid",
payout_algorand= "YOUR_ALGORAND_ADDRESS",
webhook_secret = "whsec_...", # optional
zapier_hook_url= "https://hooks.zapier.com/hooks/catch/XXXX/YYYY/", # optional
)
# Create a payment link (Zapier action)
result = handler.action_create_payment_link({
"amount": 5.00,
"currency": "USD",
"label": "Premium access",
"network": "algorand_mainnet",
})
# result.success, result.data["checkout_url"], result.data["token"]
# Verify payment status
result = handler.action_verify_payment({"token": "tok_..."})
# result.data["paid"] → True/False, result.data["status"] → "active"|"paid"|...
# Receive and forward an AlgoVoi webhook to a Zapier Catch Hook
result = handler.receive_and_forward(raw_body=..., signature=...)
# Generate MPP / x402 / AP2 challenge
result = handler.action_generate_challenge({
"protocol": "mpp", # "mpp" | "x402" | "ap2"
"resource_id": "/api/premium",
"amount_microunits": 10_000,
"network": "algorand_mainnet",
})
Make (Integromat) — Quick start
from make_algovoi import AlgoVoiMake
handler = AlgoVoiMake(
algovoi_key = "algv_...",
tenant_id = "your-tenant-uuid",
payout_algorand = "YOUR_ALGORAND_ADDRESS",
payout_stellar = "G...", # optional — add any chain
)
# Create a payment link (Make module)
bundle = handler.module_create_payment_link({
"amount": 10.00,
"currency": "USD",
"label": "API access — 30 days",
"network": "stellar_mainnet",
})
# bundle["data"]["checkout_url"], bundle["data"]["token"]
# on error: bundle["error"]["message"], bundle["error"]["code"]
# Verify payment
bundle = handler.module_verify_payment({"token": "tok_..."})
# bundle["data"]["paid"], bundle["data"]["status"]
# Generate challenge (MPP / x402 / AP2)
bundle = handler.module_generate_challenge({
"protocol": "x402",
"resource_id": "/api/v1/data",
"amount_microunits": 500_000,
"network": "stellar_mainnet",
})
# Receive AlgoVoi webhook
bundle = handler.receive_webhook(raw_body=..., signature=...)
n8n — Quick start
from n8n_algovoi import AlgoVoiN8n
handler = AlgoVoiN8n(
algovoi_key = "algv_...",
tenant_id = "your-tenant-uuid",
payout_hedera = "0.0.XXXXX", # set whichever chains you support
)
# Create a payment link (n8n Code node operation)
item = handler.execute_create_payment_link({
"amount": 2.50,
"currency": "USD",
"label": "Agent service call",
"network": "hedera_mainnet",
})
# item["json"]["success"], item["json"]["checkout_url"], item["json"]["token"]
# Verify payment
item = handler.execute_verify_payment({"token": "tok_..."})
# item["json"]["paid"], item["json"]["status"]
# Generate challenges
item = handler.execute_generate_mpp_challenge({
"resource_id": "/api/premium", "amount_microunits": 10_000, "network": "algorand_mainnet"
})
item = handler.execute_generate_x402_challenge({
"resource_id": "/api/data", "amount_microunits": 500_000, "network": "algorand_mainnet"
})
item = handler.execute_generate_ap2_mandate({
"resource_id": "/service", "amount_microunits": 2_000_000, "network": "voi_mainnet"
})
# Receive and verify an AlgoVoi webhook
item = handler.receive_webhook(raw_body=..., signature=...)
item = handler.execute_verify_webhook_signature({"raw_body": ..., "signature": ...})
Full reference: no-code/README.md
MCP Server
An MCP (Model Context Protocol) server that exposes AlgoVoi's payment infrastructure as tools directly inside Claude Desktop, Claude Code, Cursor, Windsurf, and any other MCP-compatible AI assistant. Ships as two packages — pick whichever runtime your client supports:
13 built-in tools
Quick start — Claude Desktop / Claude Code / Cursor
{
"mcpServers": {
"algovoi": {
"command": "npx",
"args": ["-y", "@algovoi/mcp-server"],
"env": {
"ALGOVOI_API_KEY": "algv_...",
"ALGOVOI_TENANT_ID": "...",
"ALGOVOI_PAYOUT_ALGORAND": "<your-algorand-address>",
"ALGOVOI_PAYOUT_VOI": "<your-voi-address>",
"ALGOVOI_PAYOUT_HEDERA": "0.0.<your-account>",
"ALGOVOI_PAYOUT_STELLAR": "G<your-stellar-address>",
"ALGOVOI_PAYOUT_BASE": "0x<your-evm-address>",
"ALGOVOI_PAYOUT_SOLANA": "<your-solana-address>"
}
}
}
}
Single-chain users only need to set the env var for their chain — the others are optional. For Base use ALGOVOI_PAYOUT_BASE; for Solana use ALGOVOI_PAYOUT_SOLANA. For the Python package, swap "command": "uvx", "args": ["algovoi-mcp"].
Config file locations: Claude Desktop %APPDATA%\Claude\claude_desktop_config.json (Windows) / ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) · Claude Code ~/.claude.json · Cursor ~/.cursor/mcp.json
Full reference: mcp-server/README.md · TypeScript source: mcp-server/typescript/ · Python source: mcp-server/python/
Charity Interfaces
Pre-built, self-contained donation pages powered by AlgoVoi and deployed to Cloudflare Pages. Zero external dependencies — drop the HTML file onto any server or share the URL directly.
Source: x402-widget/manndeshi.html · x402-widget/functions/api/manndeshi/donate.js
x402 Embeddable Payment Widget
A drop-in Web Component for accepting x402 payments on any website. Deployed to Cloudflare Pages at your-domain.example. Full source and security guide: x402-widget/
<script type="module" src="https://your-domain.example/widget.js"></script>
<algovoi-x402
amount="29.99"
chains="ALGO,VOI,XLM,HBAR,ETH,SOL"
tenant-id="your-tenant-id"
api-key="algv_your-api-key">
</algovoi-x402>
Adapters with limited support
Six adapters have structural blockers that prevent full end-to-end testing:
How payments work
Customer places order and selects chain (Algorand / VOI / Hedera / Stellar / Base / Solana)
↓
Plugin creates payment link via POST /v1/payment-links
↓
Hosted: redirect to AlgoVoi checkout page
Extension: pay in-page via AlgoVoi browser wallet
↓
Customer pays on-chain
↓
AlgoVoi verifies the transaction on-chain
↓
Webhook fires → order marked as paid in your platform
Payments are verified directly on-chain — no intermediary holds funds. Settlement goes straight to the merchant's configured payout address.
Security
Every adapter is hardened against real-world payment attack vectors. Pass 1 (April 2026) covered cancel-bypass / empty-secret / cookie-swap / SSRF / timing attacks across all deployed stores and native adapters. Pass 2 (15 April 2026) added defensive depth across the B2B webhook trio + native SDKs + a critical Rust compile fix.