Quick Start Guide
Choose your integration path
Python SDK + Agent
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
Protected API
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
Payment Pages
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
Python SDK Quick Start
Install the SDK
pip install ifenpay-agent-sdk
📦 View on PyPI: pypi.org/project/ifenpay-agent-sdk
Setup the Agent
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
Start the Agent
python -m ifenpay_agent_sdk.cli start
The agent runs in Docker and handles wallet management automatically.
Use in Your Code
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.
Get API Key
Login and create an API key.
Create Payment Request
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"
}'
{
"transaction_id": "77df93b1-01e9-4582-86a4-c3a7edd8f1b4",
"receive_address": "nano_3xyz...",
"amount": "1.5",
}
Check Status
GET https://api.ifenpay.com/payment/status/77df93b1-01e9-4582-86a4-c3a7edd8f1b4 Authorization: Bearer YOUR_API_KEY
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.
Generate Payment URL
Use this URL structure:
https://api.ifenpay.com/payment/create/{YOUR_NANO_ADDRESS}/{API_KEY}
Redirect Customer
<a href="https://api.ifenpay.com/payment/create/nano_1abc.../your_api_key"> Pay with Nano </a>
function redirectToPayment() { const paymentUrl = `https://api.ifenpay.com/payment/create/${nanoAddress}/${apiKey}`; window.location.href = paymentUrl; }
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.