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

Add Client

This endpoint is used to add a client details for invoice plugin

Method

POST https://api.ninjapay.me/webextension/api/v1/fiat/invoice/client

Parameters

  • name : (string, required) - The name of the person.

  • phone_code : (string, required) - The country code for the phone number.

  • phone: (string, required) - The phone number of the person.

  • email: (string, required) - The email address of the person.

  • website: (string) - The website of the person or business.

  • street_address : (string) - The street address of the person.

  • state : (string) - The state where the person resides.

  • city : (string) - The city where the person resides.

  • country :(string) - The country where the person resides.

  • zip_code : (string) - The postal code of the area where the person resides.

  • details (array of objects) : An array containing additional details.

    • PAN : (string) - The PAN (Permanent Account Number) of the person.

    • GST : (string) - The GST (Goods and Services Tax) number of the person or business.

Request Body

Body (application/json)
{
  "name": "Aman",  // The name of the person
  "phone_code": "91",  // The country code for the phone number
  "phone": "9876543210",  // The phone number of the person
  "email": "aman@gmail.com",  // The email address of the person
  "website": "https://amanwebsite.com",  // The website of the person or business
  "street_address": "1234 Elm Street",  // The street address of the person
  "state": "Maharashtra",  // The state where the person resides
  "city": "Mumbai",  // The city where the person resides
  "country": "India",  // The country where the person resides
  "zip_code": "400001",  // The postal code of the area where the person resides
  "details": [
    {
      "PAN": "ABCDE1234F"  // The PAN (Permanent Account Number) of the person
    },
    {
      "GST": "27ABCDE1234F1Z5"  // The GST (Goods and Services Tax) number of the person or business
    }
  ]
}

Response

{
    "status": true,
    "data": {},
    "message": "Client details added successfully"
}

Code Example


const options = {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'API_KEY' //Invoice key required
  },
  body: {
  "name": "Aman",  // The name of the person
  "phone_code": "91",  // The country code for the phone number
  "phone": "9876543210",  // The phone number of the person
  "email": "aman@gmail.com",  // The email address of the person
  "website": "https://amanwebsite.com",  // The website of the person or business
  "street_address": "1234 Elm Street",  // The street address of the person
  "state": "Maharashtra",  // The state where the person resides
  "city": "Mumbai",  // The city where the person resides
  "country": "India",  // The country where the person resides
  "zip_code": "400001",  // The postal code of the area where the person resides
  "details": [
    {
      "PAN": "ABCDE1234F"  // The PAN (Permanent Account Number) of the person
    },
    {
      "GST": "27ABCDE1234F1Z5"  // The GST (Goods and Services Tax) number of the person or business
    }
  ]
}
};

fetch('https://api.ninjapay.me/webextension/api/v1/fiat/invoice/client', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
  
PreviousInvoiceNextEdit Client

Last updated 9 months ago

💻
🧩
📄