PayIN API

Create and manage PayIN requests. All requests must be made over HTTPS in production. Credentials (Client Key / Secret) are in Dashboard → API.

Create PayIN Order

POST /apiv1/create-order · Content-Type: 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 after payment
remark1stringCustom remark 1 (optional)
remark2stringCustom remark 2 (optional)
{
  "status": true,
  "message": "Order Created Successfully",
  "result": {
    "orderId": "1234561705047510",
    "payment_url": "https://yourhost/payment/TOKEN"
  }
}

Check PayIN Order Status

POST /apiv1/check-order-status · form fields: user_token, order_id

{
  "status": true,
  "message": "Transaction Successfully",
  "result": {
    "txnStatus": "SUCCESS",
    "orderId": "784525sdD",
    "amount": "1",
    "date": "2024-01-12 13:22:08",
    "utr": "454525454245"
  }
}

Webhook

Form-urlencoded POST to your webhook URL with fields: status, order_id, customer_mobile, amount, utr, hash, remark1, remark2.

Hash: HMAC-SHA256(order_id, YOUR_SECRET_KEY). Compare with constant-time equality (hash_equals / crypto.timingSafeEqual).
$expected = hash_hmac('sha256', $order_id, $secret_key);
if (!hash_equals($expected, $received_hash)) {
  http_response_code(403);
  exit('Invalid signature');
}