API Reference

Low-level Nano operations and payment request API

⚠️ About This API

This is a low-level API for advanced Nano operations. For most use cases, we recommend:

🔒 Strict Mode Security Note: Strict mode uses automatic AI wallet management with custodial model. Wallet is initialized and cleaned automatically per request for security. No wallet.create or wallet.unlock commands needed.

Authentication

All Protected API requests require authentication using an API key in the Authorization header.

Request Headers
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Base URL: https://api.ifenpay.com (or your production URL)

Wallet Operations

Create Wallet

POST
/wallet/create PUBLIC

Creates a new Nano wallet and returns private keys.

Response
{
  "address": "nano_1abc...xyz",
  "public_key": "ABC123...",
  "private_key": "XYZ789..."
  "Wallet Private Seed": "64_char_hex_seed"
  "api_key": "YOUR_API_KEY"
}

Get Balance

GET
/wallet/balance/:address PROTECTED

Get balance and pending blocks for a Nano address.

Response
{
  "account": "YOUR_NANO_ADDRESS",
  "balance": "1500000000000000000000000000",
  "balance_raw": "1500000000000000000000000000",
  "pending": "0",
  "pending_raw": "0"
}

Get Pending Blocks

POST
/wallet/pending PROTECTED

Get list of pending (unreceived) blocks for an address.

Request Body
{
  "address": "nano_1abc...xyz",
}
Response
{
  "blocks": {
    "nano_1111111111111111111111111111111111111111111111111117353trpda": ["142A538F36833D1CC78B94E11C766F75818F8B940771335C6C1B8AB880C5BB1D"],
    "nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3": ["4C1FEEF0BEA7F50BE35489A1233FE002B212DEA554B55B1B470D78BD8F210C74"]
  }
}

Payment Requests

Create Payment Request

POST
/payment/request PROTECTED

Create a payment request. Returns a unique Nano address for the customer to send payment to.

Request Body
{
  "receive_address": "nano_1111111111111111111111111111111111111111111111111117353trpda",
  "amount": "1.5",
  "redirect_url": "https://yourshop.com/thank-you",

}
Response
{
  "receive_address": "nano_1111111111111111111111111111111111111111111111111117353trpda",
  "amount": "1.50000000548941",
  "transaction_id": "77df93b1-01e9-4582-86a4-c3a7edd8f1b4",
}

Get Payment Status

GET
/payment/status/:request_id PROTECTED

Check the status of a payment request.

Response
{
  "success": "text-purple-600",
  "message": "Transaction has been paid. Execute receive to complete the process.",
  "amount": "1.5",
  "transaction_id": "77df93b1-01e9-4582-86a4-c3a7edd8f1b4",
  "is_paid": "true"
}

Block Operations

Get Block Info

POST
/block/info PROTECTED

Get detailed information about a block.

Request Body
{
  "hash": "BLOCK_HASH_HERE"
}

Publish Block

POST
/block/publish PROTECTED

Publish a signed block to the Nano network.

Request Body
{
  "block": {
    "block_account": "nano_1ipx847tk8o46pwxt5qjdbncjqcbwcc1rrmqnkztrfjy5k7z4imsrata9est",
    "amount": "30000000000000000000000000000000000",
    "balance": "5606157000000000000000000000000000000",
    "height": "58",
    "local_timestamp": "1000000...",
    "successor": "8D3AB98B301224253750D448B4BD997132400CEDD0A8432F775724F2D9821C72",
    "confirmed": "true",
    "contents": "{
        "type": "state",
        "account": "nano_1ipx847tk8o46pwxt5qjdbncjqcbwcc1rrmqnkztrfjy5k7z4imsrata9est...",
        "previous": "CE898C131AAEE25E05362F247760F8A3ACF34A9796A5AE0D9204E86B0637965E",
        "representative": "nano_1stofnrxuz3cai7ze75o174bpm7scwj9jn3nxsn8ntzg784jf1gzn1jjdkou...",
        "balance": "5606157000000000000000000000000000000",
        "link": "5D1AA8A45F8736519D707FCB375976A7F9AF795091021D7E9C7548D6F45DD8D5",
        "link_as_account": "nano_1qato4k7z3spc8gq1zyd8xeqfbzsoxwo36a45ozbrxcatut7up8ohyardu1z..."
        "signature": "82D41BC16F313E4B2243D14DFFA2FB04679C540C2095FEE7EAE0F2F26880AD56DD48D87A7CC5DD760C5B2D76EE2C205506AA557BF00B60D8DEE312EC7343A501",
        "work": "8a142e07a10996d5"
    }",
    "subtype": "send"
  }
}

Credits & Account

Get Credits Info

GET
/credits/info PROTECTED

Get your API credit balance. Each API key gets 1,000 free credits per month.

Response
{
  "credits": 850,
  "current_credits_price_10": "0.1",
  "current_credits_price_50": "0.5",
  "current_credits_price_100": "1",
  "current_credits_price_500": "5",
  "current_credits_price_1000": "10",
  "current_credits_price_5000": "50",
  "current_credits_price_10000": "100",
  "current_credits_price_50000": "500",
  "current_credits_price_100000": "1000"

}

Get Account Info

POST
/account/info PROTECTED

Get account information for a Nano address.

Request Body
{
  "address": "nano_1abc...xyz"
}

Network Info

Active Difficulty

GET
/network/active-difficulty PROTECTED

Get current network difficulty for proof-of-work generation.

Need Help?

Join our community for support and examples