Gram UPI GatewayGram UPI Gateway

India's Trusted
UPI Payment Gateway
& Verification API.

The most reliable UPI payment verification API for developers and businesses. Connect FamPay, Paytm, BharatPe, Kotak, Slice & HDFC — verify UPI transactions programmatically and grow your business with secure payment infrastructure.

Multi-Gateway Payment API
Secure Merchant Integration
Only ₹99 for 30 days

Hello again

Sign in to your Gram account

or continue with

New to Gram? Create account

© 2026 Gram UPI Gateway · UPI payment verification API

Gram UPI Gateway
Notifications
Loading...
UPI payment gateway

Accept UPI.
Get it verified
in seconds.

Show a QR, your customer pays with any UPI app, and your app gets PAID with just the order ID. No UTR. No screenshots. No checking by hand.

6 apps & banksOrder-ID verifyGram Wallet
How it works
01

Connect your app

Link FamPay, Paytm, BharatPe or your Kotak, Slice or HDFC account in a minute. You get an API key right away.

02

Create a QR

Call autoqr.php with an amount. You get an order ID, a QR and PhonePe / Paytm links for your customer.

03

Get it verified

Call autoverify.php with the order ID. It returns PAID as soon as the money arrives — no UTR, no screenshot.

What happens on every payment
CustomerScans QR or taps PhonePe / Paytm
Your UPI / bankMoney lands in your own account
Gram verifiesMatches it to your order ID
Your app: PAIDDeliver the order instantly
GRAM WALLET

No UPI account? No problem.

Get paid into your Gram Wallet with the same API, then withdraw to your own bank or UPI.

Available₹5,000.00
₹
SAFE BY DESIGN

Built to stop fraud.

  • One payment, one order — the same payment never confirms twice.
  • Selfie video KYC for wallets, with a random code.
  • Withdrawal PIN on every payout.
  • Straight to your account — normal payments go to your own UPI, not through us.
Live demo
LIVE

Pay ₹1 and watch it verify.

A real checkout opens with your QR and PhonePe / Paytm buttons. Pay ₹1 from any UPI app — it confirms by itself and brings you back here.

The ₹1 is a real payment and is not refunded.

Why Gram UPI
No UTR needed

Customers just pay. The order ID is all you need to confirm it.

Real-time checks

Payments are matched within seconds of hitting your account.

Duplicate protection

One payment can confirm only one order — never twice.

6 apps & banks

FamPay, Paytm, BharatPe, Kotak, Slice and HDFC.

Just 2 APIs

autoqr.php to create, autoverify.php to confirm. That is it.

Money stays with you

Payments go straight to your own UPI account. No middleman.

Pricing
One simple plan. All apps included.
Questions
Do you take a cut of my payments?

No. Customers pay straight into your own UPI account. Plans only change your limits and features.

What counts as an API request?

Each new QR from autoqr.php is one request. Each check on autoverify.php is one request, but checking the same order again within 5 seconds, or checking an order that is already paid or expired, is free. Payment links and the checkout page do not count.

What happens when I reach my limit?

Only new QR codes pause until the 1st of next month. Orders that were already created keep verifying, so no customer gets stuck. Upgrade any time to continue right away.

What happens when my paid plan ends?

Your account moves to the Free plan. Your API keys keep working within the Free limits. Your first connected app keeps working; other apps pause until you upgrade.

If I renew or upgrade early, do I lose days?

No. Your remaining days are added to the new plan.

Logo on your QR
A square logo with a simple shape works best.
We put it on a white square so the QR still scans in every UPI app.
Applies to every new QR from autoqr.php right away — no code change needed.
PreviewWhat your customer sees
Pay ₹499.00
Sample QR — not for payment
Free right now

We connect Gram UPI
to your website or bot.

PHP sites, WordPress, Telegram bots, recharge or key-selling panels — share what you have and our team will add QR payments with auto verify.

  1. 1Send a request with your details
  2. 2We message you on Telegram or WhatsApp
  3. 3Your payments go live, verified automatically
New requestUsually answered within a day
My requests
Login to see your requests.
YOU SHAPE GRAM UPI
Your idea could be the
next update.

