Live API v1.0

RSM Gateway

Accept UPI payments from your website, bot or app. Generate payment links, dynamic QR codes, and verify transactions in real time.

01 Overview

RSM Gateway is a REST API with 4 endpoints. All responses are JSON. Both GET and POST are supported.

Base URL

https://rsmcheats.shop/gw

Endpoints

POST/qr.phpGenerate UPI QR + payment link
POST/verify.phpVerify transaction status
GET/status.phpGet order details
GET/orders.phpList all your orders

02 Authentication

Every request must include your API key and secret in headers.

# Headers required
X-API-Key: rsm_gw_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p
X-API-Secret: rsm_sec_x1y2z3a4b5c6d7e8f9g0h1i2j3k4l5m
Never expose your API secret in client-side code. Always call from server-side.

03 Payment Flow

Create QRPOST /qr.php
Show QRimg src
User PaysAny UPI app
VerifyPOST /verify.php
QR expires in 5 minutes. Poll verify.php every 5 seconds until you receive TXN_SUCCESS or EXPIRED.

04 Create Payment QR

Generate a UPI QR with your own Paytm account. Works through your API key + secret: send an amount for a fixed QR (the payer cannot change it), or leave it out / send 0 for an open QR (the payer types the amount; read the real amount from verify.php). Your Merchant ID, Merchant Key and UPI ID must be saved in Gateway Settings first.

Request

POST/api/v2/qr.php
ParameterTypeRequiredDescription
amountnumberNoINR, up to 2 decimals (e.g. 99.50). Missing or 0 = open QR.
namestringNoMerchant name shown in the UPI app (max 40). Default: your store name
purposestringNoPayment note shown to the user (max 50)
customer_namestringNoCustomer name (for reference)
customer_messagestringNoOptional note

Success Response

{
  "success": true,
  "order_id": "ORD_1773214714_a1b2c3d4",
  "gateway": "paytm",
  "qr_url": "https://api.qrserver.com/v1/create-qr-code/?...",
  "payment_link": "https://rsmcheats.shop/pay.php?id=ORD_...",
  "amount": 100.00,
  "payable_amount": 100.00,
  "expiry": 1773218314,
  "expires_in": 300
}

Code Examples

curl -X POST https://rsmcheats.shop/api/v2/qr.php \
  -H "X-API-Key: rsm_gw_xxxxx" \
  -H "X-API-Secret: rsm_sec_xxxxx" \
  -d "amount=100&purpose=Game+Topup&gateway=paytm"

05 Verify Payment

Check the transaction status of a previously created order. You only send your API key + secret (both required, GET or POST). Your Paytm Merchant Key stays on our server. Poll every 5–10 seconds; calls closer than 3 seconds to the previous check return PENDING without hitting the gateway.

Request

POST/api/v2/verify.php
ParameterTypeRequiredDescription
order_idstringYesOrder ID from /qr.php (orderid also accepted)

Response — Success

{
  "success": true,
  "status": "TXN_SUCCESS",
  "order_id": "ORD_1773214714_a1b2c3d4",
  "amount": "100.00",
  "utr": "210766238795",
  "paytm_reference": "2026031111106000023...",
  "timestamp": "2026-10-11 12:57:50"
}

Response — Pending

{
  "success": false,
  "status": "PENDING",
  "message": "Payment not received yet"
}

Code Example — Polling

// Poll every 5 seconds
while (true) {
    sleep(5);
    $v = verify('ORD_xxx');
    if ($v['status'] === 'TXN_SUCCESS') {
        // Deliver goods
        break;
    }
    if ($v['status'] === 'EXPIRED') {
        // Payment failed
        break;
    }
}

06 Status Codes

StatusSuccessMeaning
TXN_SUCCESStruePayment confirmed. Deliver goods.
PENDINGfalseStill processing. Retry in 5-10s.
EXPIREDfalseQR expired. Create new order.
TXN_FAILUREfalsePayment failed. Ask user to retry.
AMOUNT_MISMATCHfalseFixed QR was paid with less than the order amount (amount = paid, expected_amount = order). Do not deliver.
DUPLICATE_REFERENCEfalseThis bank/Paytm reference already settled another order. Do not deliver.

07 Error Codes

HTTPErrorSolution
401Missing API keyAdd X-API-Key header
401Invalid API secretCheck X-API-Secret header
403Gateway disabledContact admin or check dashboard
400Invalid amountUse a number with up to 2 decimals (or omit it for an open QR)
400Paytm not configuredSave Merchant ID, Merchant Key and UPI ID in Gateway Settings
429Too many QR requestsMax 30 QR per minute per key. Wait a minute
404Order not foundCheck order_id
502Gateway errorRetry after some time

08 Rate Limits

EndpointLimit
/qr.php30 requests / minute per key
/verify.php1 gateway check per order every 3 seconds (poll every 5–10s)
/status.php300 requests / minute
/orders.php60 requests / minute