Skip to content

Payin API

▶️ Create Payment Order

Request Parameters

Parameter NameTypeRequiredExampleDescription
mchIdstringINtest067Merchant ID / Note: The merchant number is not the merchant ID
mchOrderNostring202503110001Merchant Order ID
amountint10000The 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
currencystringINRCurrency, default is INR
phoneNumberString(30)6888889999Phone number, must start with [6-9] and be 10 digits long
payerEmailString123@gmail.comStandard email format must include @ and . where @ must be at least 2 characters long
accountNamestringUsername, 2-48 characters long
notifyUrlstringhttps://merchant.com/notifyCallback URL
signstring5E0AA05D…Signature Value
remarkstringRemark
returnUrlstringhttps://merchant.com/returnFront-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 NameTypeRequiredExampleDescription
mchIdstringLEtest067Merchant ID / Note: The merchant number is not the merchant ID
payOrderIdString(30)Le20250311182001Payment Order ID, either payOrderId or mchOrderNo is required
mchOrderNoString(30)202503110001Merchant Order ID, either payOrderId or mchOrderNo is required
executeNotifyBooleantrueWhether to execute the callback, if true, the payment center will initiate a callback to the merchant again, if false, it will not initiate
signString(32)C380BEC2BFD727A4B6845133519F3AD6Signature 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 review

Upon 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 NameTypeDescription / Description
payOrderIdstringPayment Order ID
paySuccTimestringPayment Success Time
amountstringAmount
mchIdstringMerchant ID
mchOrderNostringMerchant Order ID
channelPayNostringChannel Payment Number (UTR for India)
backTypestringNotification Type
channelCodestringChannel Code
statusstringOrder Status
errorMessagestringError Message: Returned when the order status is 3 (Failed)
signstringSignature Value