Every message is read by the team. Ideas that ship show up in the Changelog.

0 / 2000
BUILT FROM YOUR IDEASLATEST
Loading...
YOUR MESSAGES
Login to send feedback and see our replies.
Loading...
Today
₹0
0 transactions
This Month
₹0
0 transactions
All Time
₹0
0 transactions
Payment analytics

Received amount

Loading chart...
By app
Loading...
Loading apps...
Total amount₹0
Transactions0
Average₹0
Loading...
Loading...
Loading...
Loading...
1Add your URLPaste the link of a file on your server, like https://yoursite.com/gram-webhook.php, and turn it on.
2Check the signatureCopy the signing secret below into your code. Every webhook is signed with it.
3Send a testPress Send test and see what we sent and what your server replied.
Loading...
API v2 · REST · JSON

API Documentation

Just two endpoints — autoqr.php to create a UPI QR and autoverify.php to confirm the payment with its order_id.

01

Quick start

Accept UPI payments with a QR code and confirm them using the order_id. No UTR from the customer is needed.

1

Connect an app

Open Connect Apps, connect your gateway and copy its API key.

2

Create a QR

Call autoqr.php with the amount. Show the QR and the exact amount to the customer.

3

Verify

Call the verify API with the order_id until the status is PAID or EXPIRED.

Base URLhttps://gateway.anujbots.in/
02

Authentication

Send your api_key with every request, as a query parameter (GET) or form field (POST).

Active plan required. If your subscription has ended, both APIs return SUBSCRIPTION_EXPIRED with the end date.
Keep your API key secret. Call these APIs from your server or bot, never from browser JavaScript or a public app.
03

Create QR

Creates a payment QR for any connected gateway. The gateway is picked automatically from your API key.

GEThttps://gateway.anujbots.in/autoqr.php?api_key=YOUR_API_KEY&amount=50
ParameterTypeDescription
api_keyrequiredYour gateway API key
amountrequiredAmount in ₹ — minimum 1, up to 2 decimals
customer_nameoptionalCustomer's name, up to 80 characters. Shown in Transactions and sent in the webhook
customer_phoneoptionalCustomer's mobile number
noteoptionalYour own note for this order, up to 200 characters, e.g. Plan: Pro · User 1042

Response

json
{
    "status": "success",
    "data": {
        "order_id": "GRAM4EB00B3C",
        "qr_url": "https://gateway.anujbots.in/qr_codes/GRAM4EB00B3C.png",
        "upi_id": "yourname@kotak",
        "gateway": "kotak",
        "amount": "50.00",
        "created_at_ist": "26-10-2026 11:58:11",
        "expires_at_ist": "26-10-2026 12:03:11",
        "valid_seconds": 300,
        "payment_url": "https://gateway.anujbots.in/?pay=GRAM4EB00B3C&t=9f2c41d0a7e3b815",
        "intent": {
            "phonepe": "https://gateway.anujbots.in/?go=phonepe&o=GRAM4EB00B3C",
            "paytm": "https://gateway.anujbots.in/?go=paytm&o=GRAM4EB00B3C"
        }
    },
    "dev": "@ANUJxCODER"
}
json
{
    "status": "error",
    "message": "amount is required",
    "dev": "@ANUJxCODER"
}
Pay in the app (intent). Give the customer intent.phonepe or intent.paytm as a button on your page or bot. When they tap it on their phone, the app opens with the amount filled in. intent is not sent for Paytm connections — show the QR there.
Show the amount from the response. Always show the customer the amount returned by autoqr.php, exactly as it is.
Valid for 5 minutes. After expires_at_ist, create a new QR.
04

Verify payment

One API for every connected app. Pass the order_id you got from the QR API.

GEThttps://gateway.anujbots.in/autoverify.php?api_key=YOUR_API_KEY&order_id=GRAM4EB00B3C
ParameterTypeDescription
api_keyrequiredSame API key used to create the QR
order_idrequiredorder_id from the QR response

Response

