Developer Documentation
Guides and API references for adding pay-per-use payments to digital products and AI workflows.
Architecture Overview
aipp creates payment challenges, verifies successful payments, deducts the disclosed service fee, and automatically forwards the merchant amount to the configured wallet. aipp does not offer merchant spending accounts or prepaid balances.
SDK Quickstart
Install the SDK, create a client, and protect an Express route:
// Node.js / Express
import { Aipp, l402Paywall } from 'aipp-sdk';
const aipp = new Aipp({ apiKey: process.env.AIPP_API_KEY });
app.post('/api/generate-summary', l402Paywall({
client: aipp,
jwtSecret: process.env.AIPP_JWT_SECRET,
resourceId: 'generate-summary',
amountUsd: 0.05
}), async (req, res) => {
res.json({ result: "Premium AI analysis completed." });
});
Connect AIPP MCP
Connect Claude, Cursor, or VS Code to AIPP’s public MCP server. No API key or sign-in is required.
Connect Claude (Web & Desktop) to AIPP’s MCP server via Custom Connectors.
Open Claude Connectors ↗- Claude’da Customize → Connectors sayfasını aç ve Add custom connector seç.
- Name olarak
AIPP Monetize, URL olarakhttps://aipp.dev/mcp, Authentication olarakNonegir. - Connector’ı bağla; ilk araç çağrısında güvenli başlangıç için
Allow onceseç.
Connect Cursor AI Code Editor using one-click deeplink or manual JSON config.
Install in Cursor ⚡- Cursor Settings → Features → MCP Servers sayfasını aç.
- Add new MCP server seçeneğine tıkla veya konfigürasyonu
.cursor/mcp.jsoniçine ekle.
{
"mcpServers": {
"aipp-monetize": {
"url": "https://aipp.dev/mcp"
}
}
}
Connect Visual Studio Code / Copilot with official MCP install URI or manual config.
Install in VS Code ⚡.vscode/mcp.jsondosyasını oluştur veya VS Code User MCP Settings sayfasını aç.- Sunucu tanımını ekle ve kaydet.
{
"servers": {
"aippMonetize": {
"type": "http",
"url": "https://aipp.dev/mcp"
}
}
}
Available Read-Only MCP Tools
get_aipp_capabilitiesget_integration_guideapi, mcp, automation, and digital_content.inspect_smart_tag- No API key or OAuth required: AIPP’s MCP server is stateless and publicly accessible for documentation and tag discovery.
- Safe initial execution: All tools provide read-only information. We recommend selecting "Allow once" upon the first tool execution to inspect tool outputs.
- Custom remote adapter: This guide provides connection instructions for custom/remote MCP servers; AIPP does not claim pre-installed listing in proprietary marketplaces.
Autonomous AI Agents & LangChain Tools
Enable autonomous LLM agents (LangChain, CrewAI, LlamaIndex, Claude MCP) to execute machine-to-machine micro-payments with Bitcoin Lightning L402 and cryptographic preimages.
Key Features:
- Agent-friendly payments: AI agents can pay from $0.01 per API inference or database query.
- Machine-readable receipts: Settlements include a transaction identifier, timestamp, amounts and available payment proof.
# Python: pip install aipp-sdk
import os
from aipp import Aipp
client = Aipp(api_key=os.environ["AIPP_API_KEY"])
# 1. Issue an L402 payment challenge for an AI tool
charge = client.create_charge(amount_usd=0.05, protocol="L402", memo="AI Query")
print("Invoice for Agent:", charge.payment_request)
# 2. Verify settlement and read the payment receipt
receipt = client.get_receipt(charge.payment_hash)
if receipt.status == "settled":
print("Transaction:", receipt.transaction_id)
Monetizing Notion Templates & Pages in 3 Seconds
Sell Notion templates, productivity dashboards, research notes, or digital resources with pay-per-item access instead of requiring a subscription.
How to Monetize in 3 Steps:
- Get Your Duplicate Link: In your Notion page, click Share ➔ Publish ➔ Allow duplicate as template and copy the public link.
- Create an aipp Smart Tag: On aipp.dev, set your price, wallet, and paste your Notion duplicate link as the redirect target.
- Embed or Share: Paste your checkout URL directly in Notion using the
/embed https://aipp.dev/embed/p_...command, or share it on Twitter/Reddit.
Pay-Per-Article Paywall Widget for Blogs
Allow readers to unlock individual articles or premium chapters for $0.01 - $0.50 (16 - 750 Sats) without forcing a recurring monthly subscription.
1-Line Embed Code:
<!-- Paste inside any Ghost, WordPress, or HTML blog post --> <div data-aipp-tag="p_YOUR_TAG_ID"> <p>Paywall preview overlay component for embedding on custom websites. Content is blurred by default and premium article content unlocked upon verified payment.</p> </div> <script src="https://aipp.dev/aipp-widget.js"></script>
Monetizing n8n & Make.com Workflows
Monetize any n8n or Make.com workflow (e.g. AI Image Generation, Web Scraping, Financial PDF summary) in 3 minutes using aipp Smart Tags and Webhooks.
Monetizing Obsidian Notes & Vaults
Sell Obsidian vaults, research databases, or interactive canvas notes with transparent fees and automatic satoshi payouts.
<!-- Embed in Obsidian Publish or Markdown notes --> <iframe src="https://aipp.dev/embed/p_YOUR_TAG_ID" style="width:100%; max-width:360px; height:380px; border:none; border-radius:10px;"></iframe>
Monetizing AI Models & Gradio Spaces
Charge users per inference or image generation to cover GPU costs on Hugging Face Spaces using Bitcoin Lightning L402.
# Python Gradio Example (pip install aipp-sdk)
from aipp import Aipp
client = Aipp(api_key="aipp_merch_YOUR_KEY")
def generate_image(prompt, preimage=None):
if not preimage:
charge = client.create_charge(amount_usd=0.02, protocol="L402", memo=f"GPU: {prompt[:20]}")
return {"status": "PAYMENT_REQUIRED", "invoice": charge.payment_request, "sats": charge.amount_sats}
receipt = client.get_receipt(charge.payment_hash)
if receipt.status == "settled":
return {"status": "SUCCESS", "image_url": "https://..."}
Terminal & Curl Paywalls
Sell bash scripts, dotfiles, or datasets directly through the terminal with zero browser required.
# 1. Trigger terminal paywall & get ASCII Lightning Invoice
curl https://aipp.dev/cli/p_demo
# 2. Pay, then exchange PAYMENT_HASH + ACCESS_CLAIM_SECRET for an access token
curl -s -X POST https://aipp.dev/t/p_demo/access-token \
-H "Content-Type: application/json" \
-d '{"payment_hash":"PAYMENT_HASH","access_claim_secret":"ACCESS_CLAIM_SECRET"}'
# 3. Deliver the payload without putting credentials in the URL
curl -s -H "Authorization: Bearer ACCESS_TOKEN" https://aipp.dev/cli/p_demo
1-Click Chrome Extension
The aipp Extension is a browser companion for creating and attaching Smart Tags to web content.
Two Core Operating Modes:
- Create Tag Mode: Activates a visual DOM element picker on your active tab. Click text, an image, or a container to attach a paywall snippet.
- Quick Link Mode: Packages private links into one Smart Tag (
https://aipp.dev/t/p_...). A browser gets checkout; an agent gets the manifest.
Create an aipp Smart Tag
Create one priced capability that works for both people and software. The response includes a human URL and an agent manifest URL.
curl -X POST https://aipp.dev/merchant/links/create \
-H "Content-Type: application/json" \
-H "X-Api-Key: $AIPP_API_KEY" \
-d '{
"title": "Autonomous Agent Workflow Pack",
"amount_usd": 0.25,
"redirect_url": "https://example.com/download",
"capability_type": "api",
"description": "Summarize one research document",
"input_schema": {"type":"object","properties":{"url":{"type":"string"}}},
"output_schema": {"type":"object","properties":{"summary":{"type":"string"}}}
}'
One URL, two interfaces
# Friendly checkout for a person curl -H "Accept: text/html" https://aipp.dev/t/p_YOUR_TAG # Stable description for an agent, MCP tool or workflow curl -H "Accept: application/json" https://aipp.dev/t/p_YOUR_TAG # or GET /t/p_YOUR_TAG/manifest
After settlement, exchange the invoice's private claim at POST /t/:tag/access-token, then call GET /t/:tag/content with Authorization: Bearer <access_token>. Payment hashes identify invoices but never authorize content.
Create a Payment Challenge
Generate a Lightning invoice, Base USDC challenge, or offer both payment methods.
curl -X POST https://aipp.dev/invoice/create \
-H "Content-Type: application/json" \
-H "X-Api-Key: $AIPP_API_KEY" \
-d '{
"amount_usd": 0.25,
"protocol": "dual"
}'
Verify Settlement Status
Real-time endpoint called to verify whether a payment hash or EVM signature has achieved network confirmation.
curl https://aipp.dev/invoice/status/YOUR_PAYMENT_HASH
Bitcoin Lightning (L402)
aipp implements native HTTP 402 Payment Required challenges using L402 macaroons and Lightning network preimages for sub-second, sub-cent settlement.
# HTTP 402 Lightning Challenge Response Header WWW-Authenticate: L402 macaroon="...", invoice="lnbc..."
Base USDC Payments (x402)
For onchain micropayments, aipp supports Base USDC instant verification with smart contract splits and EIP-712 cryptographic proofs.
# HTTP 402 EVM Challenge Response Header WWW-Authenticate: x402 token="USDC", network="base", amount="0.25", recipient="0x..."