Ninjapay API Docs
  • Namaste
    • â„šī¸Welcome to Ninjapay!
    • 🏆Benefits of NinjapayAPI
    • đŸ› ī¸Fees & Limit
  • How to
    • ❓How Plugins Work
    • 👨‍đŸ’ģGetting Started
    • 🔐Authentication
    • đŸ’ģAPI Reference (UPI)
      • 🧩Plugins
        • 🔗Realtime Payment Links
          • Create Realtime Payment Link
          • Create Template
          • List Payment Links
          • Multi super order Id list
          • Get templates
          • Single order Id trx list
          • Generate Upi payment link
          • Record payment
          • Expiry List
          • Delete Payment Link
          • Delete Template
          • Check Payment
        • đŸ›Ąī¸Paywalls
          • Create Paywall
          • Create Paywall QR
          • List Paywalls
          • Detail Paywall
          • Check Paywall
          • Remove Paywall
        • 📄Invoice
          • Add Client
          • Edit Client
          • Get Client
          • Remove Client
          • Add Product
          • Edit Product
          • Get Products
          • Remove Product
          • Upload Attachment
          • Add/Edit Template
          • Create Invoice
          • Get Invoice by ID
          • Add Tracking Details
          • Remove Invoice
        • đŸ–Ĩī¸Point of Sale - POS
          • Create POS
          • Create Paywall QR
          • List Paywalls
          • Detail Paywall
          • Check Paywall
          • Remove POS
        • 👨‍đŸ’ģBuild Your Own Plugin
          • Ninjapay Plugin Development Guide
      • Error Handling
      • Limits on API Requests
    • đŸ’ģAPI Reference (P2P)
      • 🧩Plugins
        • 🔗Payment Links (P2P)
          • Dashboard Stats
          • Create Payment Link
          • Submit UTR for Approval
          • List Payment Links
          • Transactions
          • Approve/Decline
          • Check Payment
        • đŸ›Ąī¸Paywalls
          • Create Paywall
          • Create Paywall QR
          • List Paywalls
          • Detail Paywall
          • Check Paywall
          • Remove Paywall
        • 👨‍đŸ’ģBuild Your Own Plugin
          • Ninjapay Plugin Development Guide
      • Error Handling
      • Limits on API Requests
    • đŸ’ģAPI Reference (BTCâšĄī¸)
      • Wallet Info
      • Send Payment
      • Request Payment
      • NinjaAuth
      • Ninjapay URI Intent
      • Check Payment
      • Transactions
      • Get Prices
      • Decode Invoice
      • Error Handling
      • Limits on API Requests
      • 🎁Withdraw Vouchers
        • Request Voucher
        • Check Voucher
        • Revoke Voucher Request
        • Redeem Voucher
      • 📈Spot Trade
        • Asset Balances
        • Asset Prices
        • Buy/Sell
        • Check Order
        • Revoke Order Request
  • other
    • 🤝Partnerships
    • 📓Helpful references
  • Use Cases
    • Game Developers
      • Implementing BTC Points
  • Coming Soon
    • đŸ’ģAPI Reference (Pro)
      • Wallet Info
      • Send Payment
      • Request Payment
      • NinjaAuth
      • Ninjapay URI Intent
      • Check Payment
      • Transactions
      • Get Prices
      • Decode Invoice
      • Error Handling
      • Limits on API Requests
    • 🧩Widget Integration
      • Widget (Onramp)
      • Widget (Offramp)
      • Request Token
      • Check Token
  • Fiat x Web3 Bridge
    • â„šī¸Intro to NinjaUPI
    • 👩‍đŸ’ģGet Started
      • Request Quote ID (BTC<>INR)
      • Request Quote ID (USDT<>INR)
      • Request Invoice for Quote
      • Check Payment
    • đŸĻ¸Upgrades
  • Protocols
    • Commerce Onchain Protocol
Powered by GitBook
On this page
  1. How to
  2. API Reference (UPI)
  3. Plugins
  4. Invoice

Get Invoice by ID

This endpoint is used to get invoice details by ID for invoice plugin

Method

