0% FEES Accept direct UPI payments into your own bank with Zero Gateway Charges & 0-second instant settlement. Get Started Free →
Infi Pay

API & Integration Documentation

Base URL: https://infipay.in/api/v1 · All requests and responses are JSON · Amounts are in rupees as strings ("499.00").

Payment Lifecycle

  1. Your server or plugin calls Create payment with the order amount and your unique order ID.
  2. Redirect the customer to payment_url (hosted checkout with dynamic QR and 1-tap UPI app buttons).
  3. When payment is confirmed in your bank account, Infi Pay sends an HMAC-signed webhook and redirects the customer to your redirect_url.
  4. Always rely on the signed webhook (or a Get payment status call) to mark orders fulfilled.

Authentication

Generate an API key in Dashboard → API & Webhooks. Send it on every request:

Authorization: Bearer ip_live_xxxxxxxxxxxxxxxx

If your server strips the Authorization header you can send X-Api-Key: ip_live_… instead. Keep the key secret — use it only from your server, never in browser JavaScript.

Create payment

POST /payments

FieldTypeDescription
amountstringrequiredRupees, ₹1 – ₹1,00,000.00, e.g. "499.00"
order_idstringrecommendedYour unique order reference (max 64). Repeating the same order_id + amount returns the same payment (safe retries).
descriptionstringoptionalShown to the customer and in the UPI note.
customerobjectoptional{ "name", "phone", "email" }
redirect_urlstringoptionalWhere to send the customer after payment.
metadataobjectoptionalAny JSON (max 4 KB), returned in webhooks.
expires_in_minutesintoptional2 – 60, default 10.
curl -X POST https://infipay.in/api/v1/payments \
  -H "Authorization: Bearer ip_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": "499.00",
    "order_id": "ORD-1001",
    "description": "Premium Subscription",
    "customer": { "name": "Ravi", "phone": "9876543210" },
    "redirect_url": "https://yourshop.com/thank-you"
  }'

Response 201:

{
  "ok": true,
  "existing": false,
  "payment": {
    "id": "pay_3f9c1a7d2b6e4f10",
    "order_id": "ORD-1001",
    "status": "CREATED",
    "amount": "499.00",
    "payable_amount": "499.00",
    "currency": "INR",
    "payment_url": "https://infipay.in/pay/pay_3f9c1a7d2b6e4f10",
    "upi_intent": "upi://pay?pa=paytm.s3h81o7@pty&pn=...&am=499.00&cu=INR",
    "expires_at": "2026-11-25T14:10:00+05:30"
  }
}

Get payment

GET /payments/{id} — returns { "ok": true, "payment": { ... } }.

Status values: CREATED (waiting), PAID, EXPIRED, CANCELLED.

List payments

GET /payments?status=PAID&limit=20&order_id=ORD-1001&before=pay_xxx

Cancel payment

POST /payments/{id}/cancel — only for CREATED payments.

POST /payment-links with { "title": "Invoice Payment", "amount": "999.00", "description": "..." }.

Webhooks

Set your URL in Dashboard → API & Webhooks. Infi Pay dispatches signed events: payment.paid, payment.expired, payment.cancelled.

POST https://yourshop.com/webhooks/infipay
X-InfiPay-Event: payment.paid
X-InfiPay-Timestamp: 1764063000
X-InfiPay-Signature: sha256=5d41402abc4b2a76b9719d911017c592...

{ "id": "evt_...", "event": "payment.paid", "created_at": "...", "data": { ...payment... } }

Verify signature: compute HMAC_SHA256(timestamp + "." + raw_body, webhook_secret) and compare with X-InfiPay-Signature.

Redirect after payment

When the customer completes the payment, they are redirected to redirect_url?payment_id=pay_…&order_id=…&status=paid.

Errors

HTTPCodeMeaning
400INVALID_AMOUNT, INVALID_ORDER_ID …Fix request parameters
401UNAUTHORIZEDMissing or incorrect API key
402PLAN_LIMIT_REACHEDMonthly plan collection limit reached
404NOT_FOUNDPayment ID not found
409DUPLICATE_ORDER_IDOrder ID already exists
429RATE_LIMITEDToo many requests, slow down

PHP example

<?php
$ch = curl_init("https://infipay.in/api/v1/payments");
curl_setopt_array($ch, [
  CURLOPT_POST => true,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ["Authorization: Bearer ip_live_xxx", "Content-Type: application/json"],
  CURLOPT_POSTFIELDS => json_encode([
    "amount" => "499.00",
    "order_id" => "ORD-1001",
    "redirect_url" => "https://yourshop.com/thank-you",
  ]),
]);
$res = json_decode(curl_exec($ch), true);
header("Location: " . $res["payment"]["payment_url"]);

WordPress & WooCommerce Integration

Accept zero-commission UPI payments on your WooCommerce store with automated order status updates.

How to Install in 3 Easy Steps

  1. Download the ready-to-use plugin file: infipay-woocommerce.zip.
  2. In WordPress Admin, go to Plugins → Add New → Upload Plugin and select the zip file. Click Activate.
  3. Go to WooCommerce → Settings → Payments → Infi Pay (Direct UPI), paste your API Key and Webhook Secret from your Infi Pay Dashboard, and click Save.
Webhook Configuration: Set your Webhook URL in Infi Pay Dashboard to:
https://your-wordpress-site.com/?wc-api=WC_Gateway_InfiPay