TezzPay logoTezzPay
TezzPay TezzPay
boltGet API KeydescriptionAPI DocslockLogin / Portal

Overview

TezzPay provides production-ready UPI payment APIs. Use these APIs to:

  • Create UPI payment orders and deep-links
  • Verify and track payment status in real time
  • Use our hosted checkout page (no frontend needed)
  • Receive webhook notifications on payment events
link Base URL
https://pay.tezzcorp.in/api/v1

Authentication

All API requests require two headers:

HTTP Headers
X-API-Key: upipg_live_your_api_key_here
X-API-Secret: your_api_secret_here
Content-Type: application/json
Get your API Key and Secret by registering here for ₹499 one-time activation.

Error Handling

All errors return a JSON body with success: false and an error message.

Error Response
{
  "success": false,
  "error": "Invalid API key",
  "code": "AUTH_001"
}
HTTP CodeError CodeMeaning
401AUTH_001Missing or invalid API key / secret
400VAL_001Missing required fields
404NOT_FOUNDOrder or session not found
429RATE_LIMITToo many requests (60/min)
500SERVER_ERRInternal server error

Create Order

POST /create-order

Create a new payment order. Returns a UPI deep-link and a hosted checkout URL.

Request Body

JSON
{
  "amount": 499.00,
  "order_id": "ORD_1234567890",
  "customer_name": "Arjun Sharma",
  "customer_email": "arjun@example.com",
  "customer_phone": "9876543210",
  "description": "Course enrollment fee",
  "redirect_url": "https://yourapp.com/payment/callback",
  "webhook_url": "https://yourapp.com/api/webhook"
}

Response

JSON
{
  "success": true,
  "session_id": "sess_8f3a2b1c9d4e",
  "order_id": "ORD_1234567890",
  "amount": 499.00,
  "upi_deep_link": "upi://pay?pa=merchant@okaxis&pn=TezzCorp&am=499.00&tn=ORD_1234567890&cu=INR",
  "checkout_url": "https://pay.tezzcorp.in/pay/sess_8f3a2b1c9d4e",
  "qr_url": "https://pay.tezzcorp.in/api/v1/qr/sess_8f3a2b1c9d4e",
  "expires_at": 1719993600
}

Verify Payment

POST /verify

Verify a payment by session ID or your order reference.

cURL
curl -X POST https://pay.tezzcorp.in/api/v1/verify \
  -H "X-API-Key: upipg_live_..." \
  -H "X-API-Secret: your_secret" \
  -H "Content-Type: application/json" \
  -d '{"session_id":"sess_8f3a2b1c9d4e"}'

Response

JSON
{
  "success": true,
  "session_id": "sess_8f3a2b1c9d4e",
  "order_id": "ORD_1234567890",
  "status": "SUCCESS",
  "amount": 499.00,
  "upi_txn_id": "407011234567",
  "paid_at": 1719993410,
  "customer": {
    "name": "Arjun Sharma",
    "email": "arjun@example.com",
    "phone": "9876543210"
  }
}

Possible status values: PENDING · SUCCESS · FAILED · EXPIRED

Check Status (Polling)

GET /status/{session_id}

Poll the payment status. Suitable for hosted checkout auto-confirmation (every 3 seconds).

cURL
curl https://pay.tezzcorp.in/api/v1/status/sess_8f3a2b1c9d4e \
  -H "X-API-Key: upipg_live_..." \
  -H "X-API-Secret: your_secret"

Hosted Checkout

Use our pre-built checkout page — no frontend code needed. Just redirect the user to the checkout_url returned by Create Order.

URL
https://pay.tezzcorp.in/pay/{session_id}

Features:

  • Animated UPI QR code with live scan line
  • 15-minute session timer with countdown bar
  • Auto-detection of payment confirmation (polls every 3s)
  • Redirect to your redirect_url on success/failure
  • Mobile-first, works on all devices

Webhooks

TezzPay sends an HTTP POST to your webhook_url when payment status changes.

Webhook Payload (JSON)
{
  "event": "payment.success",
  "session_id": "sess_8f3a2b1c9d4e",
  "order_id": "ORD_1234567890",
  "amount": 499.00,
  "upi_txn_id": "407011234567",
  "timestamp": 1719993410,
  "signature": "hmac_sha256_hex_of_payload"
}
Always verify the HMAC-SHA256 signature using your API Secret before processing webhooks.

Signature Verification (PHP)

PHP
$payload = file_get_contents('php://input');
$sig     = $_SERVER['HTTP_X_SIGNATURE'] ?? '';
$secret  = 'your_api_secret';

$expected = hash_hmac('sha256', $payload, $secret);
if (!hash_equals($expected, $sig)) {
    http_response_code(401);
    exit('Invalid signature');
}

$data = json_decode($payload, true);
// Process $data['event'] ...

Android Integration (Java)

Java (Android OkHttp)
OkHttpClient client = new OkHttpClient();

String json = new JSONObject()
    .put("amount", 499.00)
    .put("order_id", "ORD_" + System.currentTimeMillis())
    .put("customer_name", "Customer Name")
    .put("customer_email", "customer@email.com")
    .put("customer_phone", "9876543210")
    .put("description", "Purchase")
    .put("redirect_url", "yourapp://payment/result")
    .toString();

Request request = new Request.Builder()
    .url("https://pay.tezzcorp.in/api/v1/create-order")
    .addHeader("X-API-Key", "upipg_live_your_key")
    .addHeader("X-API-Secret", "your_secret")
    .addHeader("Content-Type", "application/json")
    .post(RequestBody.create(json, MediaType.parse("application/json")))
    .build();

client.newCall(request).enqueue(new Callback() {
    @Override
    public void onResponse(Call call, Response response) throws IOException {
        String body = response.body().string();
        JSONObject res = new JSONObject(body);
        String checkoutUrl = res.getString("checkout_url");
        // Open checkout_url in WebView or Custom Tab
        Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(checkoutUrl));
        startActivity(intent);
    }
});

PHP Integration

PHP (cURL)
function upipg_create_order(array $data, string $api_key, string $api_secret): array {
    $ch = curl_init('https://pay.tezzcorp.in/api/v1/create-order');
    curl_setopt_array($ch, [
        CURLOPT_POST           => true,
        CURLOPT_POSTFIELDS     => json_encode($data),
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER     => [
            'X-API-Key: ' . $api_key,
            'X-API-Secret: ' . $api_secret,
            'Content-Type: application/json',
        ],
    ]);
    $res = curl_exec($ch);
    curl_close($ch);
    return json_decode($res, true);
}

// Usage
$result = upipg_create_order([
    'amount'          => 499.00,
    'order_id'        => 'ORD_' . uniqid(),
    'customer_name'   => 'Arjun Sharma',
    'customer_email'  => 'arjun@example.com',
    'customer_phone'  => '9876543210',
    'description'     => 'Payment',
    'redirect_url'    => 'https://yoursite.com/payment/callback',
], 'upipg_live_your_key', 'your_secret');

if ($result['success']) {
    header('Location: ' . $result['checkout_url']);
    exit;
}

cURL Quick Reference

cURL — Create Order
curl -X POST https://pay.tezzcorp.in/api/v1/create-order \
  -H "X-API-Key: upipg_live_YOUR_KEY" \
  -H "X-API-Secret: YOUR_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 499.00,
    "order_id": "TEST_001",
    "customer_name": "Test User",
    "customer_email": "test@example.com",
    "customer_phone": "9000000000",
    "description": "Test Payment"
  }'