Integration Features Webhook Pricing Support Log in Create An Account & Get Rewards
One Time Own Payment Bank Link
Payout Releases after 48hrs
Settlement Process Time

Integrate Nijiy Pay Gateway in 0 Minutes

✓ One our approval Guarantee
✓ Our Specialized Developer Engineering Support
✓ Support for Integration 24x7
✓ WhatsApp: +91 9650346923
Scroll to explore

Integrate Nijiy Pay Gateway in 5 Minutes

A universal, framework-independent browser integration. Click each step below to view & copy the code instantly.

01

Add the official script to your page

Place this single script tag in your HTML. It provides modal checkout, responsive iframe sizing, and automatic button detection.

HTML
<!-- Official Nijiy Pay Gateway universal integration script -->
<script
    src="https://pay.nijiy.com/youpi.js"
    data-youpi-key="YOUR_PUBLIC_KEY">
</script>
02

Map your payment button (zero JavaScript)

Add data-youpi-pay, data-order-id, and data-amount to any button. The script automatically opens the centered modal checkout on click.

HTML
<button
    data-youpi-pay
    data-order-id="ORDER-1001"
    data-amount="499">
    Buy Now
</button>

Optional attributes: data-currency="INR", data-customer-name, data-customer-email, data-customer-phone, data-metadata='{"sku":"TSHIRT-01"}'

03

Listen to browser payment events (frontend UX)

The script emits standardized DOM CustomEvents on window so you can drive your interface.

JavaScript
<script>
  window.addEventListener('youpi:payment:success', (e) => {
    const { order_id, amount_received, utr, payment_mode } = e.detail;
    console.log(`Payment confirmed for Order #${order_id}. UTR: ${utr}`);
    window.location.href = `/order-success?order_id=${order_id}&amount=${amount_received}&utr=${utr}`;
  });

  window.addEventListener('youpi:payment:failed', (e) => {
    window.location.href = `/order-failed?order_id=${e.detail.order_id}&reason=${e.detail.reason}`;
  });

  window.addEventListener('youpi:payment:suspicious', (e) => {
    window.location.href = `/order-suspicious?order_id=${e.detail.order_id}`;
  });
</script>
04

Or invoke programmatically: NijiyPay.pay({...}) / Youpi.pay({...})

For dynamic carts (React, Vue, Next.js, Nuxt), call the programmatic API directly.

JavaScript
NijiyPay.pay({
  order_id: "ORDER-1001",
  amount: 499,
  currency: "INR",
  customer: {
    name: "Mohit",
    email: "[email protected]",
    phone: "9876543210"
  },
  metadata: { product_id: "TSHIRT-01" },
  handler: function(response) {
    // { status: "SUCCESS", order_id, amount_received, utr, payment_mode }
    console.log(`Payment successful! UTR: ${response.utr}`);
  },
  onFailed: function(response) {
    console.log(`Payment failed: ${response.reason}`);
  },
  onClose: function() {
    console.log("modal closed")
  }
});
05

Configure the authoritative backend webhook

Critical security invariant: never mark an order paid based only on client-side browser events. Fulfil orders only after verifying the server-to-server HMAC-SHA256 signed webhook.

Node.js / Express
import crypto from 'node:crypto';

app.post('/api/youpi-webhook', express.raw({ type: 'application/json' }), (req, res) => {
  const signature = req.headers['x-gateway-signature']; // 'sha256=...'
  const webhookSecret = process.env.YOUPI_WEBHOOK_SECRET;

  // Verify HMAC-SHA256 over the RAW request bytes
  const expectedHmac = crypto.createHmac('sha256', webhookSecret).update(req.body).digest('hex');
  if (signature !== `sha256=${expectedHmac}`) {
    return res.status(401).send('Signature mismatch');
  }

  const event = JSON.parse(req.body.toString());
  if (event.event === 'SUCCESS') {
    // Authoritative proof: mark the order as PAID in your database.
    db.orders.markPaid(event.orderId, { utr: event.utr, amount: event.amount });
  }

  res.status(200).json({ received: true });
});

Built for Speed. Secured by Design.

Nijiy Pay delivers a powerful, modern payment experience with rock-solid reliability.

One Time Own Payment Bank Link

Link your own payment bank account directly. Complete control over your receiving setup with seamless configuration.

Settlement Process Time

Transparent settlement process with predictable timelines. Payout Releases after 48hrs directly to your linked bank account.

Universal Framework Support

Works flawlessly with PHP, Node.js, Python, Laravel, Django, Next.js, WordPress, or plain HTML. One script, infinite possibilities.

One our approval Guarantee

Every merchant goes through our thorough verification process with our approval guarantee for trusted partnerships.

Specialized Developer Engineering Support

Our Specialized Developer Engineering Support team is here to assist you. Support for Integration 24x7.

Create An Account & Get Rewards

Sign up today and start earning rewards. Join the growing network of merchants powered by Nijiy Pay.

Authoritative Server-to-Server Webhook

Never mark an order paid based only on client-side browser events. Fulfil orders only after verifying the server-to-server HMAC-SHA256 signed webhook.

Browser Event
→
HMAC-SHA256 Verification
→
Mark Order PAID
Node.js / Express — Webhook Receiver
import crypto from 'node:crypto';

app.post('/api/youpi-webhook', express.raw({ type: 'application/json' }), (req, res) => {
  const signature = req.headers['x-gateway-signature']; // 'sha256=...'
  const webhookSecret = process.env.YOUPI_WEBHOOK_SECRET;

  // Verify HMAC-SHA256 over the RAW request bytes
  const expectedHmac = crypto.createHmac('sha256', webhookSecret).update(req.body).digest('hex');
  if (signature !== `sha256=${expectedHmac}`) {
    return res.status(401).send('Signature mismatch');
  }

  const event = JSON.parse(req.body.toString());
  if (event.event === 'SUCCESS') {
    // Authoritative proof: mark the order as PAID in your database.
    db.orders.markPaid(event.orderId, { utr: event.utr, amount: event.amount });
  }

  res.status(200).json({ received: true });
});

Simple, Transparent Pricing

Get started with Nijiy Pay today

Need Help with Integration?

Our Specialized Developer Engineering Support team is available 24x7 to help you integrate Nijiy Pay Gateway seamlessly.

One our approval Guarantee • Our Specialized Developer Engineering Support • Support for Integration 24x7
Copied to clipboard!