aipp. docs

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.

Buyer / AI Agent
Web Browser / MCP Client
1. HTTP 402 Challenge
2. Settle & Preimage
aipp Protocol
Smart Tag Router
Automatic Direct Payout ➔ Creator Wallet (Lightning / Base)

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." });
});
REMOTE MCP · MODEL CONTEXT PROTOCOL

Connect AIPP MCP

Connect Claude, Cursor, or VS Code to AIPP’s public MCP server. No API key or sign-in is required.

REMOTE ENDPOINT https://aipp.dev/mcp

Connect Claude (Web & Desktop) to AIPP’s MCP server via Custom Connectors.

Open Claude Connectors ↗
Setup Steps:
  1. Claude’da Customize → Connectors sayfasını aç ve Add custom connector seç.
  2. Name olarak AIPP Monetize, URL olarak https://aipp.dev/mcp, Authentication olarak None gir.
  3. Connector’ı bağla; ilk araç çağrısında güvenli başlangıç için Allow once seç.
Connection Details
Name AIPP Monetize
Remote URL https://aipp.dev/mcp
Authentication None
Example Test Prompt:
Use the AIPP Monetize connector to run get_aipp_capabilities and summarize the result.

Available Read-Only MCP Tools

get_aipp_capabilities
Explains pay-per-action monetization capabilities for APIs, tools, and digital resources over Lightning (L402) and Base USDC (x402).
get_integration_guide
Provides step-by-step developer guides and copy-paste samples for api, mcp, automation, and digital_content.
inspect_smart_tag
Inspects public Smart Tag pricing and payment rails in read-only mode without exposing private backend configuration.
🔒 Security & Usage Information:
  • 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.
AI M2M PROTOCOL · PYTHON / LANGCHAIN

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)
CREATOR MONETIZATION · NOTION / EMBEDS

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:

  1. Get Your Duplicate Link: In your Notion page, click Share ➔ Publish ➔ Allow duplicate as template and copy the public link.
  2. Create an aipp Smart Tag: On aipp.dev, set your price, wallet, and paste your Notion duplicate link as the redirect target.
  3. 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.
🏷️ Transparent pricing: 3% per successful transaction ($0 monthly, $0 setup). Lightning: 3% + 5 sats per successful transaction; Base USDC: 3% per successful transaction ($0.001 minimum fee). Merchant payouts are sent automatically.
PUBLISHING · GHOST / WORDPRESS / SUBSTACK

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>
NO-CODE AUTOMATION · N8N / MAKE.COM / ZAPIER

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.

Download Templates:
PKM & NOTES · OBSIDIAN.MD

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>
AI MODELS · HUGGING FACE / GRADIO

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://..."}
DEVELOPER UTILITY · BASH / CLI

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
CLIENT UTILITY · EXTENSION

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.
POST /merchant/links/create

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.

POST /invoice/create

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"
  }'
GET /invoice/status/:hash

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
PROTOCOL · LIGHTNING L402

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..."
PROTOCOL · BASE USDC (x402)

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..."