Payin API
▶️ Create Payment Order
Request Parameters
| Parameter Name | Type | Required | Example | Description |
|---|---|---|---|---|
| mchId | string | ✅ | INtest067 | Merchant ID / Note: The merchant number is not the merchant ID |
| mchOrderNo | string | ✅ | 202503110001 | Merchant Order ID |
| amount | int | ✅ | 10000 | The amount (in cents) must be a positive integer multiple of 100 / Amount, the actual amount is 100, but here you need to pass in 10000 |
| currency | string | ✅ | INR | Currency, default is INR |
| phoneNumber | String(30) | ❌ | 6888889999 | Phone number, must start with [6-9] and be 10 digits long |
| payerEmail | String | ❌ | 123@gmail.com | Standard email format must include @ and . where @ must be at least 2 characters long |
| accountName | string | ❌ | Username, 2-48 characters long | |
| notifyUrl | string | ✅ | https://merchant.com/notify | Callback URL |
| sign | string | ✅ | 5E0AA05D… | Signature Value |
| remark | string | ❌ | Remark | |
| returnUrl | string | ❌ | https://merchant.com/return | Front-end Redirect URL |
Request Example
jsx
POST /api/pay/neworder
mchId="The merchant ID provided by the operation"
mchOrderNo="202503110001"
amount=10000
currency="INR"
phoneNumber="6888889999"
payerEmail="123@test.com"
accountName="12312312"
remark="123123"
notifyUrl="http://localhost:8081/api/pay/notifyUrl"
returnUrl="http://www.baidu.com/return.htm"
sign="79B1E1C4F3290FBB6CB2FA2CAE2BA67C"Response Example
jsx
{
"retCode": "SUCCESS", // Return Code
"retMsg": "OK", // Return Message
"payOrderId": "Le20250311182001",
"payParams": {
"payMethod": "urlJump", // Payment Method
"payUrl": "https://checkout.lemonpayment.com/#/checkout/100010/checkoutorderId=Le20250311182001", // Payment URL
"qrString": "00020101021226820014br.gov.bcb.pix2560qrcode.pagsm.com.br/pix/24998ae7-43f8-4dc4-9b07-c53cf2c61deb5204000053039865802BR5907EASYPAY6008SaoPaulo62070503***63047216", // QR Code String
"url": null, // Deep Link (qrString or url must be provided)
"upi": "test123@test123" // UPI
},
"sign": "ABCD1234..." // Signature Value
}⚠️ SUCCESS It indicates that the order has been successfully created, but not successfully paid.
▶️Query Payment Order
| Parameter Name | Type | Required | Example | Description |
|---|---|---|---|---|
| mchId | string | ✅ | LEtest067 | Merchant ID / Note: The merchant number is not the merchant ID |
| payOrderId | String(30) | ✅ | Le20250311182001 | Payment Order ID, either payOrderId or mchOrderNo is required |
| mchOrderNo | String(30) | ✅ | 202503110001 | Merchant Order ID, either payOrderId or mchOrderNo is required |
| executeNotify | Boolean | ✅ | true | Whether to execute the callback, if true, the payment center will initiate a callback to the merchant again, if false, it will not initiate |
| sign | String(32) | ✅ | C380BEC2BFD727A4B6845133519F3AD6 | Signature Value, please refer to the Signature Algorithm |
Request Example
jsx
POST /api/pay/orderquery
mchId="LEtest067"
payOrderId="Le20250311182001"
mchOrderNo="20160427210604000490"
executeNotify=true
sign="C380BEC2BFD727A4B6845133519F3AD6"返回示例
jsx
{
"retCode": "SUCCESS", // Return Code
"retMsg": "Return message", // Return Message
"status": 2, // Payment Status
"productId": "8001", // Product ID
"amount": 10000, // Amount (in cents)
"channelPayNo": "testutr13", // UTR
"currency": "INR", // Currency
"mchOrderNo": "20160427210604000490", // Merchant Order ID
"payOrderId": "Le20250311182001", // Payment Order ID
"errorMessage": "error message", // Error Message (returned when failed)
"paySuccTime": 1730111845123 // Payment Success Time (Unix timestamp in milliseconds)
}▶️ Payment Callback
jsx
notify?payOrderId=test1997967825452457986&paySuccTime=1768445162000&amount=20000&mchId=ydsh1073&mchOrderNo=Test17651876220001&channelPayNo=12300000000&sign=31415C93341312BE0B8724C7B7D465A2&backType=2&channelCode=10024&status=2&errorMessage=Rejected after secondary reviewUpon receipt, the merchant needs to verify the signature and return "success".
If the merchant does not return a response or the signature is incorrect, the system will retry the callback (with intervals of 60/120/180/240/300 seconds).
💡
Parameter Description
| Parameter Name | Type | Description / Description |
|---|---|---|
| payOrderId | string | Payment Order ID |
| paySuccTime | string | Payment Success Time |
| amount | string | Amount |
| mchId | string | Merchant ID |
| mchOrderNo | string | Merchant Order ID |
| channelPayNo | string | Channel Payment Number (UTR for India) |
| backType | string | Notification Type |
| channelCode | string | Channel Code |
| status | string | Order Status |
| errorMessage | string | Error Message: Returned when the order status is 3 (Failed) |
| sign | string | Signature Value |
