Nano Payment Integration Guide

A comprehensive guide to implementing Nano payments in your applications

Introduction

This guide demonstrates different methods to accept Nano payments on your website. Each solution offers unique features and benefits to suit different use cases, from simple donations to full e-commerce integration.

BitRequest

A simple, non-custodial solution for generating cryptocurrency payment request links.

  • Fully decentralized
  • Multi-cryptocurrency support
  • Simple URL-based requests
  • No fees
  • Optional contact forms
  • Best for: Payment requests and invoicing

Live Demo

Implementation

Simple Link



<a href="https://bitrequest.github.io/?p=home&payment=nano&uoa=usd&amount=1&address=YOUR_NANO_ADDRESS">
    Pay 1 USD in Nano
</a>
                    

Intermediate Implementation


<script>
// Configuration for the payment request
function createBitRequest() {
    const payment = "nano";
    const uoa = "usd";
    const amount = 0.05;
    const address = "YOUR_NANO_ADDRESS";
    const d = btoa(JSON.stringify({
        "t": "Payment Request",
        "n": "Store Payment",
        "c": 0
    }));
    return "https://bitrequest.github.io/?payment=" + payment + "&uoa=" + uoa + "&amount=" + amount + "&address=" + address + "&d=" + d;
}

// Example usage
const paymentUrl = createBitRequest();
window.location.href = paymentUrl;
</script>
                    

Advanced Implementation

For the complete advanced implementation with features like Lightning Network support, webhooks, and shopping cart integration, check out the official BitRequest Webshop Integration Guide.

Nano.to

A modern, non-custodial payment solution that prioritizes user experience. Features a sleek Apple Pay-inspired interface, instant confirmations, and email notifications. Perfect for websites looking to accept Nano payments with minimal setup.

  • Non-custodial solution
  • Simple Apple Pay-like interface
  • Easy frontend integration
  • No fees
  • Email notifications
  • Contact & shipping forms
  • Customizable UI & wallets
  • Multi-currency pricing
  • Shopping cart support
  • Best for: Quick payments and donations

Live Demo

Implementation


<script src="https://pay.nano.to/latest.js"></script>

<button onclick="payWithNanoTo()">Pay Now</button>

<script>
function payWithNanoTo() {
    NanoPay.open({ 
        title: "Demo Payment",
        address: '@your-username', 
        amount: 0.1,
        notify: 'your@email.com',
        contact: true,
        shipping: {
            onShippingUpdate: function(details) {
                console.log('Shipping details:', details);
                return true;
            }
        },
        currency: 'USD',
        wallet: 'natrium',
        success: (block) => {
            console.log('Payment successful!', {
                hash: block.hash,
                amount: block.amount,
                email: block.email,
                shipping: block.shipping
            });
        }
    });
}
</script>
                

WowPay

A managed payment solution supporting multiple cryptocurrencies including Nano, Banano, and more.

  • Multiple nano-fork support
  • Comprehensive API
  • Custodial solution
  • Balance & withdrawal management
  • Secure signature-based auth
  • Best for: Multi-currency payment systems

Note: WowPay requires API authentication. Get your keys at pay.pilou.cc/apis.
This website is for demonstration purposes only - never expose production API keys in frontend code.

Live Demo

Generate a unique address to receive payments
Send funds from your WowPay balance to any address

Implementation Examples

Create Deposit Address


// Create a deposit address
async function createDeposit(apiKey, privateKey, currency) {
    const timestamp = Date.now();
    const body = JSON.stringify({
        currency: currency,
        time: timestamp
    });
    
    // Create signature
    const signature = CryptoJS.HmacSHA256(body, privateKey).toString(CryptoJS.enc.Base64);
    
    const response = await fetch('https://nanpay.pilou.cc/wallet/deposit', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'auth': apiKey,
            'sign': signature
        },
        body: body
    });
    
    const data = await response.json();
    return data.address; // Returns managed deposit address
}

Create Withdrawal


// Create a withdrawal
async function createWithdrawal(apiKey, privateKey, currency, amount, destination) {
    const timestamp = Date.now();
    const body = JSON.stringify({
        currency: currency,
        time: timestamp,
        amount: amount,
        destination: destination
    });
    
    // Create signature
    const signature = CryptoJS.HmacSHA256(body, privateKey).toString(CryptoJS.enc.Base64);
    
    const response = await fetch('https://nanpay.pilou.cc/wallet/withdraw', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'auth': apiKey,
            'sign': signature
        },
        body: body
    });
    
    return await response.json();
}

