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 (P2P)
  3. Plugins
  4. Payment Links (P2P)

Check Payment

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

Method


GET https://prod.ninjapay.me/uapi/v1/p2p/paymentLink/checkPayment

Parameters

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

Response

   {
      "tid": "A198660213997",
      "payment_mode": "upi",
      "payment_mode_type": "primary",
      "utr": "278917658915", // UTR added by the payer/customer upon 
      "amount": 120.10,
      "amount_currency": "INR",
      "payer_info": "+917337557707", // email or phone number of the payer/customer
      "purpose": "sample_description",
      "created_at": 1661215876,
      "status": "pending", // pending, approved, declined status's by admin or merchant
      "callback_url": "https://yourwebhook.com",
      "callback_status": 200, // 200, 400, ... only triggers after payment
      "success_url": "https://yoursuccessurl.com",
      "hosted_checkout_url": "https://bit.ly/3H24Msg",
      "order_id": "210",
      "extra": {
          "name": "nakamoto",
          "email": "sample@sample.com"
      },
      "upi_info": {
          "upi_id": "merchantupi@icici", // null if payment_mode is bank
      },
      "bank_info": {
          "account_number": 001001553534,
          "name": "Nanda Neeraj",
          "ifsc": "icic0000060",
          "bank_name": "icici",
          "address": "vizag, dwarakanagar branch, 530024",
          "swift": "merchantupi@icici"
      },
      "other_info": {
          "paytm": "mypaytmid"
      }
       "total_fee": {
          "network_fee": null,
          "service_fee": null,
          "gst_fee": null
      }
  }

Code Example


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

fetch('https://prod.ninjapay.me/uapi/v1/p2p/paymentLink/checkPayment', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
  

If the payment status is Pending, then Check Status API should be called in the following interval: The first status check at 20-25 seconds post transaction start, then Every 3 seconds once for the next 30 seconds, Every 6 seconds once for the next 60 seconds, Every 10 seconds for the next 60 seconds, Every 30 seconds for the next 60 seconds, and then Every 1 min until timeout (10 mins).

PreviousApprove/DeclineNextPaywalls

Last updated 1 year ago

đŸ’ģ
🧩
🔗