AdityaMods Logo AdityaMods™
API v2.0 99.99% Operational DPDP Act 2023 Compliant MSME: UDYAM-BR-28-0050000
Whitelisted on PythonAnywhere Free Tier & Cloud Relays
→

Developer Documentation & API Reference

Automate zero-fee peer-to-peer UPI payment verification in your Python scripts, Telegram bots, and web backends.

$ pip install adityamods-upi
Endpoints ↓

Official Merchant SDKs & Downloads

Install via package manager or download source code directly.

Python SDK

v2.0

For PythonAnywhere, Telegram bots, FastAPI, and Django applications.

pip install adityamods-upi

PHP Merchant SDK

PHP 8.1+

Zero-dependency client with HMAC webhook signature validator.

composer require adityamods/upi-sdk

JavaScript / Node SDK

ESM • CJS

For Express, Next.js, and browser frontends.

npm install @adityamods/upi-sdk

Android Kotlin SDK

AndroidX

Integrate direct UPI orders into your native Android applications.

implementation("com.adityamods.upi:sdk:2.0.0")

Master AI Agent Context Prompt

Cursor (.cursorrules) • Claude • ChatGPT • Windsurf

Embed all AdityaMods SDKs, API routes, webhook specifications, and bot templates into your AI assistant in a single click.

REST API Reference

All authenticated requests require the X-API-KEY: your_api_key HTTP header.

POST /api/orders

Creates a new order with auto-allocated fractional paise (₹100.01 - ₹100.99) and returns the standard UPI intent URI.

Request Body (JSON):
{
  "amount": 250.00,
  "customer_name": "Rohan Sharma",
  "customer_email": "rohan@example.com",
  "remark": "Order #4892"
}
Response (200 OK):
{
  "success": true,
  "message": "Order created successfully with unique fractional reservation",
  "data": {
    "order_id": "fg_A9B8C7D6",
    "base_amount": "250.00",
    "fractional_paise": 4,
    "total_amount": "250.04",
    "status": "PENDING",
    "upi_uri": "upi://pay?pa=adityamods@upi&pn=Store&am=250.04&cu=INR&tn=Order+fg_A9B8C7D6",
    "checkout_url": "https://gateway.adityamods.work.gd/pay.php?order_id=fg_A9B8C7D6",
    "expires_at": "2026-11-14 07:50:00"
  }
}
GET /api/orders/{order_id}/status

Polls the order state. Recommended polling frequency: every 3 seconds until terminal status (PAID or EXPIRED).

{
  "success": true,
  "data": {
    "order_id": "fg_A9B8C7D6",
    "status": "PAID",
    "amount": "250.04",
    "utr_number": "439988776655",
    "paid_at": "2026-11-14 07:44:12"
  }
}
EVENT Merchant Webhook Delivery

When an order is confirmed, AdityaMods sends an HTTP POST with the X-Aditya-Signature header containing the HMAC-SHA256 signature.

PHP Verification Snippet:
$rawBody = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_ADITYA_SIGNATURE'] ?? '';
$secret = 'YOUR_WEBHOOK_SECRET';

$expected = hash_hmac('sha256', $rawBody, $secret);
if (hash_equals($expected, $signature)) {
    $event = json_decode($rawBody, true);
    // Mark order as fulfilled in your database
}