json
{
    "status": true,
    "message": "Payment verified successfully",
    "data": {
        "order_id": "GRAM4EB00B3C",
        "gateway": "kotak",
        "amount": 50.00,
        "status": "PAID",
        "created_at": "26-10-2026 11:58:11",
        "expires_at": "26-10-2026 12:03:11",
        "utr": "666448484228",
        "payer": "ANUJ PATEL",
        "transaction_id": null,
        "payment_time": "26-10-2026 11:59:02"
    },
    "developer": "@ANUJxCODER"
}
json
{
    "status": false,
    "message": "Payment pending",
    "data": {
        "order_id": "GRAM4EB00B3C",
        "gateway": "kotak",
        "amount": 1.03,
        "status": "PENDING",
        "created_at": "26-10-2026 11:58:11",
        "expires_at": "26-10-2026 12:03:11",
        "seconds_left": 240
    },
    "developer": "@ANUJxCODER"
}
json
{
    "status": false,
    "message": "Order expired. Payment not received within 5 minutes.",
    "data": {
        "order_id": "GRAM4EB00B3C",
        "gateway": "kotak",
        "amount": 1.03,
        "status": "EXPIRED",
        "created_at": "26-10-2026 11:58:11",
        "expires_at": "26-10-2026 12:03:11"
    },
    "developer": "@ANUJxCODER"
}
json
{
    "status": false,
    "message": "Subscription expired on 20-10-2026 11:30 AM. Please renew your plan to continue using the API.",
    "data": {
        "code": "SUBSCRIPTION_EXPIRED",
        "expired_on": "20-10-2026 11:30:00",
        "order_id": "GRAM4EB00B3C"
    },
    "developer": "@ANUJxCODER"
}
05

Code examples

Create a QR, then check the status every 5 seconds.

bash
# 1. Create a QR
curl "https://gateway.anujbots.in/autoqr.php?api_key=YOUR_API_KEY&amount=50"

# 2. Check payment status with the order_id from step 1
curl "https://gateway.anujbots.in/autoverify.php?api_key=YOUR_API_KEY&order_id=GRAM4EB00B3C"
php
<?php
$apiKey = 'YOUR_API_KEY';
$base   = 'https://gateway.anujbots.in/';

// 1. Create a QR
$qr = json_decode(file_get_contents($base . 'autoqr.php?' . http_build_query([
    'api_key' => $apiKey,
    'amount'  => 50,
])), true);

if (($qr['status'] ?? '') !== 'success') {
    exit($qr['message'] ?? 'Could not create QR');
}

$orderId = $qr['data']['order_id'];
// Show $qr['data']['qr_url'] and $qr['data']['amount'] to your customer

// 2. Check status (repeat every 5 seconds until PAID or EXPIRED)
$res = json_decode(file_get_contents($base . 'autoverify.php?' . http_build_query([
    'api_key'  => $apiKey,
    'order_id' => $orderId,
])), true);

$status = $res['data']['status'] ?? 'PENDING'; // PAID | PENDING | EXPIRED

if ($status === 'PAID') {
    // Deliver the order
}
javascript
const API_KEY = process.env.GRAM_API_KEY;
const BASE = 'https://gateway.anujbots.in/';

async function createQR(amount) {
  const r = await fetch(`${BASE}autoqr.php?api_key=${API_KEY}&amount=${amount}`);
  return r.json(); // { status, data: { order_id, qr_url, amount, ... } }
}

async function waitForPayment(orderId) {
  while (true) {
    const r = await fetch(`${BASE}autoverify.php?api_key=${API_KEY}&order_id=${orderId}`);
    const j = await r.json();
    const status = j.data?.status;
    if (status === 'PAID' || status === 'EXPIRED') return j;
    await new Promise(res => setTimeout(res, 5000));
  }
}
python
import time, requests

API_KEY = "YOUR_API_KEY"
BASE = "https://gateway.anujbots.in/"

qr = requests.get(BASE + "autoqr.php", params={"api_key": API_KEY, "amount": 50}).json()
order_id = qr["data"]["order_id"]
print("Pay", qr["data"]["amount"], "->", qr["data"]["qr_url"])

while True:
    res = requests.get(BASE + "autoverify.php",
                       params={"api_key": API_KEY, "order_id": order_id}).json()
    status = res.get("data", {}).get("status")
    if status in ("PAID", "EXPIRED"):
        print(status)
        break
    time.sleep(5)

