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. Fiat x Web3 Bridge
  2. Get Started

Check Payment

Check the status of a particular payment using the transaction ID.

Method


GET https://prod.ninjapay.me/sapi/v1/checkQuote

Parameters

tid: int // the transaction ID of the payment request.

Response


{
  "tid": int, // The transaction ID.
  "created_at": int, // The time when the quote was requested
  "status": string, // The status of the transaction (e.g., 'pending', 'success', 'failed', 'expired', 'refunded').
  "sending_asset": string; // "btc" or "usdt" for btc/usdt to inr conversion.
  "sending_asset_amount": int; // The amount to pay for fiat conversion.
  "fiat_amount": number, // The fiat amount that the upi id will receive.
  "payment_method": string, // The method of payment (e.g., 'upi', 'ninjatag').
  "lightning_invoice": string, // The Lightning invoice.
  "onchain_address": string, // The on-chain address.
  "onchain_address_network": string, // BTC, ERC20, BEP20...
  "expires_at": int, // The expiry time for the payment quote.
  "receiver_upi_id": string, // The UPI ID to which the fiat amount was sent.
  "receiver_ninjatag": string, // The Ninjatag of the recipient.
  "refund_wallet": string, // The type of merchant's wallet used for refund if upi transfer fails (e.g., lbtc, btc, usdt).
  "transaction_time": string // The timestamp of when the transaction was processed.
}

Response


{
  "tid": int, // The transaction ID.
  "created_at": int, // The time when the quote was requested
  "status": string, // The status of the transaction (e.g., 'Pending', 'Completed', 'Failed').
  "fiat_amount": number, // The fiat amount that was sent.
  "receiver_upi_id": string, // The UPI ID to which the fiat amount was sent.
  "ninjatag": string, // The NinjaTag of the recipient.
  "refund_wallet": string, // The type of wallet used (e.g., lbtc, btc, usdt).
  "payment_method": string, // The method of payment (e.g., 'lightning', 'onchain').
  "transaction_time": string // The timestamp of when the transaction was processed.
}

Code Example


const options = {
  method: 'GET',
  headers: {
    'Content-Type': 'application/json',
    Authorization: 'API_KEY'
  },
  body: '{"tid": 21066027789}'
};

fetch('https://prod.ninjapay.me/sapi/v1/checkQuote', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
  
PreviousRequest Invoice for QuoteNextUpgrades

Last updated 1 year ago

👩‍đŸ’ģ