GET https://api.ninjapay.me/webextension/api/v1/fiat/invoice/{id}

Request Parameter

  • id (number): - Invoice ID

Response

{
    "status": true,
    "data": {
        "invoice_uuid": "89691435",
        "business_logo": "https://awesomecompany.com",
        "business_name": "Awesome Company",
        "phone": "234567890",
        "email": "sample@gmail.com",
        "billing_address": "123 Main Street",
        "state": "Telangana",
        "country": "USA",
        "city": "Hyderabad",
        "zipcode": "12345",
        "default_currency": "USD",
        "enable_qr": true,
        "redirect_url": "",
        "include_invoice_id": true,
        "webhook_url": "",
        "terms_condition_url": "https://google.com",
        "terms_message": "",
        "custom_thanks_message": "Thank you for your payment!",
        "custom_button_text": "",
        "green_donation_link": "",
        "donation_percentage": "0.00",
        "donation_message": "",
        "invoice_date": "2024-08-08T00:00:00.000Z",
        "created_at": "2024-08-08T10:33:59.000Z",
        "updated_at": "2024-08-08T10:33:59.000Z",
        "is_active": true,
        "theme_color": "",
        "documents": {
            "doc_1": {
                "title": "PAN",
                "value": "HG297323"
            },
            "doc_2": {
                "title": "GST",
                "value": "76YHGF67656"
            }
        },
        "tax_details": {
            "tax_title": "GST",
            "tax_percentage": 18,
            "tax_country": "India",
            "is_all_states": true,
            "tax_states": []
        },
        "phone_code": "+1",
        "invoice_template_uuid": "89691435",
        "client_details": {
            "name": "Aman A",
            "phone_code": "91",
            "phone": "9876543211",
            "email": "aman2@gmail.com",
            "website": "https://amanwebsite.com",
            "street_address": "1234 Elm Street",
            "state": "Maharashtra",
            "city": "Mumbai",
            "country": "India",
            "zip_code": "400001",
            "details": [
                {
                    "PAN": "ABCDE1234F"
                },
                {
                    "GST": "27ABCDE1234F1Z5"
                }
            ]
        },
        "total": "599.50",
        "net_total": "599.50",
        "allow_partial": false,
        "allow_tip": false,
        "due_date": "2024-08-10T00:00:00.000Z",
        "note_to_customer": "Kindly pay before due date!",
        "tracking_number": "",
        "tracking_url": "",
        "extras": {
            "key1": "value1",
            "key2": "value2"
        },
        "received_amount": "0.00",
        "due_amount": "599.50",
        "tip_amount": "0.00",
        "created": "2024-08-08T10:33:59.000Z",
        "updated": "2024-08-08T10:33:59.000Z",
        "product_details": [
            {
                "name": "Orange Gift Box",
                "price": "599.50",
                "description": "",
                "logo": "",
                "product_created_at": "2024-08-07T11:53:03.000Z",
                "currency": "INR",
                "quantity": 1,
                "amount": 599.5,
                "final": 599.5
            }
        ],
        "invoice_id": "151",
        "status": "PENDING",
        "share_link": "https://www.ninjapay.me/invoice/89691435",
        "funding_source": "",
        "total_details": [
            {
                "title": "Discount",
                "amount": 0,
                "percentage": 0
            },
            {
                "title": "Shipping",
                "amount": 0,
                "percentage": 0
            },
            {
                "title": "Total GST",
                "amount": 0,
                "percentage": 0
            },
            {
                "title": "TDS",
                "amount": 0,
                "percentage": 0
            }
        ],
        "linkid": "RTLmfsS5HTWxWFelfyNhLkr",
        "super_orderid": "FT_RTPL_SOaMz7Sep31V6CAa8jaWlU"
    },
    "message": "Invoice retrieved successfully"
}

Code Example


const options = {
  method: 'GET',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'API_KEY' //Invoice key required
  }
};

fetch('https://api.ninjapay.me/webextension/api/v1/fiat/invoice/{id}', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
  
PreviousCreate InvoiceNextAdd Tracking Details

Last updated 9 months ago

đŸ’ģ
🧩
📄