The same code works for every gateway — only the api_key changes.

06

Status & errors

Order status

StatusMeaning
PAIDPayment received. Deliver the order.
PENDINGNot received yet. Check again after 5 seconds.
EXPIRED5 minutes passed. Create a new QR.

Common errors

MessageWhat to do
api_key is requiredNo API key sent
amount is requiredAmount missing in Create QR
Invalid api_keyKey is wrong or the app was disconnected
Subscription expired on <date>Your plan has ended. Renew it — both APIs stop working until you do
SUBSCRIPTION_EXPIREDSent in data.code, with the end date in data.expired_on
Order not foundWrong order_id, or it belongs to another API key
Gmail connection failedReconnect the app with a new App Password
IP_NOT_ALLOWEDYour server IP is not in this key's IP whitelist. Add it on the Account page
07

Best practices

  • Create the QR and verify from your server, not from the customer's device.
  • Check status every 5 seconds and stop on PAID or EXPIRED.
  • Calling verify again after PAID is safe — it returns the same data, so you can retry freely.
  • Save the order_id with your order so you never deliver twice.
  • Always display the amount from the QR response, not your own value.
08

Try it live

Call the real API from here. Paste one of your API keys, create a QR, then check its status.

GET/autoqr.php
// The response will show here
09

Gram Wallet

No UPI account that works with the gateway? Complete KYC on the Wallet page. After approval you get a Wallet API key (starts with WAL_).

  • Use the Wallet API key with autoqr.php and autoverify.php — the requests and responses are exactly the same as for any other app.
  • When an order is PAID, the amount is added to your wallet.
  • Each payment can be withdrawn after the holding period shown on the Wallet page.
  • Withdrawals go to the bank account or UPI ID in your KYC. A small fixed fee applies per withdrawal.
  • Changing payout details sends your KYC for review again. Your balance stays safe.
10

Webhooks

Get a message on your server the moment a payment is PAID or a QR EXPIRES. No need to keep calling autoverify.php.

Customer paysScans your QR
We verifyIn a few seconds
We POST to youSigned JSON
You deliverReply 200

Setup in 3 steps

1Add your URL

Open the Webhook page, paste a link on your server and turn it on.

2Copy the secret

Put your signing secret in your server code to check every webhook.

3Send a test

Press Send test and see what we sent and what you replied.

Events

payment.success

Payment verified. Deliver the order.

payment.expired

QR time ended, no payment. Cancel the order.

test

Sent when you press Send test.

Request we send

A POST to your URL with a JSON body and these headers:

X-Gram-Event

Event name, like payment.success

X-Gram-Timestamp

Unix time when we sent it

X-Gram-Signature

sha256= + HMAC-SHA256 of timestamp.body with your secret

X-Gram-Delivery

Unique ID of this delivery

json
{
    "event": "payment.success",
    "order_id": "GRAM4EB00B3C",
    "status": "PAID",
    "amount": 50,
    "gateway": "kotak",
    "created_at": "03-11-2026 12:00:11",
    "expires_at": "03-11-2026 12:05:11",
    "utr": "629837440196",
    "transaction_id": null,
    "payer": "Rahul Kumar",
    "payment_time": "03-11-2026 12:01:42",
    "sent_at": "03-11-2026 12:01:44"
}
json
{
    "event": "payment.expired",
    "order_id": "GRAM4EB00B3C",
    "status": "EXPIRED",
    "amount": 50,
    "gateway": "kotak",
    "created_at": "03-11-2026 12:00:11",
    "expires_at": "03-11-2026 12:05:11",
    "sent_at": "03-11-2026 12:07:12"
}

Receive it on your server

php
<?php
// gram-webhook.php — put this file on your server
$secret = 'whsec_your_secret_here';   // Webhook page → Signing secret

$body = file_get_contents('php://input');
$ts   = $_SERVER['HTTP_X_GRAM_TIMESTAMP'] ?? '';
$sig  = $_SERVER['HTTP_X_GRAM_SIGNATURE'] ?? '';

