Base URL: https://paymentupi.in (replace if your domain differs)
All endpoints use HTTPS and JSON unless specified. Never expose the Merchant API Key in customer-side JavaScript.
Merchant API endpoints require X-API-Key: YOUR_MERCHANT_API_KEY. Get the key from Admin → Gateway Settings.
POST /api/create-order.php
curl -X POST https://paymentupi.in/api/create-order.php \\
-H 'Content-Type: application/json' \\
-H 'X-API-Key: YOUR_MERCHANT_API_KEY' \\
-d '{"amount":"49.00","merchant_order_id":"WA-1001","customer_ref":"USER-123"}'Response:
{"ok":true,"order_id":"WPG...","amount":"49.00","currency":"INR","status":"PENDING","payment_url":"https://paymentupi.in/pay.php?id=WPG...","expires_at":"..."}Redirect the customer to payment_url.
POST /api/submit-utr.php — called by checkout page; merchant may also call it.
{"order_id":"WPG...","utr":"12345.67"}Reference must be 1–64 characters and unique. The full value is preserved exactly, including dots and punctuation; matching is case-sensitive. Surrounding SMS text and punctuation are allowed, but punctuation inside the submitted reference must match exactly. Alphanumeric boundaries prevent a short reference (12345) matching inside 123456 or A12345B. The browser does not submit an amount; the server always copies the immutable amount from the stored order. Editing browser requests cannot change the order amount. Submission alone never marks payment successful. It remains pending until a matching incoming-credit SMS is received.
GET /api/status.php?order_id=WPG...
Returns the order's status: PENDING, REVIEW, SUCCESS, FAILED or EXPIRED.
{"ok":true,"data":{"order_id":"WPG...","amount":"49.00","status":"PENDING","utr":"12345.67"}}After a matched payment becomes SUCCESS, the gateway sends an HTTPS POST to the callback URL configured in Admin Settings. Headers: X-Webhook-Signature: sha256=... and X-Webhook-Event-ID (use this as an idempotency key). The sender retries up to three times when delivery fails, so the receiver must be idempotent. Verify HMAC-SHA256 over the exact raw request body using the configured Activation Callback Secret.
{"event":"payment.success","order_id":"WPG...","merchant_order_id":"WA-1001","customer_ref":"USER-123","amount":"49.00","utr":"12345.67","status":"SUCCESS","paid_at":"2026-11-25 10:00:00"}Set a strong Activation Callback Secret in Admin Settings. The receiving WhatssApi endpoint must verify HMAC-SHA256 over the exact raw request body using that secret. Callback delivery is logged in Admin API logs; confirm the receiving endpoint returns HTTP 2xx.