WayPay WayPay™
Jump to:
Official Developer Specification • 0% MDR Unified Payment Gateway

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.

0.0% MDR
Zero Middleman Deductions

100% of customer funds reach your bank account.

< 1.5s Speed
Instant Bank Reconciliation

Direct correlation against 12-digit bank UTR numbers.

HMAC-SHA256
Cryptographic Webhooks

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:

Transaction Lifecycle Flowchart
🛒 1. Order Created Your store calls WayPay API or uses waypay.js.
📱 2. Customer Pays Customer scans dynamic QR or taps GPay/PhonePe.
🏦 3. Direct Settle Funds hit your HDFC, SBI, or Federal Bank instantly.
⚡ 4. Auto Reconcile Ingestion engine verifies Amount & 12-digit UTR.
🚀 5. Store Webhook HMAC-signed webhook marks order as paid.

5-Minute Quickstart

Accept payments on your website in under 5 minutes with zero backend dependencies.

1 Include waypay.js in your HTML:
<script src="https://waypay.whatyouwantkerala.in/waypay.js"></script>
2 Launch checkout on button click:
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.
INLINE EMBED

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);
  }
});
ZERO CODE

1-Line Declarative HTML Payment Buttons

No JavaScript code required. Drop waypay.js onto your website and annotate any button with data-waypay-pay. WayPay automatically scans the DOM and binds the dynamic checkout modal:

<!-- 1. Include SDK -->
<script src="https://waypay.whatyouwantkerala.in/waypay.js"></script>

<!-- 2. Any HTML Button with data-attributes -->
<button data-waypay-pay
        data-amount="499.00"
        data-name="Artisan Coffee Beans"
        data-vpa="coffee@okaxis"
        data-success-url="https://mystore.com/order-confirmed">
  Buy Now with UPI (0% Fee)
</button>
STANDALONE HOSTED PAGE

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:

https://waypay.whatyouwantkerala.in/pay?order_id=ORD-9912&amount=499.00&vpa=merchant@okaxis&name=My%20Store&success_url=https://mystore.com/thank-you
Official E-Commerce Integrations

WooCommerce (WordPress Plugin)

Turnkey, official WordPress plugin that integrates native 0% MDR UPI direct settlement into your WooCommerce checkout with automated webhook status synchronization.

VERSION 2.4.0

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.

Download Plugin (.zip)
1 Upload in WP Admin

Go to Plugins > Add New > Upload Plugin. Select waypay-woocommerce.zip and activate it.

2 Configure UPI ID & Keys

Under WooCommerce > Settings > Payments > WayPay, enter your Bank UPI ID and live API credentials.

3 Automatic Webhook Sync

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
POST /api/v1/orders/create

Creates a new amount-locked order with micro-offset paisa disambiguation and generates standard NPCI UPI links.

Request Body (JSON)
{
  "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"
}
Response (200 OK)
{
  "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"
}
GET /api/v1/orders/{order_id}

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"
}
POST /api/v1/orders/{order_id}/verify-utr

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.

Event Payload: 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:

1. State Bank of India (SBI) 2. HDFC Bank 3. ICICI Bank 4. Axis Bank 5. Kotak 811 6. Federal Bank 7. IDFC FIRST Bank 8. IndusInd Bank 9. Punjab National Bank (PNB) 10. Bank of Baroda (BOB) 11. Canara Bank 12. Union Bank of India 13. Kerala Bank / KGB 14. South Indian Bank (SIB) 15. Yes Bank 16. Bank of India (BOI) 17. Central Bank of India 18. Indian Bank 19. India Post Payments Bank 20. PhonePe Merchant 21. Google Pay for Business 22. Paytm Payments Bank 23. CRED Pay 24. BHIM UPI (NPCI) 25. Amazon Pay 26. FamPay 27. BharatPe

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.

✓ UTR Exclusivity

Every 12-digit UTR can only be linked once across the entire merchant network. Replay attempts are locked immediately.

✓ Screenshot Heuristics

Uploaded screenshots are analyzed for font rendering anomalies, mismatched time stamps, and missing bank IDs.

✓ Merchant Dispute Queue

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 (Command Line)
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"
  }'
Node.js / Express
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;
}
Python / Django / FastAPI
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 / WooCommerce
<?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);
?>