Challan Payment
A challan creates a unique payment URL bound to a customer's name, mobile, email, and amount. Send the link by email and SMS; on click the customer is taken to a confirmation page where they verify their details, then on to the payment page.
There are two endpoints — they accept the same parameters:
/v1/requestchallan— creates the link and dispatches the email/SMS./v1/generatechallanurl— returns the URL only; you handle delivery.
Endpoint
POST https://pgbiz.omniware.in/v1/requestchallan
POST https://pgbiz.omniware.in/v1/generatechallanurl
Content-Type: application/x-www-form-urlencoded
Request parameters
api_keystring (36)required36-digit merchant key.
namestring (100)requiredName of the person to whom the invoice is addressed.
mobilestring (10)requiredPhone number of the recipient.
emailstring (100)requiredEmail ID of the recipient.
amountdecimal(15,2)requiredAmount the user needs to pay.
purposestring (100)requiredDescriptive string telling the user what they're paying for.
hashstring (255)requiredComputed as:
toUpper(sha512(SALT|amount|api_key|email|mobile|name|purpose))
Note the alphabetical-by-key order of values, salt-first. Same algorithm as everywhere else on the platform — see Hash calculation.
Sample request
- cURL
- PHP
- Node.js
curl -X POST https://pgbiz.omniware.in/v1/generatechallanurl \
-d "api_key=$API_KEY" \
-d "name=Amit Kumar" \
-d "mobile=9900990099" \
-d "email=amit@example.com" \
-d "amount=149.00" \
-d "purpose=Order 1001" \
-d "hash=$HASH"
$params = [
"api_key" => $apiKey,
"name" => "Amit Kumar",
"mobile" => "9900990099",
"email" => "amit@example.com",
"amount" => "149.00",
"purpose" => "Order 1001",
];
$params["hash"] = generateHashKey($params, $salt);
$res = httpPost("https://pgbiz.omniware.in/v1/generatechallanurl", $params);
const params = {
api_key: apiKey,
name: "Amit Kumar",
mobile: "9900990099",
email: "amit@example.com",
amount: "149.00",
purpose: "Order 1001",
};
params.hash = generateHash(params, salt);
const res = await fetch("https://pgbiz.omniware.in/v1/generatechallanurl", {
method: "POST",
body: new URLSearchParams(params),
}).then(r => r.json());
Response
{
"data": {
"url": "https://pgbiz.omniware.in/challan/b39b0596-73c4-4b7e-b63d-bbc13361e044",
"uuid": "b39b0596-73c4-4b7e-b63d-bbc13361e044",
"tnp_id": 81600
}
}
| Field | Description |
|---|---|
url | Distributable payment link. |
uuid | Unique identifier for this request. |
tnp_id | Another unique identifier — use with paymentStatusById if you need to look up status. |
Errors
| Code | Constant | Trigger |
|---|---|---|
221 | GEN-UNAUTHORIZED | api_key is incorrect, or hash is invalid. |
998 | GEN-INVALID-PARAMS | A required field is missing — name, email, mobile, amount, purpose, or hash. |
{
"error": {
"code": 221,
"message": "GEN-UNAUTHORIZED - The api key field is incorrect"
}
}
Reconciling the payment
When the customer pays, Omniware fires the standard payment S2S webhook (see S2S Webhooks) and the payment shows up in Payment Status by order_id / transaction_id the same way as any other payment.