Fiat (Rupee) Proxy Pay Order Query
# Code Example
TopPaySignUtil Click to Get Code Example
import com.google.gson.Gson;
import java.util.HashMap;
import java.util.Map;
public class PayOrderQuery {
//MCH_ID: Merchant ID
//Please log in to the merchant background, click Personal Center > Personal Information, and obtain the merchant ID in the basic information.
private static final String MCH_ID = "S820211021094748000001";
private static final String MCH_PRIVATE_KEY = "MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAJU8gKFKD0luIYx7X8+JRdCIE0UDBctS6LjXxWLEv/EO7jDBTid6zYP1KmNgpd2DAWWtBFBSQ+gcNwVZZSBHJiSDqVvvJVs2FEbeBvfdv4X93+IYRAXksBasSW5Tpdshbo82pVL4V7wuKCuFLk9UxBHbpQjWAbfyF66RmwIbZD71AgMBAAECgYBjPe7UU2nDDSfmQg0++CyjNjqKRC5QPfxhH6w1uF1kMueXKJWOj42n2RutJpJmsj31nY8m0u4xpsG4HvCu/GGSFhhKZCHLvzp41oY2ubYj9nuFNU//81LycQjulWo2y0UUBY0k2piEt+SwPaiUNbT6nMxNMjlnjRe2okp/3rw+KQJBANG3YlZWoVbCEqzy64bJJLxiPsCA5ErGB0NzRGitq44xkhqGtR8ZZQyVz40pruNa58d73O2xyJSy5+fmZGn4E+sCQQC2LBnguj0CSCKub0mPDcunTTz9V79VXBBZdlB1/YGmRUx2s4sQrJNZS7rL4EqBQ3maIRnG+s+AXCSTfsYrV6CfAkEAxugnVfpelhoGepEAgNuggyivmgfl/2Gpm/jk5l/qOjib+ZrQiQmeBPzGWX4yiSM8eMDrP2sC8r5pJFMp5DRONwJBAJ4n4XuSFJ9jgwCPy3vvzSv9SYLk6E6yM9uHdUlKgoGYzk6Lh6M9QFuY/J49plFdBDiEnj16yCU3WeXXfTJpzB8CQQDMNMR/rIOTE9xGybS3mlQbt22AUnO6XhupWcckEKW4nPGxATwYBQzCY3i/9FTGN0vA+9ZPC2cwHtNxI2kXf3Vp"; // 商户私钥
private static final String REQ_URL = "https://india-openapi.toppay.asia/pay/get";
public static void main(String[] args) throws Exception {
query();
}
private static void query() throws Exception {
// Assemble parameters according to the interface requirements
Map<String, String> requestParams = new HashMap<>();
requestParams.put("merchantCode", MCH_ID);
requestParams.put("orderNum", "T1642593166888");
requestParams.put("timestamp", "1745377181");
// Format the parameters, calculate the signature, and add the signature value to the request parameters
String source = TopPaySignUtil.paramFormat(requestParams);
requestParams.put("sign", TopPaySignUtil.sign(MCH_PRIVATE_KEY, source));
// Serialize the parameters into JSON and initiate a POST request
String postJson = new Gson().toJson(requestParams);
System.out.println("Post Json Params:" + postJson);
String responseJson = TopPaySignUtil.doPost(REQ_URL, postJson);
System.out.println("Response Msg:" + responseJson);
}
}
# Request Address
- Request Method : POST
- Request Address : https://india-openapi.toppay.asia/pay/get
# Request Parameters
| Parameter | Required | Description | Example |
|---|---|---|---|
| merchantCode | Y | Merchant ID | S820190712000002 |
| orderNum | Y | Merchant order number | T1231511321515 |
| timestamp | Y | Timestamp (seconds), Get the system real-time time stamp | 1745377181 |
| sign | Y | RSA signature | ja6R8eukQ... |
# Request Message Example
{
"merchantCode": "S820211021094748000001",
"orderNum": "T1642593166888",
"timestamp": "1745377181",
"sign": "lGw1OJcuUL0MGaIq44U2u2bFM5dalJJuT/G6mQWbIBT9dmVAJaLwR125emPDXYYSdnOtNxja86A2VJJLf40BCg2HevHolebvt2ay3ukCQaUhwNkIGz4KF0Ud+XMUA36LoFTWZbDYv9y8vgCnWxwZFKj7ePrfLxc+TA7jpqv65lQ\u003d"
}
# Response Parameters
- Outer Unified Return Structure
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| code | int | Y | Interface response code | 0 represents success, others represent failure |
| message | String | Y | Interface response message | Return specific response information |
| data | Json | Y | Interface response parameters | Refer to the internal structure of the data field below |
- Data Field Internal Structure
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| platOrderNum | String | Y | Platform order number | PI1453242857400963072 |
| merchantCode | String | Y | Merchant ID | S820211021094748000001 |
| orderNum | String | Y | Merchant order number | 23645782 |
| status | int | Y | Order status (indicator of order success) | 10: created 20: processing 30: success 40: failure |
| orderAmount | decimal | Y | Order amount(Unit: 1 rupees, collect-order not support decimals) | 888 |
| realAmount | decimal | Y | Credited or donated amount(Unit: 1 rupees, collect-order not support decimals) | 888 |
# Response Message Example
{
"success": true,
"code": 0,
"message": "Success",
"data": {
"platOrderNum": "PAY1483771634191044608",
"merchantCode": "S820211021094748000001",
"orderNum": "T1642593166888",
"status": 30,
"orderAmount": "888",
"realAmount": "888"
}
}