UUPIQRPayDocsDashboard

API Documentation

Accept UPI payments directly to your bank account. Zero transaction fees.

BASE URL
https://upiqrpay.in/api/v1

Get Started

  1. Sign up at upiqrpay.in/register
  2. Connect a payment merchant from your dashboard
  3. Copy your API key from the dashboard
  4. Start accepting payments

Authentication

Pass your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Create Order

POST/api/v1/order/create

Creates a payment order and returns a QR code with payment URL.

Request

curl -X POST https://upiqrpay.in/api/v1/order/create \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 100,
    "order_id": "ORDER_12345",
    "customer_name": "Rahul Sharma",
    "customer_phone": "9999999999",
    "redirect_url": "https://yoursite.com/thank-you",
    "webhook_url": "https://yoursite.com/webhook"
  }'

Response

{
  "success": true,
  "data": {
    "payment_id": "UPG123ABC",
    "amount": 100,
    "order_id": "ORDER_12345",
    "qr_code": "data:image/png;base64,...",
    "upi_link": "upi://pay?pa=...",
    "pay_url": "https://upiqrpay.in/pay/UPG123ABC",
    "expires_at": "2026-05-29T08:00:00Z",
    "status": "pending"
  }
}

Redirect your customer to pay_url or embed the QR code.

Check Order Status

GET/api/v1/order/status/:payment_id
curl https://upiqrpay.in/api/v1/order/status/UPG123ABC \
  -H "Authorization: Bearer YOUR_API_KEY"

Status values: pending, success, expired, cancelled

Webhooks

We'll POST to your webhook_url when payment status changes.

Sample Payload

{
  "event": "payment.success",
  "payment_id": "UPG123ABC",
  "order_id": "ORDER_12345",
  "amount": 100,
  "status": "success",
  "utr_number": "424123456789",
  "paid_via": "bharatpe",
  "paid_at": "2026-05-29T07:30:00Z"
}

Verify Signature (PHP)

<?php
$payload = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_UPIQRPAY_SIGNATURE'];
$secret = "YOUR_WEBHOOK_SECRET";

$expected = hash_hmac('sha256', $payload, $secret);

if (hash_equals($expected, $signature)) {
    $data = json_decode($payload, true);
    if ($data['event'] === 'payment.success') {
        // Mark order paid in your DB
    }
}
http_response_code(200);
?>

Redirect Parameters

After payment, customer is redirected to your redirect_url with status:

Success:    ?status=success&payment_id=X&order_id=Y&utr=Z
Failed:     ?status=failed&payment_id=X&order_id=Y&reason=expired
Cancelled:  ?status=cancelled&payment_id=X&order_id=Y
Important: Do not add funds based on URL params alone. Always verify via webhook (it's HMAC-signed).

Error Codes

200OKRequest succeeded
400Bad RequestMissing or invalid parameters
401UnauthorizedInvalid API key
403ForbiddenAccount inactive
404Not FoundResource not found
500Server ErrorSomething went wrong
Need help? support@upiqrpay.in