// 1. Check the signature
$expected = 'sha256=' . hash_hmac('sha256', $ts . '.' . $body, $secret);
if (!hash_equals($expected, $sig) || abs(time() - (int)$ts) > 300) {
    http_response_code(401);
    exit('bad signature');
}

$data = json_decode($body, true);

// 2. Handle the event (only once per order_id)
if ($data['event'] === 'payment.success') {
    // mark order $data['order_id'] as paid and deliver it
} elseif ($data['event'] === 'payment.expired') {
    // cancel order $data['order_id']
}

// 3. Reply 200 quickly
http_response_code(200);
echo 'ok';
python
# Flask example
import hmac, hashlib, time
from flask import Flask, request

SECRET = b"whsec_your_secret_here"
app = Flask(__name__)

@app.post("/gram-webhook")
def gram_webhook():
    body = request.get_data()
    ts = request.headers.get("X-Gram-Timestamp", "")
    sig = request.headers.get("X-Gram-Signature", "")

    expected = "sha256=" + hmac.new(SECRET, ts.encode() + b"." + body, hashlib.sha256).hexdigest()
    if not hmac.compare_digest(expected, sig) or abs(time.time() - int(ts or 0)) > 300:
        return "bad signature", 401

    data = request.get_json()
    if data["event"] == "payment.success":
        pass  # mark data["order_id"] as paid and deliver it
    elif data["event"] == "payment.expired":
        pass  # cancel data["order_id"]

    return "ok", 200

If your server is down

We try again, all within the 5 minutes the QR is valid:

Now+10s+20s+30s+1m+1.5m+1.5m

For payment.expired we try 3 more times (10s, 30s, 1m). Every try is shown on your Webhook page.

Good to know

Always check the signature

Never mark an order paid without it.

Reply fast

Send any 2xx within 8 seconds. Do slow work after.

Use order_id

Retries can send the same event twice. Deliver each order once.

Polling still works

autoverify.php works as before. Use both if you like.

11

Payment page

A ready checkout page with your brand. It slides up on your website (like Razorpay) — no QR screen to build yourself.

payment_url

Every autoqr.php response has it. Open it, redirect to it, or send it on WhatsApp.

checkout.js

Opens the same page as a popup on your website. Slides up from the bottom on phones.

Design

Your name, logo, theme and support contacts. Set it on the Payment Page → Design tab.

1. Create the order on your server

php
<?php
// your server: create the order and send the link to your page
$r = json_decode(file_get_contents(
  'https://gateway.anujbots.in/autoqr.php?api_key=YOUR_API_KEY&amount=499'
), true);

$orderId    = $r['data']['order_id'];     // save it with your order
$paymentUrl = $r['data']['payment_url'];  // open with GramCheckout, or redirect / send it

2. Open the checkout on your website

html
<!-- 1. Add once on your page -->
<script src="https://gateway.anujbots.in/checkout.js"></script>

<script>
// 2. Your server calls autoqr.php and sends data.payment_url to the browser
GramCheckout.open({
  payment_url: paymentUrlFromYourServer,
  onSuccess: function (p) {
    // p.order_id, p.amount, p.utr  — show a thank-you message
    // Deliver only after your server confirms (webhook or autoverify.php)
  },
  onExpired: function (p) { /* QR time ended */ },
  onClose:   function (p) { /* p.paid = true / false */ }
});
</script>

What the customer sees

1Pay with an app

On phones: PhonePe, Paytm or any UPI app opens with the amount filled in.

2Or scan the QR

On computers the QR is shown with a 5 minute timer.

3Success screen

Shows on its own after payment, then returns to your site.

Do not trust the browser alone

onSuccess is for showing a message. Deliver the order only after your server confirms with a webhook or autoverify.php.

No website?

Just redirect the customer to payment_url. After payment they go back to the page they came from.

13

Key security

Two tools on the Account page, next to every API key.

New key

Key leaked? Create a new one. The old key stops working right away. Pending orders keep working on the new key.

IP whitelist

Allow only your server IPs (up to 20, ranges like 203.0.113.0/24 work). Other IPs get IP_NOT_ALLOWED.

Payment pages and payment links keep working with an IP whitelist on, because they run on our side.