Overview

QubixPay Gateway – Merchant Integration

Integrate QubixPay like Razorpay or Stripe. You only need a Key ID and Secret on your server — never in the browser.

API auth
Protected access
Realtime updates
Live status updates
Late payments
Refund required
Features

Everything you need to accept UPI

QubixPay combines a merchant dashboard, secure APIs, and checkout in one payment gateway.

Auto payment detection

Payments are detected automatically and orders update without manual checking.

Merchant dashboard

Create pay links, view history, export CSV, see UTR/payment reference.

Secure API keys

Create and track orders from your server with protected API access.

5-minute payment window

Each payment has a clear time window. Late payments are flagged for easy refund handling.

Refund tracking

If customer pays late, you still get UTR shown so you can refund correctly.

Popup checkout widget

Embed QR checkout as a popup/iframe inside your website or app.

How it works

Simple flow, strong security

1

Create order

Create a payment link from the dashboard or from your website checkout.

2

Customer pays

Customer pays via UPI using the QR or payment page you share.

3

Payment confirmed

Order status updates automatically in your dashboard and on your website.

Pricing

Start free, scale later

Daily/monthly limits apply per plan. Upgrade from the dashboard when you need more volume.

Starter

For small merchants & testing

₹0
per month
  • Dashboard + pay links
  • Secure API keys
  • Payment alerts & live status
Create account

Pro

For production merchants

Custom
Talk to us
  • Higher limits + support
  • Custom domain checkout
  • Advanced reporting
Contact sales

1) API keys (from dashboard)

Log in to the dashboard and use Generate API Key to get your Key ID and Secret. Never expose the secret in client-side code or public pages.

Recommended ENV
QUBIXPAY_BACKEND_URL → your QubixPay backend URL
QUBIXPAY_KEY_ID → your Key ID
QUBIXPAY_SECRET → your Secret

2) Create order (server-to-server)

Call POST /v1/orders from your server. The response includes paymentUrl — redirect or open it for the customer.

Node (server)
// npm i qubixpay
import { createOrder } from 'qubixpay';

app.post('/checkout', async (req, res) => {
  const order = await createOrder({
    baseUrl: process.env.QUBIXPAY_BACKEND_URL, // optional
    keyId: process.env.QUBIXPAY_KEY_ID,
    secret: process.env.QUBIXPAY_SECRET,
    amount: 499,
    description: 'Order #123',
    meta: { storeOrderId: '123' }
  });

  // Redirect the customer to the hosted checkout
  res.redirect(order.paymentUrl);
});

3) Open checkout (web)

Ek script load karo, phir 1 line me checkout popup kholo. Koi extra config nahi.

Browser / website

Checkout page ko seedha open karna ho to https://www.qubixpay.in/pay#orderId=ORD_123 use karo.

4) Webhooks

When a payment completes or fails, QubixPay sends a notification to your server URL so you can update your order.

Express webhook handler
app.post('/qubixpay/webhook', express.raw({ type: 'application/json' }), (req, res) => {
  const raw = req.body.toString('utf8'); // raw body, JSON.parse se PEHLE
  const evt = JSON.parse(raw);

  // evt.event = 'payment.success' | 'payment.failed' | 'payment.updated'
  if (evt.event === 'payment.success') {
    // mark your order paid (evt.eventId se double-handling rokein)
  } else if (evt.event === 'payment.failed') {
    // mark failed
  }

  res.status(200).send('OK');
});
Delivery fail ho jaye to QubixPay automatic retry karta hai (max 5 attempts, backoff ke saath) — event kabhi silently drop nahi hota. Dashboard → Settings → Webhook log me poori history dikhti hai aur failed event ko Replay button se dobara bhej sakte ho.

5) Secure webhooks

Always verify incoming payment notifications on your server. Use the webhook secret from your dashboard settings — do not share it publicly.

Signature verification
import crypto from 'crypto';

// HMAC_SHA256(webhook_secret, ".")
function verify(raw, signature, secret, ts) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(`${ts}.${raw}`, 'utf8')
    .digest('hex');

  const a = Buffer.from(expected, 'hex');
  const b = Buffer.from(signature, 'hex');
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}

app.post('/qubixpay/webhook', express.raw({ type: 'application/json' }), (req, res) => {
  const raw = req.body.toString('utf8');
  const ok = verify(
    raw,
    req.get('x-zapupi-signature'),
    process.env.QUBIXPAY_WEBHOOK_SECRET,
    req.get('x-zapupi-ts')
  );
  if (!ok) return res.status(401).send('invalid signature');

  res.status(200).send('OK');
});
Node SDK me verifyWebhook() helper ready hai import { verifyWebhook } from 'qubixpay'.