WayPay™ Developer Documentation
WayPay is India's sovereign, zero-commission payment reconciliation gateway. It eliminates the 2% + GST fee charged by traditional aggregators (Razorpay, Cashfree, PayU) by allowing customers to pay directly from their UPI app straight into your Indian bank account. WayPay automatically reconciles the payment in under 2 seconds and fires real-time webhooks to fulfill your customer orders.
100% of customer funds reach your bank account.
Direct correlation against 12-digit bank UTR numbers.
Signed event dispatches with automatic retry policies.
How the 0% MDR Automatic Gateway Works
Standard payment gateways act as custodians: money sits in their nodal accounts for T+2 business days before reaching you, while they deduct a 2.36% fee. WayPay operates as a pure software reconciliation layer:
5-Minute Quickstart
Accept payments on your website in under 5 minutes with zero backend dependencies.
<script src="https://waypay.whatyouwantkerala.in/waypay.js"></script>
WayPay.open({
amount: 499.00,
orderNumber: 'ORD-' + Date.now(),
merchantName: 'My Awesome Store',
vpa: 'yourshop@okaxis', // Your UPI ID
onSuccess: function(res) {
console.log('Payment verified! UTR:', res.utr);
window.location.href = '/order-success?orderId=' + res.orderNumber;
},
onFailure: function(err) {
alert('Payment canceled or expired');
}
});
Universal Checkout SDK (waypay.js)
waypay.js is a standalone 30KB pure-vector checkout script that generates dynamic SVG QR codes, UPI intent deep-links for Google Pay, PhonePe, Paytm, CRED, BHIM, and polls the reconciliation engine in real time.
Configuration Options Reference
| Parameter | Type | Required | Description |
|---|---|---|---|
| amount | Number | Yes | The exact order amount in Indian Rupees (e.g. 499.00). |
| orderNumber | String | Yes | Unique identifier for the checkout order (e.g. ORD-9821). |
| vpa | String | Yes | Your merchant Virtual Payment Address (e.g. malabarspices@okaxis). |
| merchantName | String | Optional | Display name shown to the customer on checkout and in UPI apps. |
| paymentTimeoutSec | Number | Optional | Countdown window before expiry. Defaults to 300 seconds (5 minutes). |
| onSuccess | Function | Optional | Callback triggered the millisecond direct bank credit is verified. |
| successUrl | String | Optional | URL to automatically redirect the shopper after successful bank settlement. |
Render Directly Inside Your Custom Checkout Container
Instead of displaying a modal overlay, WayPay.renderInline(container, options) embeds the dynamic QR, payment buttons, and real-time polling directly inside any HTML <div> on your page.
WayPay.renderInline('#my-payment-box', {
amount: 850.00,
orderNumber: 'ORD-9821',
merchantName: 'Malabar Spices',
vpa: 'malabarspices@okaxis',
successUrl: 'https://mystore.com/thank-you',
onSuccess: function(res) {
console.log('Payment reconciled inline:', res);
}
});
Universal Hosted Payment URL (/pay)
Need to send a payment link via WhatsApp, SMS invoice, Instagram bio, or an offsite e-commerce redirect? Redirect customers directly to WayPay's mobile-responsive checkout:
WooCommerce (WordPress Plugin)
Turnkey, official WordPress plugin that integrates native 0% MDR UPI direct settlement into your WooCommerce checkout with automated webhook status synchronization.
WayPay Direct UPI Gateway for WooCommerce
Single-click uploadable ZIP package. Compatible with WooCommerce 5.x through 9.x and PHP 7.4 through 8.3.
Go to Plugins > Add New > Upload Plugin. Select waypay-woocommerce.zip and activate it.
Under WooCommerce > Settings > Payments > WayPay, enter your Bank UPI ID and live API credentials.
Copy the generated Webhook URL into your WayPay Console. Orders update to 'Processing' automatically when bank credits occur.
Shopify & Custom Offsite Gateways
For Shopify stores, you can connect WayPay via a Custom Offsite Payment App or Manual Payment with auto-redirection. Forward your customers to https://waypay.whatyouwantkerala.in/pay passing the Shopify order ID and total amount.
Wix, Squarespace, Webflow & No-Code Builders
In your page builder, add a custom HTML embed block containing the 2-line WayPay code snippet. Customers clicking your button experience instant dynamic QR code generation with zero iframe layout breaks.
REST API Reference
WayPay provides a complete RESTful API for custom e-commerce backends, mobile apps, and ERP systems.
🔒 Authentication
All API requests must include your live secret key in the Authorization HTTP header as a Bearer token:
Authorization: Bearer sk_live_749281a94bfe942048f02
Creates a new amount-locked order with micro-offset paisa disambiguation and generates standard NPCI UPI links.
{
"amount": 499.00,
"order_id": "ORD-9921",
"vpa": "merchant@okaxis",
"customer_phone": "9847012345",
"customer_email": "buyer@gmail.com",
"webhook_url": "https://myshop.com/waypay/webhook",
"redirect_url": "https://myshop.com/success"
}
{
"success": true,
"order_id": "ORD-9921",
"amount_expected": 499.03,
"micro_offset": 0.03,
"status": "PENDING",
"upi_intent": "upi://pay?pa=merchant@okaxis&am=499.03&tn=ORD-9921",
"apps": {
"gpay": "upi://pay?pa=merchant@okaxis&am=499.03...",
"phonepe": "phonepe://pay?pa=merchant@okaxis&am=499.03...",
"paytm": "paytmmp://pay?pa=merchant@okaxis&am=499.03..."
},
"expires_at": "2026-10-29T14:15:00Z"
}
Polls the real-time reconciliation state of a specific order.
{
"order_id": "ORD-9921",
"status": "VERIFIED",
"amount_received": 499.03,
"utr": "628219482014",
"payer_vpa": "rahul@oksbi",
"bank_name": "State Bank of India",
"reconciled_via": "PHONE_SMS_SYNC",
"verified_at": "2026-10-29T14:12:44Z"
}
Allows a customer or cashier to manually provide a 12-digit bank reference (UTR/RRN). WayPay immediately matches it against unlinked bank credits.
Webhooks & HMAC-SHA256 Signatures
The millisecond a bank credit alert is validated by your connected phone or bank email inbox, WayPay dispatches an authoritative POST request to your configured webhook URL.
payment.verified
{
"event": "payment.verified",
"event_id": "evt_9482049102",
"timestamp": 1729837200,
"data": {
"order_id": "ORD-9921",
"amount": 499.03,
"currency": "INR",
"utr": "628219482014",
"payer_vpa": "rahul@oksbi",
"bank": "HDFC_BANK",
"settlement_type": "DIRECT_PEER_TO_PEER",
"mdr_fee_deducted": 0.00
}
}
🛡️ Verifying Webhook Signatures
Every webhook header contains an X-WayPay-Signature formatted as:
t=1729837200,v1=5d6e8.... Verify it in Node.js:
const crypto = require('crypto');
function verifyWayPaySignature(rawBody, signatureHeader, secret) {
const parts = signatureHeader.split(',');
const timestamp = parts.find(p => p.startsWith('t=')).split('=')[1];
const signature = parts.find(p => p.startsWith('v1=')).split('=')[1];
// Reject replays older than 300 seconds
if (Math.abs(Date.now() / 1000 - timestamp) > 300) return false;
const payloadToSign = `${timestamp}.${rawBody}`;
const expectedSig = crypto
.createHmac('sha256', secret)
.update(payloadToSign)
.digest('hex');
return crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expectedSig));
}
Automatic UTR Gateway Engine
WayPay eliminates the need for expensive third-party payment aggregators using redundant, fault-tolerant ingestion pipelines:
1. Counter Alert Phones (Up to 5)
Connect up to 5 shop smartphones. Captures incoming bank SMS and push notification alerts from Google Pay, PhonePe, Paytm, and bank apps in real time.
2. Bank Notification Inboxes (Up to 10)
Connect up to 10 bank notification emails over TLS. Confirms credit alert emails from HDFC, SBI, ICICI, Axis, Amazon Pay, and FamPay even if shop phones lose battery.
27 Recognized Banks & UPI Systems
Native automated regex ingestion with anti-tampering verification for all top public/private banks, cooperative lenders, and merchant UPI payment apps across India:
Anti-Collision Micro-Offsets (Paisa Locking)
When 10 customers order a ₹499 item simultaneously, WayPay generates tiny 1-paisa to 5-paisa offsets (₹499.01, ₹499.02, ₹499.03). This allows 100% deterministic matching even if bank SMS alerts arrive out of sequence, supplemented by the 12-digit bank UTR reference.
Fraud Detection & Fallback Dispute Queue
WayPay is battle-tested against modern UPI fraud techniques, including spoofed APK tools like fake_Upi and synthetic receipt generators.
Every 12-digit UTR can only be linked once across the entire merchant network. Replay attempts are locked immediately.
Uploaded screenshots are analyzed for font rendering anomalies, mismatched time stamps, and missing bank IDs.
Unmatched or disputed claims route to your dashboard with 1-click Approve or Reject actions.
Integration Code Samples
Ready-to-use production code snippets in multiple programming languages.
curl -X POST https://waypay.whatyouwantkerala.in/api/v1/orders/create \
-H "Authorization: Bearer sk_live_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"amount": 499.00,
"order_id": "ORD-1001",
"vpa": "yourmerchant@okaxis",
"webhook_url": "https://myshop.com/webhooks/waypay"
}'
const axios = require('axios');
async function createUPIOrder(orderId, amountINR) {
const response = await axios.post(
'https://waypay.whatyouwantkerala.in/api/v1/orders/create',
{
amount: amountINR,
order_id: orderId,
vpa: process.env.MERCHANT_UPI_VPA,
webhook_url: 'https://myshop.com/api/waypay-webhook'
},
{
headers: {
'Authorization': `Bearer ${process.env.WAYPAY_SECRET_KEY}`
}
}
);
return response.data;
}
import requests
def create_waypay_order(order_id: str, amount: float):
url = "https://waypay.whatyouwantkerala.in/api/v1/orders/create"
headers = {
"Authorization": "Bearer sk_live_your_secret_key",
"Content-Type": "application/json"
}
payload = {
"amount": amount,
"order_id": order_id,
"vpa": "yourshop@okaxis"
}
res = requests.post(url, json=payload, headers=headers)
return res.json()
<?php
$apiKey = "sk_live_your_secret_key";
$data = [
"amount" => 499.00,
"order_id" => "ORD-501",
"vpa" => "yourshop@okaxis"
];
$ch = curl_init("https://waypay.whatyouwantkerala.in/api/v1/orders/create");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer " . $apiKey,
"Content-Type: application/json"
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
?>