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
| Parameter | Type | Description |
|---|---|---|
| customer_mobile | Integer | Customer's mobile number |
| customer_name | string | Customer's name |
| user_token | string | Your API Client Key |
| amount | float | Payment amount |
| order_id | string | Your unique order identifier |
| redirect_url | url | URL to redirect after payment |
| remark1 | string | Custom remark 1 (optional) |
| remark2 | string | Custom 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');
}