SDKs & plugins
Ready-made code so you can go live in an afternoon. Every package talks to the same REST API with your keys from Dashboard → API keys.
Node.js SDK
const PayQube = require('./payqube-node');
const pq = new PayQube({ keyId: process.env.PQ_KEY_ID, secret: process.env.PQ_SECRET, baseUrl: 'https://your-payqube-domain' });
const payment = await pq.payments.create({
amount: 499, order_id: 'ORD-1042', description: 'Order #1042',
customer: { name: 'Asha Verma', email: 'asha@example.com', phone: '9876543210' },
return_url: 'https://yourstore.in/thanks',
});
res.redirect(payment.payment_url); // send the customer to checkout
// webhook route — use the RAW body
app.post('/payqube/webhook', express.raw({ type: 'application/json' }), (req, res) => {
if (!PayQube.verifyWebhook(req.body.toString(), req.get('X-PayQube-Signature'), process.env.PQ_WEBHOOK_SECRET)) return res.sendStatus(401);
const event = JSON.parse(req.body); // event.event = payment.success | payment.failed | refund.processed
res.sendStatus(200);
});PHP SDK
require 'PayQube.php';
$pq = new PayQube(getenv('PQ_KEY_ID'), getenv('PQ_SECRET'), 'https://your-payqube-domain');
$p = $pq->createPayment([
'amount' => 499, 'order_id' => 'ORD-1042', 'return_url' => 'https://yourstore.in/thanks',
'customer' => ['name' => 'Asha Verma', 'email' => 'asha@example.com', 'phone' => '9876543210'],
]);
header('Location: ' . $p['payment_url']);
// webhook.php
$raw = file_get_contents('php://input');
if (!PayQube::verifyWebhook($raw, $_SERVER['HTTP_X_PAYQUBE_SIGNATURE'] ?? '', getenv('PQ_WEBHOOK_SECRET'))) { http_response_code(401); exit; }WooCommerce
- Download payqube-woocommerce.zip → WordPress → Plugins → Add New → Upload Plugin → Activate.
- WooCommerce → Settings → Payments → PayQube → paste your PayQube URL, Key ID and Key secret.
- In Dashboard → Webhooks set the URL to
https://YOUR-STORE/?wc-api=payqube_webhookand copy the signing secret into the plugin. - Place a test order in Test mode, then switch to Live mode after KYC approval.
The plugin never trusts the browser redirect: it fetches the payment from the API and checks the amount before marking an order paid. Refunds work from the WooCommerce order screen.
Shopify
Today: manual payment method + PayQube link
- Shopify admin → Settings → Payments → Manual payment methods → Create custom payment method. Name it “UPI / Cards / Net banking (PayQube)”.
- Additional details: “You will receive a secure PayQube payment link on WhatsApp/email right after placing the order.”
- Create a Shopify Flow or a small webhook app on
orders/createthat callsPOST /api/v1/paymentswithorder_id = shopify order nameand sends the returnedpayment_urlto the customer (the Node SDK does this in ~20 lines). - On our
payment.successwebhook, call Shopify Admin APIPOST /orders/{id}/transactions.json(kind: capture) to mark the order paid.
Later: native Shopify payments app
- Apply to the Shopify Payments Partner programme with the operating company's details.
- After approval, build the payments extension (offsite payment session → redirect to PayQube checkout → resolve/reject session from our webhook). Our API already exposes everything it needs.
- Pass Shopify's review in their sandbox, then publish to merchants.
Payouts API Sandbox
Send money from your settled balance to a saved beneficiary. In this build transfers are simulated (queued → processing → processed with a test UTR, ~20 s). Amounts ending in .13 simulate a bank rejection. Live payouts switch on when the gateway's payouts product is approved.
GET /api/v1/balance → { available, settled, paid_out }
GET /api/v1/beneficiaries → { data: [{ id, name, ifsc, vpa, account_last4 }] }
POST /api/v1/payouts { beneficiary_id, amount, method: "IMPS"|"NEFT"|"UPI", narration }
GET /api/v1/payouts/:id → { id, status, utr, failure_reason, sandbox: true }Webhook retries
If your endpoint does not answer 2xx within 8 seconds we retry after 1 min, 5 min, 30 min, 2 h and 12 h (6 attempts in total). Each attempt carries X-PayQube-Attempt. Make your handler idempotent on data.id. You can resend any delivery from Dashboard → Webhooks.