Rocket IndexerEnterprise

PayIN API reference

Create and manage PayIN requests over HTTPS. Your Client Key and Secret live in Dashboard → API — treat both like passwords.

Create PayIN order

POST /apiv1/create-order application/x-www-form-urlencoded
ParameterTypeDescription
customer_mobileIntegerCustomer's mobile number
customer_namestringCustomer's name
user_tokenstringYour API Client Key
amountfloatPayment amount
order_idstringYour unique order identifier
redirect_urlurlURL to redirect to after payment (auto-redirects 5s after success)
remark1stringCustom remark 1 (optional)
remark2stringCustom remark 2 (optional)
Success response
{
  "status": true,
  "message": "Order Created Successfully",
  "result": {
    "orderId": "1234561705047510",
    "payment_url": "https://payment.rocketindexer.com/payment/TOKEN"
  }
}
Error response
{ "status": false, "message": "order_id already exists" }

Check PayIN order status

POST /apiv1/check-order-status application/x-www-form-urlencoded
ParameterTypeDescription
user_tokenstringYour API Client Key
order_idstringAlphanumeric order ID to look up
Success response
{
  "status": true,
  "message": "Transaction Successfully",
  "result": {
    "txnStatus": "SUCCESS", // or "PENDING"
    "orderId": "784525sdD",
    "amount": "1",
    "date": "2024-01-12 13:22:08",
    "utr": "454525454245" // only when SUCCESS
  }
}

Webhook payload

When configured in Dashboard → API, we send a form-urlencoded POST to your webhook URL the moment a payment settles.

FieldTypeDescription
statusstringTransaction status, e.g. SUCCESS
order_idstringYour original order ID — used to generate the hash
customer_mobilestringCustomer phone number
amountstringTransaction amount
utrstringUnique transaction reference number
hashstringHMAC-SHA256 signature for verification
remark1 / remark2stringCustom remarks passed at order creation

Verifying webhook signatures

Hash formula: hash = HMAC-SHA256(order_id, YOUR_SECRET_KEY). Always compare using a constant-time function — never == or ===.
webhook.php
$secret_key = 'YOUR_SECRET';
$expected = hash_hmac('sha256', $order_id, $secret_key);

if (!hash_equals($expected, $received_hash)) {
  http_response_code(403);
  exit('Invalid signature. Webhook rejected.');
}

// Signature verified — safe to mark the order paid
if ($status === 'SUCCESS') {
  updateOrderStatus($order_id, 'paid', $utr);
}
http_response_code(200);
echo 'OK';
webhook.js (Node)
const crypto = require('crypto');
const expected = crypto.createHmac('sha256', secretKey).update(orderId).digest('hex');
const a = Buffer.from(receivedHash), b = Buffer.from(expected);
const ok = a.length === b.length && crypto.timingSafeEqual(a, b);

Error handling

If status is false in any response, read message for details. Common causes: missing/invalid user_token, a duplicate order_id, or an unrecognized order on status checks.