Guru Pay Gateway — API reference

🔒 API access needs a one-time unlock of ₹700.00. Unlock now to get your guru_ key.

One endpoint, one action field. POST JSON (or form data) and authenticate with your API key.

Endpointhttps://recharge.gurupaygateway.com/api-index.php
MethodPOST (application/json)
Authapi_key in body, or X-Api-Key / X-Guru-Key header
Webhook receiverhttps://recharge.gurupaygateway.com/webhook.php

1. Wallet balance fetch-balance

Request
{
  "action":  "fetch-balance",
  "api_key": "YOUR_API_KEY"
}
Response
{
  "status":  "success",
  "balance": 500.00
}

2. Operators list operators-list

Request
{
  "action":  "operators-list",
  "api_key": "YOUR_API_KEY",
  "type":    "prepaid"          // optional: prepaid | dth | gift
}
Response
{
  "status": "success",
  "data": [
    { "operator_id": 1, "operator_name": "Airtel", "type": "prepaid" },
    { "operator_id": 6, "operator_name": "Tata Play", "type": "dth" }
  ]
}

3. Fetch plans fetch-plans

Request
{
  "action":      "fetch-plans",
  "api_key":     "YOUR_API_KEY",
  "operator_id": 1
}
Response
{
  "status": "success",
  "operator_name": "Airtel",
  "type": "prepaid",
  "plans": {
    "Data": [ { "rs": 299, "desc": "1.5GB/day 28 days", "validity": "28 days" } ]
  }
}

4. Find operator (prepaid) find-operator

Request
{
  "action":  "find-operator",
  "api_key": "YOUR_API_KEY",
  "number":  "9720450911"
}
Response
{
  "status": "success",
  "data": { "operator": 1, "circle": 22 }
}

5. Pay recharge / buy gift card pay-recharge

Request
{
  "action":   "pay-recharge",
  "api_key":  "YOUR_API_KEY",
  "number":   "9720450911",
  "operator": 1,
  "amount":   "299",
  "order_id": "MY_ORDER_1"      // optional, a-z0-9_ max 60, unique
}
Response
{
  "status":  "success",
  "message": "Request accepted.",
  "data": {
    "order_id":      "MY_ORDER_1",
    "number":        "9720450911",
    "amount":        "299",
    "operator_name": "Airtel",
    "txn_ref":       "1587603145",
    "status":        "Success",
    "type":          "prepaid"
  }
}

6. Recharge status recharge-status

Request
{
  "action":   "recharge-status",
  "api_key":  "YOUR_API_KEY",
  "order_id": "MY_ORDER_1"
}
Response
{
  "status": "success",
  "data": { "order_id": "MY_ORDER_1", "status": "Success", "txn_ref": "1587603145" }
}

7. Add money (wallet top-up link) add-money

Request
{
  "action":  "add-money",
  "api_key": "YOUR_API_KEY",
  "amount":  "500"
}
Response
{
  "status":      "success",
  "payment_url": "https://pay.zapupi.com/rec-pay-....",
  "order_id":    "RWAM17808379769921"
}

8. Money status money-status

Request
{
  "action":   "money-status",
  "api_key":  "YOUR_API_KEY",
  "order_id": "RWAM17808379769921"
}
Response
{
  "status":   "success",
  "order_id": "RWAM17808379769921",
  "txn_id":   "ZAPUPI44EFA8761CC5D713",
  "amount":   500,
  "payment":  "Success"
}

Voucher codes (txn_ref)

For gift cards txn_ref is either a plain voucher code or a JSON-encoded object with several fields. Always try to JSON-parse it first and render every key you get back.

$ref = $data['txn_ref'];
$parsed = json_decode($ref, true);
if (is_array($parsed)) {
    foreach ($parsed as $label => $value) {
        echo ucfirst($label) . ': ' . $value . PHP_EOL;   // code, Pin, Validity, ...
    }
} else {
    echo 'Voucher code: ' . $ref;
}

Webhooks

Save your URL under API keys & webhook. We POST JSON and expect HTTP 200 with {"status":"ok"}.

Recharge event
{
  "order_id":      "GPR2608141201ABC123",
  "number":        "9720450911",
  "amount":        "299",
  "operator_id":   "1",
  "operator_name": "Airtel",
  "status":        "Success",
  "type":          "recharge",
  "recharge_type": "prepaid",
  "txn_ref":       "1587603145"
}
Wallet top-up event
{
  "order_id": "RWAM17810136488608",
  "amount":   "500.00",
  "status":   "success",
  "txn_id":   "ZAPUPIDD762381F7D1D733",
  "type":     "add_money"
}

Error handling

Every failure returns {"status":"error","message":"..."}.

MessageMeaning
Invalid api detailsWrong or revoked API key
Account is deactivatedAccount suspended by admin
Insufficient balanceWallet balance too low — top up first
Duplicate order_idorder_id already used
Invalid operatorOperator ID not found or disabled
Invalid amountAmount not valid for this operator
Order not foundorder_id does not belong to your account