Quick Start Guide

Choose your integration path

🐍

Python SDK + Agent

⭐ FOR AI AGENTS

AI agents that autonomously manage wallets and make payments via streaming chat API. Docker agent handles everything.

  • ✅ Python SDK with Agent class
  • ✅ Docker agent (port 7860)
  • ✅ Wallet management
  • ✅ CLI tools
Start with SDK →

Protected API

LOW-LEVEL RPC

Direct Nano operations via REST API. For developers who want full control over wallet management and block operations.

  • ✅ REST API (HTTPS)
  • ✅ Block publish/info
  • ✅ Payment requests
  • ⚠️ Manual wallet management
Use API →
💳

Payment Pages

FOR WEBSHOPS

Hosted checkout pages for webshops. Generate payment URL and redirect customers to secure payment page.

  • ✅ Hosted checkout
  • ✅ No wallet setup
  • ✅ QR code + deep links
  • ✅ Redirect after payment
Use Pages →
🐍

Python SDK Quick Start

1

Install the SDK

Terminal
pip install ifenpay-agent-sdk

📦 View on PyPI: pypi.org/project/ifenpay-agent-sdk

2

Setup the Agent

Terminal
python -m ifenpay_agent_sdk.cli setup

This downloads the agent repository to ~/.ifenpay/agent/ and creates the necessary configuration.

⚙️ Configure the Agent

Edit the configuration file at:

~/.ifenpay/agent/.env
AGENT_MODE=production
AI_WALLET_PASSWORD=auto-generated # Auto-generated by init script
NANO_WORK_MODE=auto
3

Start the Agent

Terminal
python -m ifenpay_agent_sdk.cli start

The agent runs in Docker and handles wallet management automatically.

4

Use in Your Code

main.py
from ifenpay_agent_sdk import Agent, AgentError

# Initialize the agent (connects to Docker agent on port 7860)
agent = Agent(agent_url="http://localhost:7860")

try:
    # Check balance (wallet auto-initialized in strict mode)
    balance = agent.check_balance(auto_receive_pending_blocks=True)
    print(f"Balance: {balance.balance} NANO")
    print(f"Address: {balance.address}")
    
    # Make payment
    result = agent.pay(
        address="nano_1ebhjnii43rx9fs41njqam86q9uwgcfbap18beoyrpheekw7wniu9e3g6rb3",
        amount="0.001"
    )
    print(f"✅ Payment sent! Hash: {result.hash}")
    
    # Create payment request (AI-to-AI payments)
    payment_req = agent.request_payment(amount="0.001")
    print(f"⚠️  EXACT Amount: {payment_req.amount} NANO (with offset)")
    print(f"Pay to: {payment_req.receive_address}")

except AgentError as e:
    print(f"❌ Error [{e.error_code}]: {e.message}")

✅ You're Ready!

Your AI agent can now make and receive Nano payments autonomously. In strict mode, wallets are automatically managed with custodial model for security.

Protected API Quick Start

⚠️ Low-level API: This API is for direct Nano block operations.

For simple payment links, use Payment Pages.

1

Get API Key

Login and create an API key.

2

Create Payment Request

cURL
curl -X POST https://api.ifenpay.com/payment/request \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "receive_address": "nano_1abc...xyz",
    "amount": "1.5",
    "redirect_url": "https://yourshop.com/thank-you"
  }'
Response
{
  "transaction_id": "77df93b1-01e9-4582-86a4-c3a7edd8f1b4",
  "receive_address": "nano_3xyz...",
  "amount": "1.5",
}
3

Check Status

GET Request
GET https://api.ifenpay.com/payment/status/77df93b1-01e9-4582-86a4-c3a7edd8f1b4
Authorization: Bearer YOUR_API_KEY

📚 Full API Documentation

View all available endpoints and operations.

View API Reference
💳

Payment Pages Quick Start

🚧 IN DEVELOPMENT

⚠️ This feature is currently in development and not yet operational.

For now, use the Python SDK or Protected API for payment integration. We'll announce when hosted payment pages go live.

✨ Planned feature: Generate a payment URL and redirect your customers.

1

Generate Payment URL

Use this URL structure:

URL Format
https://api.ifenpay.com/payment/create/{YOUR_NANO_ADDRESS}/{API_KEY}
2

Redirect Customer

HTML
<a href="https://api.ifenpay.com/payment/create/nano_1abc.../your_api_key">
  Pay with Nano
</a>
JavaScript
function redirectToPayment() {
  const paymentUrl = `https://api.ifenpay.com/payment/create/${nanoAddress}/${apiKey}`;
  window.location.href = paymentUrl;
}
3

Payment page features

  • ✅ QR code for wallet apps
  • ✅ Deep links (nano://) for mobile
  • ✅ Real-time payment confirmation
  • ✅ Auto-redirect after payment
  • ✅ Responsive design

🚧 Coming Soon

This feature is under active development. Subscribe to our updates or join Discord to be notified when it launches.

📖 Documentation

Complete guides and API references

Read Docs →

💬 Community

Join our Discord for help and discussions

Join Discord →

💻 GitHub

Explore our open source SDK and examples

View GitHub →