Getting Started
The Rupixpe API lets you collect UPI payments (Payin) and send bank transfers (Payout). All requests are JSON over HTTPS.
Base URL
https://merchant.rupixpe.com/api/v1Quick setup
- Log in to the Merchant Dashboard at merchant.rupixpe.com and complete KYC (required for Payin and Payout APIs).
- Copy your API Key, API Secret and Webhook Secret from Settings → API Credentials.
- Add your payin and payout webhook URLs in Settings → Webhook Configuration.
- If your account has an IP whitelist, call the API only from those server IPs.
Response format
Every response uses the same envelope. Successful calls return success: true with the result in data:
{
"success": true,
"message": "Transaction status retrieved",
"data": { ... },
"meta": { "timestamp": "2026-10-21T09:06:14.733Z" }
}Errors return success: false with a machine-readable error.code (see Error Codes):
{
"success": false,
"error": {
"code": "TRANSACTION_NOT_FOUND",
"message": "Transaction not found",
"details": {},
"timestamp": "2026-10-21T09:06:14.761Z"
}
}- All timestamps are UTC in ISO-8601 format.
- Amounts are in INR. Create responses return amounts as numbers (
601); status and list responses return them as strings with two decimals ("601.00"). Parse them as decimals. - Unknown request fields are ignored, so check field names carefully.
Authentication
Send your API credentials as headers on every request.
| Header | Value |
|---|---|
X-API-Key | Your API key |
X-API-Secret | Your API secret |
Content-Type | application/json (POST requests) |
Node.js client used in the examples
const axios = require('axios');
const api = axios.create({
baseURL: 'https://merchant.rupixpe.com/api/v1',
headers: {
'X-API-Key': process.env.RUPIXPE_API_KEY,
'X-API-Secret': process.env.RUPIXPE_API_SECRET,
'Content-Type': 'application/json'
},
timeout: 30000
});| HTTP | Code | When |
|---|---|---|
| 401 | MISSING_CREDENTIALS | X-API-Key or X-API-Secret header missing |
| 401 | INVALID_CREDENTIALS | Key or secret is wrong, or the account is not active |
| 403 | KYC_NOT_APPROVED | Payin/Payout called before KYC approval |
| 403 | IP_NOT_ALLOWED | Request IP is not in your account's IP whitelist |
Payin API
Collect UPI payments from your customers. There are two ways to create a payin:
| Method | Endpoint | You get | Use when |
|---|---|---|---|
| Hosted | POST /payin/hosted | hosted_url: a Rupixpe payment page | You want a ready-made page with QR code and UPI app buttons. Redirect or link the customer to it. |
| Direct | POST /payin/create | payment_url (UPI intent or gateway link) and qr_code_url | You render your own payment screen (show the QR / open the UPI app). |
Both create the same kind of transaction: check it with GET /payin/status/:transaction_id, list it with GET /payin/list, and receive the same payin.* webhooks.
Request fields (Hosted and Direct)
| Field | Type | Required | Description |
|---|---|---|---|
order_id | string | Yes | Your unique order ID (1–100 chars). Reusing an order ID is only allowed if the earlier payin failed or expired. |
amount | number | Yes | Amount in INR, up to 2 decimals. Must be within your account's minimum/maximum payin limits. |
customer_name | string | Yes | Customer name (2–255 chars) |
customer_email | string | Yes | Valid email address |
customer_phone | string | Yes | Phone number, e.g. 9876543210 (9–16 digits, optional leading +) |
customer_vpa | string | No | Customer UPI ID, e.g. name@ybl |
callback_url | string (URL) | No | Hosted: the customer is redirected here 3 seconds after a successful payment. Direct: passed to the payment gateway as its return URL (support varies by gateway). |
currency | string | No | Only INR (default) |
metadata | object | No | Any JSON object, stored with the transaction |
Create Hosted Payin
/payin/hostedCreates a payin and returns a link to the Rupixpe hosted payment page.
const { data } = await api.post('/payin/hosted', {
order_id: 'ORDER_' + Date.now(),
amount: 500,
customer_name: 'John Doe',
customer_email: 'john@example.com',
customer_phone: '9876543210',
callback_url: 'https://yoursite.com/payment/complete'
});
// Send the customer to the payment page
res.redirect(data.data.hosted_url);Response: 201 Created
{
"success": true,
"message": "Hosted payment link created successfully",
"data": {
"transaction_id": "TXN5ZCBU68GOZ1Y",
"order_id": "ORDER_1729501503000",
"amount": 500,
"fee": 37.5,
"net_amount": 462.5,
"currency": "INR",
"status": "pending",
"hosted_url": "https://rupixpe.com/pay/aB3dE5fG7hJ9kL2m",
"expires_at": "2026-10-21T09:50:03.000Z",
"created_at": "2026-10-21T09:05:03.412Z"
},
"meta": { "timestamp": "2026-10-21T09:05:03.415Z" }
}- The link is valid for 45 minutes (
expires_at). After that the transaction becomesexpired. - The page shows the amount, a QR code and UPI app buttons, and updates automatically when the payment succeeds.
- Some accounts have a custom payment domain, so
hosted_urlmay use your own domain. - If location rules are enabled on your account, customers outside the allowed regions cannot pay.
Create Direct Payin
/payin/createCreates a payin and returns the UPI payment link from the gateway.
const { data } = await api.post('/payin/create', {
order_id: 'ORDER_' + Date.now(),
amount: 601,
customer_name: 'John Doe',
customer_email: 'john@example.com',
customer_phone: '9876543210'
});
console.log(data.data.transaction_id);
console.log(data.data.payment_url); // open on mobile / render as QRResponse: 201 Created
{
"success": true,
"message": "Payin created successfully",
"data": {
"transaction_id": "TXN5ZCBU68GOZ1Y",
"order_id": "ORDER_1729501503000",
"amount": 601,
"fee": 45.08,
"net_amount": 555.92,
"currency": "INR",
"status": "pending",
"payment_url": "upi://pay?pa=merchant@bank&pn=Merchant&am=601&cu=INR&tr=YESB742565847",
"qr_code_url": "upi://pay?pa=merchant@bank&pn=Merchant&am=601&cu=INR&tr=YESB742565847",
"expires_at": "2026-10-21T09:50:03.000Z",
"created_at": "2026-10-21T09:05:03.412Z"
},
"meta": { "timestamp": "2026-10-21T09:05:03.415Z" }
}payment_urlis either aupi://intent (open it on mobile or render it as a QR code) or an https payment page, depending on the gateway.qr_code_urlcan be aupi://string, an image URL, ornull.- The transaction expires after 45 minutes if not paid.
Create errors
| HTTP | Code | Meaning |
|---|---|---|
| 400 | VALIDATION_ERROR | A field is missing or invalid. error.details lists each field. |
| 400 | AMOUNT_TOO_LOW / AMOUNT_TOO_HIGH | Amount is outside your account or gateway limits |
| 409 | DUPLICATE_TRANSACTION | order_id already used by a pending or successful payin. error.details.existing_transaction_id is included. |
| 409 | TRANSACTION_IN_PROGRESS | Another request with the same order_id is being processed right now |
| 500 | PAYIN_CREATION_FAILED | The gateway could not create the payment. Safe to retry with the same order_id. |
| 500 | HOSTED_PAYIN_CREATION_FAILED | Hosted link could not be created. Retry; if you then get DUPLICATE_TRANSACTION, use a new order_id. |
Check Payin Status
/payin/status/:transaction_idReturns the current status. Use webhooks for real-time updates and this endpoint as a fallback.
const { data } = await api.get('/payin/status/TXN5ZCBU68GOZ1Y');
console.log(data.data.status, data.data.utr);Response: 200 OK
{
"success": true,
"message": "Transaction status retrieved",
"data": {
"transaction_id": "TXN5ZCBU68GOZ1Y",
"order_id": "ORDER_1729501503000",
"amount": "601.00",
"fee": "45.08",
"net_amount": "555.92",
"currency": "INR",
"status": "success",
"utr": "354605758686",
"gateway_transaction_id": "732295121",
"created_at": "2026-10-21T09:05:03.000Z",
"updated_at": "2026-10-21T09:05:52.000Z",
"expires_at": "2026-10-21T09:50:03.000Z"
},
"meta": { "timestamp": "2026-10-21T09:06:14.733Z" }
}| Status | Meaning |
|---|---|
pending | Waiting for the customer to pay |
success | Paid. utr holds the bank reference (it can be null if the bank did not send one). |
failed | Payment failed or was declined |
expired | Not paid within 45 minutes |
Returns 404 TRANSACTION_NOT_FOUND if the ID does not belong to your account.
List Payins
/payin/listReturns your payins, newest first.
| Query param | Description |
|---|---|
page | Page number (default 1) |
limit | Items per page, 1–100 (default 10) |
status | pending, success, failed or expired |
from_date, to_date | YYYY-MM-DD covers that whole day in IST (inclusive). Full ISO timestamps are also accepted. |
order_id | Partial match on order ID |
customer_email | Partial match on customer email |
search | Matches transaction ID, order ID, UTR, gateway transaction ID, customer name or email |
const { data } = await api.get('/payin/list', {
params: { page: 1, limit: 50, status: 'success', from_date: '2026-10-01', to_date: '2026-10-21' }
});
console.log(data.data); // array of transactions
console.log(data.meta.pagination.totalCount); // total matching rowsResponse: 200 OK
{
"success": true,
"message": "Transactions retrieved successfully",
"data": [
{
"transaction_id": "TXN5ZCBU68GOZ1Y",
"order_id": "ORDER_1729501503000",
"amount": "601.00",
"fee": "45.08",
"net_amount": "555.92",
"currency": "INR",
"status": "success",
"customer_name": "John Doe",
"customer_email": "john@example.com",
"payment_url": "upi://pay?pa=merchant@bank&am=601&cu=INR",
"utr": "354605758686",
"gateway_transaction_id": "732295121",
"created_at": "2026-10-21T09:05:03.000Z",
"updated_at": "2026-10-21T09:05:52.000Z",
"expires_at": "2026-10-21T09:50:03.000Z"
}
],
"meta": {
"timestamp": "2026-10-21T09:06:14.757Z",
"pagination": {
"page": 1,
"pageSize": 50,
"totalCount": 718,
"totalPages": 15,
"hasNext": true,
"hasPrev": false
}
}
}Payout API
Send money from your wallet to a bank account. Payouts are processed asynchronously: the API accepts the request, and the final result arrives by webhook (or via the status endpoint).
Initiate Payout
/payout/initiateCreates a bank transfer (IMPS).
| Field | Type | Required | Description |
|---|---|---|---|
reference_id | string | Yes | Your unique payout reference (1–100 chars). The same reference cannot be reused within 24 hours. |
amount | number | Yes | Amount in INR. Must be within your account's minimum/maximum payout limits. |
beneficiary_name | string | Yes | Account holder name (2–255 chars) |
beneficiary_account | string | Yes | Bank account number (8–20 chars) |
beneficiary_ifsc | string | Yes | IFSC in capitals, e.g. HDFC0001234 |
beneficiary_phone | string | No | Beneficiary phone number |
beneficiary_email | string | No | Beneficiary email |
currency | string | No | Only INR (default) |
metadata | object | No | Any JSON object, stored with the payout |
amount + fee.const { data } = await api.post('/payout/initiate', {
reference_id: 'PAYOUT_' + Date.now(),
amount: 3118,
beneficiary_name: 'Jane Doe',
beneficiary_account: '1234567890',
beneficiary_ifsc: 'HDFC0001234',
beneficiary_phone: '9876543210'
});
console.log(data.data.payout_id, data.data.status);Response: 201 Created
{
"success": true,
"message": "Payout approved and initiated successfully",
"data": {
"payout_id": "PAYYLRP81N36FEO",
"reference_id": "PAYOUT_1729501503000",
"amount": 3118,
"fee": 46.77,
"currency": "INR",
"status": "pending",
"approval_status": "auto_approved",
"beneficiary_name": "Jane Doe",
"beneficiary_account": "1234567890",
"beneficiary_ifsc": "HDFC0001234",
"beneficiary_phone": "9876543210",
"mode": "IMPS",
"created_at": "2026-10-21T08:55:20.118Z"
},
"meta": { "timestamp": "2026-10-21T08:55:20.120Z" }
}approval_status is auto_approved for normal payouts, or awaiting_approval when the payout needs a manual review before it is sent (message: "Payout created and pending admin approval").
Initiate errors
| HTTP | Code | Meaning |
|---|---|---|
| 400 | VALIDATION_ERROR | Missing or invalid field (see error.details) |
| 400 | INVALID_BENEFICIARY_DETAILS | Account number or IFSC missing/invalid |
| 400 | INSUFFICIENT_BALANCE | Available balance is less than amount + fee. details has required_amount and available_balance. |
| 400 | AMOUNT_TOO_LOW / AMOUNT_TOO_HIGH | Outside your payout limits |
| 400 | DAILY_LIMIT_EXCEEDED | Daily payout limit reached |
| 400 | DUPLICATE_REFERENCE | Same reference_id used in the last 24 hours |
| 400 | VELOCITY_LIMIT_EXCEEDED | Too many payouts in the last hour |
| 400 | PAYOUT_DISABLED | Payouts are not enabled on your account |
| 403 | PAYOUT_BLOCKED_BY_RISK_ENGINE | Blocked by risk checks |
| 500 | PAYOUT_INITIATION_FAILED | Unexpected error. Check /payout/list with your reference_id before retrying. |
Check Payout Status
/payout/status/:payout_idReturns the current status of a payout.
{
"success": true,
"message": "Payout status retrieved",
"data": {
"payout_id": "PAYYLRP81N36FEO",
"reference_id": "PAYOUT_1729501503000",
"amount": "3118.00",
"fee": "46.77",
"beneficiary_name": "Jane Doe",
"beneficiary_account": "1234567890",
"beneficiary_ifsc": "HDFC0001234",
"status": "success",
"utr_number": "625114452244",
"mode": "IMPS",
"created_at": "2026-10-21T08:55:20.000Z",
"updated_at": "2026-10-21T08:57:21.000Z"
},
"meta": { "timestamp": "2026-10-21T09:06:14.768Z" }
}| Status | Meaning |
|---|---|
pending | Accepted, waiting to be sent (or waiting for approval) |
processing | Sent to the bank, waiting for confirmation |
success | Credited. utr_number holds the bank reference. |
failed | Failed. The reserved amount and fee are released back to your wallet. |
expired | Could not be processed in time |
suspended, needs_verification, requires_manual_review | On hold for review by our team |
Returns 404 PAYOUT_NOT_FOUND if the ID does not belong to your account.
List Payouts
/payout/listReturns your payouts, newest first.
| Query param | Description |
|---|---|
page, limit | Pagination (limit 1–100, default 10) |
status | Any payout status above |
from_date, to_date | YYYY-MM-DD (whole IST day, inclusive) or ISO timestamp |
reference_id | Partial match on your reference |
beneficiary_account | Partial match on account number |
search | Matches payout ID, reference ID, UTR, beneficiary name, account or UPI ID |
{
"success": true,
"message": "Payouts retrieved successfully",
"data": [
{
"payout_id": "PAYYLRP81N36FEO",
"reference_id": "PAYOUT_1729501503000",
"amount": "3118.00",
"fee": "46.77",
"net_amount": "3071.23",
"currency": "INR",
"status": "success",
"beneficiary_name": "Jane Doe",
"beneficiary_account": "1234567890",
"beneficiary_ifsc": "HDFC0001234",
"beneficiary_vpa": null,
"mode": "IMPS",
"utr_number": "625114452244",
"created_at": "2026-10-21T08:55:20.000Z",
"updated_at": "2026-10-21T08:57:21.000Z",
"expires_at": "2026-10-21T09:25:20.000Z"
}
],
"meta": {
"timestamp": "2026-10-21T09:06:14.781Z",
"pagination": { "page": 1, "pageSize": 10, "totalCount": 675, "totalPages": 68, "hasNext": true, "hasPrev": false }
}
}Wallet
Check Wallet Balance
/wallet/balanceReturns your wallet balances.
{
"success": true,
"message": "Wallet balance retrieved successfully",
"data": {
"balance": 125000.5,
"locked_balance": 0,
"available_balance": 125000.5,
"pending_balance": 940661.74,
"processing_balance": 3164.77,
"total_credited": 1500000,
"total_debited": 1374999.5,
"last_settlement_at": "2026-10-20T12:00:00.000Z",
"last_topup_at": null
},
"meta": { "timestamp": "2026-10-21T09:06:14.807Z" }
}| Field | Meaning |
|---|---|
available_balance | Can be used for payouts now |
pending_balance | Successful payins not yet settled to the wallet |
processing_balance | Amount + fee of payouts that are still pending/processing |
locked_balance | Temporarily reserved |
total_credited, total_debited | Lifetime wallet credits and debits |
Webhooks
We send a POST request to your webhook URL when a payin or payout reaches a final status. Set the URLs in Settings → Webhook Configuration. Use an HTTPS URL that is reachable from the internet.
Events
| Event | Sent when |
|---|---|
payin.success | Payment received |
payin.failed | Payment failed |
payout.success | Payout credited to the beneficiary |
payout.failed | Payout failed (funds released back to your wallet) |
GET /payin/status if you need to confirm expiry.Headers
| Header | Example | Description |
|---|---|---|
X-Webhook-Signature | sha256=9e89bb8aed... | HMAC-SHA256 of the raw body with your webhook secret |
X-Webhook-Event | payin.success | Event name |
X-Webhook-ID | TXN5ZCBU68GOZ1Y | Transaction ID or payout ID |
X-Webhook-Timestamp | 2026-10-21T09:05:52.120Z | Same as timestamp in the body |
Content-Type | application/json | |
User-Agent | UPI-Middleware-Webhook/1.0 |
Payin webhook body
{
"event": "payin.success",
"timestamp": "2026-10-21T09:05:52.120Z",
"data": {
"transaction_id": "TXN5ZCBU68GOZ1Y",
"order_id": "ORDER_1729501503000",
"amount": 601,
"fee": 45.08,
"net_amount": 555.92,
"currency": "INR",
"status": "success",
"utr": "354605758686",
"gateway_transaction_id": "732295121",
"customer_name": "John Doe",
"customer_email": "john@example.com",
"customer_phone": "9876543210",
"created_at": "2026-10-21T09:05:03.000Z",
"updated_at": "2026-10-21T09:05:52.120Z"
}
}utr and customer_phone may be missing or null on payin.failed. Amounts may be sent as numbers or strings, so parse them as decimals.
Payout webhook body
{
"event": "payout.success",
"timestamp": "2026-10-21T08:57:21.300Z",
"data": {
"payout_id": "PAYYLRP81N36FEO",
"reference_id": "PAYOUT_1729501503000",
"amount": 3118,
"fee": 46.77,
"currency": "INR",
"status": "success",
"utr_number": "625114452244",
"failure_reason": null,
"created_at": "2026-10-21T08:55:20.000Z",
"updated_at": "2026-10-21T08:57:21.300Z"
}
}Some payout webhooks also include net_amount, mode and beneficiary fields. Ignore fields you do not use.
Responding and retries
- Respond with any 2xx status within 30 seconds. Do slow work after responding.
- If we do not get a 2xx, we retry up to 5 attempts in total: immediately, then 30 seconds, 1 minute, 3 minutes and 5 minutes after the previous failure.
- The same event can arrive more than once. Make your handler idempotent, e.g. ignore an event if the order is already in that status.
- If a webhook is missed, use
GET /payin/statusorGET /payout/statusto get the current status.
Verifying the signature
Compute HMAC-SHA256 over the raw request body using your webhook secret (Settings → API Credentials → Webhook Secret), hex-encode it, and compare it with the value after sha256= in X-Webhook-Signature.
X-Webhook-Signature = "sha256=" + hex( HMAC_SHA256( webhook_secret, raw_body ) )Node.js (Express)
const express = require('express');
const crypto = require('crypto');
const app = express();
const WEBHOOK_SECRET = process.env.RUPIXPE_WEBHOOK_SECRET;
// Keep the raw body for signature verification
app.use(express.json({ verify: (req, res, buf) => { req.rawBody = buf; } }));
function isValidSignature(req) {
const header = req.get('X-Webhook-Signature') || '';
if (!header.startsWith('sha256=') || !WEBHOOK_SECRET) return false;
const received = Buffer.from(header.slice(7), 'hex');
const expected = crypto.createHmac('sha256', WEBHOOK_SECRET).update(req.rawBody).digest();
return received.length === expected.length && crypto.timingSafeEqual(received, expected);
}
app.post('/webhook/payin', (req, res) => {
if (!isValidSignature(req)) return res.status(401).end();
const { event, data } = req.body;
if (event === 'payin.success') {
// mark order data.order_id as paid (idempotent), store data.utr
} else if (event === 'payin.failed') {
// mark order data.order_id as failed
}
res.status(200).json({ received: true });
});
app.post('/webhook/payout', (req, res) => {
if (!isValidSignature(req)) return res.status(401).end();
const { event, data } = req.body;
// event: payout.success / payout.failed, data.reference_id, data.utr_number
res.status(200).json({ received: true });
});
app.listen(3000);Python (Flask)
import hmac, hashlib, os
from flask import Flask, request, jsonify
app = Flask(__name__)
WEBHOOK_SECRET = os.environ["RUPIXPE_WEBHOOK_SECRET"].encode()
def is_valid_signature(req):
header = req.headers.get("X-Webhook-Signature", "")
if not header.startswith("sha256="):
return False
expected = hmac.new(WEBHOOK_SECRET, req.get_data(), hashlib.sha256).hexdigest()
return hmac.compare_digest(header[7:], expected)
@app.post("/webhook/payin")
def payin_webhook():
if not is_valid_signature(request):
return "", 401
body = request.get_json()
if body["event"] == "payin.success":
pass # mark body["data"]["order_id"] as paid
return jsonify(received=True), 200PHP
<?php
$secret = getenv('RUPIXPE_WEBHOOK_SECRET');
$raw = file_get_contents('php://input');
$header = $_SERVER['HTTP_X_WEBHOOK_SIGNATURE'] ?? '';
$expected = 'sha256=' . hash_hmac('sha256', $raw, $secret);
if (!hash_equals($expected, $header)) {
http_response_code(401);
exit;
}
$body = json_decode($raw, true);
if ($body['event'] === 'payin.success') {
// mark $body['data']['order_id'] as paid
}
http_response_code(200);
echo json_encode(['received' => true]);Set webhook URL by API (optional)
You can also set the URLs from your server instead of the dashboard. The response includes your current webhook_secret.
/payin/setwebhookBody: { "webhook_url": "https://yoursite.com/webhook/payin" }
/payout/setwebhookBody: { "webhook_url": "https://yoursite.com/webhook/payout" }
Errors & Limits
HTTP status codes
| HTTP | Meaning |
|---|---|
| 200 / 201 | Success (201 for created payins and payouts) |
| 400 | Invalid request or business rule failed (see error.code) |
| 401 | Missing or invalid API credentials |
| 403 | KYC not approved, IP not whitelisted, or blocked |
| 404 | Transaction or payout not found |
| 409 | Duplicate order_id, or the same order is being processed |
| 429 | Rate limit exceeded |
| 500 | Server or gateway error |
Validation errors
VALIDATION_ERROR lists every invalid field in error.details:
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"details": [
{ "field": "customer_email", "message": "\"customer_email\" must be a valid email", "value": "bad" },
{ "field": "customer_name", "message": "\"customer_name\" length must be at least 2 characters long", "value": "A" }
],
"timestamp": "2026-10-21T09:06:14.761Z"
}
}Rate limits
Limits apply per merchant account. When exceeded you get HTTP 429 with RATE_LIMIT_EXCEEDED (account limit) or ENDPOINT_RATE_LIMIT_EXCEEDED (endpoint limit); wait a minute and retry.
| Endpoint | Limit |
|---|---|
POST /payin/create, POST /payin/hosted | 60,000 / minute |
GET /payin/status/:id | 100 / minute |
GET /payin/list, GET /payout/list | 30 / minute |
POST /payout/initiate | 3,000 / hour (plus your account's payout velocity limit) |
GET /wallet/balance | 60 / minute |
POST /payin/setwebhook, POST /payout/setwebhook | 10 / minute |
Prefer webhooks over polling. If you poll /payin/status, poll each pending transaction no more than every 10–15 seconds.
Support
- Email: support@rupixpe.com
- Merchant Dashboard: merchant.rupixpe.com
- Include the
transaction_id/payout_idand the full error response when contacting support.