NanoPay.me

A feature-rich payment gateway with API support for creating and managing invoices.
"The Stripe of Nano Payments. Pay and get paid with Nano."

  • Full-featured REST API
  • Webhook support
  • Payment tracking & management
  • Potential processing fees in the future
  • Technical support available
  • Best for: E-commerce and business integration

Note: Due to browser security restrictions (CORS), this demo may not work directly in the browser. For production use, implement the API calls through your backend server. See the API documentation for details.

Dead Demo

Implementation Examples

Simple Implementation


// Create payment URL and redirect
function createNanoPayment(address, amount, title, redirectUrl) {
    const params = new URLSearchParams({
        address: address,
        amount: amount
    });
    
    if (title) params.append('title', title);
    if (redirectUrl) params.append('redirect_url', redirectUrl);
    
    const paymentUrl = `https://nanopay.me/payment?${params}`;
    window.location.href = paymentUrl;
}

API Implementation (Backend Required)


// Server-side implementation example
async function createInvoice(apiKey, paymentData) {
    const response = await fetch('https://api.nanopay.me/invoices', {
        method: 'POST',
        headers: {
            'Authorization': `Bearer ${apiKey}`,
            'Content-Type': 'application/json'
        },
        body: JSON.stringify({
            title: paymentData.title,
            price: paymentData.amount,
            recipient_address: paymentData.address,
            redirect_url: paymentData.redirect_url
        })
    });
 
    return await response.json();
 }

SplitRoute

A powerful payment processing API for Nano cryptocurrency that enables instant revenue sharing and payment distribution.

  • Full-featured REST API
  • Split payments among multiple recipients
  • WebSocket and webhook support
  • Real-time payment tracking
  • Low service fees (0.5% for free tier)
  • Best for: Revenue sharing and payment distribution

Note: SplitRoute offers a free tier without API authentication with limited rate limits. For higher limits and additional features, get your API keys at api.splitroute.com. For demonstration purposes only - never expose production API keys in frontend code.

Live Demo

Implementation

Simple Implementation


// Create a basic invoice with a single recipient
async function createSplitRouteInvoice(apiKey, amount, address) {
  const response = await fetch('https://api.splitroute.com/api/v1/invoices', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'X-API-Key': apiKey
    },
    body: JSON.stringify({
      nominal_amount: amount,
      nominal_currency: 'USD',
      destinations: [
        {
          account: address,
          primary: true
        }
      ],
      show_qr: true
    })
  });
  
  return await response.json();
}

Split Payment Implementation


// Create an invoice with payment splitting
async function createSplitPaymentInvoice(apiKey, amount, primaryAddress, partnerAddress, partnerPercentage) {
  const response = await fetch('https://api.splitroute.com/api/v1/invoices', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'X-API-Key': apiKey
    },
    body: JSON.stringify({
      nominal_amount: amount,
      nominal_currency: 'USD',
      destinations: [
        {
          account: primaryAddress,
          primary: true,
          description: "Main recipient"
        },
        {
          account: partnerAddress,
          percentage: partnerPercentage,
          description: `Partner fee (${partnerPercentage}%)`
        }
      ],
      show_qr: true
    })
  });
  
  return await response.json();
}

// Monitor payment status with WebSocket
function monitorPayment(invoiceId) {
  const socket = new WebSocket(`wss://api.splitroute.com/api/v1/ws/invoices/${invoiceId}`);
  
  socket.onopen = function(e) {
    console.log('Connected to WebSocket');
  };
  
  socket.onmessage = function(event) {
    const message = JSON.parse(event.data);
    
    // Handle different event types
    if (message.payload.event_type === 'invoice.paid') {
      console.log('Invoice has been paid!');
      console.log(`Amount received: ${message.payload.formatted_amount}`);
      // Update your UI or take other actions
    }
    
    // Check for invoice completion
    if (message.category === 'completed') {
      console.log('Invoice processing completed');
      socket.close();
    }
  };
  
  return socket;
}

Advanced Implementation

For the complete advanced implementation with features like multiple recipients, webhooks, and more, check out the official SplitRoute API Documentation.