Subscribe to P2P large amount payment account changes
# Subscribe to P2P large amount payment account changes
This interface is provided by merchants that connect to P2P business. If the switch for subscribing to large-value bank card payment changes is turned on, the platform will request this interface when there is a change in the large-value bank card payment account. When receiving an HTTP request, please respond with httpcode=200 (HTTP response status code), otherwise the notification will be sent 16 times within 5 hours.
# Notification Parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
id | string | Y | Bank card unique ID | 10 |
bankName | string | Y | Bank Name | State Bank of India |
accountNumber | string | Y | Bank card number | 41459877630 |
name | string | Y | Payee Name | Sachin Pujeri |
ifscCode | string | Y | IFSC | SBIN0000899 |
branchName | string | Y | Branch Name | sagar Bank |
status | int | Y | Current status of bank card 0-online 1-offline 2-deleted | 0 |
operationType | int | Y | Operation type 0-Add 1-Edit 2-Go online 3-Go offline 4-Delete | 0 |
operationTime | long | Y | Trigger time (timestamp: milliseconds) | 1705128180000 |
sign | string | Y | sign | EcCs7GlN1UzEAflgpyJ4lKIHe9+lS/gdkcEvWI +nSlcvvz1c+Dg4Zi8sFmpYaoOMGxS3/BY66F Gq2TXzVGhAciq2kFmwZFtYbFvr7xPTaNf/n0R u7ZtV/jo3uBnfc9/JI6XlEWlIbPtGsVpH7CLhzgh dqIT+YbPEdhX2ZKETFTTfIj6PzctY9eOsZ51Yb HYnXv0jTWn1hdPoDofAF9RmoNaXK4FGYibQ BSvVA6w4rM6hCXlbTeHdMc4askrZlrHeG3uhyD 34VlXs74cdzAZ+oROMXBcgXR4ObsJVDFz9tsJ H92iaxlKTF0lEFZa/To5ezLpHvTOAK0uY/K6IxvO AAg== |
# Asynchronous Notification Message Example
{
"id":"25",
"bankName":"State Bank of India",
"accountNumber":"41459877630",
"name":"Sachin Pujeri",
"ifscCode":"SBIN0000899",
"branchName":"sagar Bank",
"status":0,
"operationType":0,
"operationTime":1705128180000,
"sign":"EcCs7GlN1UzEAflgpyJ4lKIHe9+lS/gdkcEvWI+nSlcvvz1c+Dg4Zi8sFmpYaoOMGxS3/BY66FGq2TXzVGhAciq2kFmwZFtYbFvr7xPTaNf/n0Ru7ZtV/jo3uBnfc9/JI6XlEWlIbPtGsVpH7CLhzghdqIT+YbPEdhX2ZKETFTTfIj6PzctY9eOsZ51YbHYnXv0jTWn1hdPoDofAF9RmoNaXK4FGYibQBSvVA6w4rM6hCXlbTeHdMc4askrZlrHeG3uhyD34VlXs74cdzAZ+oROMXBcgXR4ObsJVDFz9tsJH92iaxlKTF0lEFZa/To5ezLpHvTOAK0uY/K6IxvOAAg=="
}
# Asynchronous Notification Code Implementation Demo
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;
@RestController
@RequestMapping("callback")
public class TestCallbackController {
/**
* Platform public key
*/
public static String PLATFORM_PUB_KEY = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1dad35S74jfLPbHJh8P0jDHiTvkxwrtITK97ovVu19B24UdiHyHoEZgtNlS6alFQj1ULQ71d6EPh2rWCNkS2b5HGQXwDYBtwvesVQ8h4Sf3eVPTTLGw3BS7Os4vtDEN6BezMdv3sUG2N5i6JF+5H4CQTq3MD2Cx6u/Cv7oFOdFqeDT0AH+TR7uyZxn69OtkJaHHr834EUcdShJKKMQtbC11WCcut7ilDUgdvZnThiVTq7cfl8mcC9FDKcQ9bMWamScWIB5cJQdUW23Kr0c1NvZlpgPS8U5VODM4Uc4muHJPD2cJmquuJ+4AGP36rEk27lUB3h7B6JI1QGiuh1yyPDwIDAQAB";
/**
* P2P large amount receiving account change callback
* @param paramMap
* @param response
*/
@PostMapping("payIn")
public void payInCallback(@RequestBody Map<String, Object> paramMap, HttpServletResponse response) throws Exception{
boolean verifyResult = CheeseTradeRSAUtil.verifySign(paramMap, PLATFORM_PUB_KEY);
if (verifyResult) {
//Signature verification successful
//Order notification business processing logic
String name = (String)paramMap.get("name");
String branchName = (String)paramMap.get("branchName");
String bankName = (String)paramMap.get("bankName");
Integer operationType = (Integer)paramMap.get("operationType");
String id = (String)paramMap.get("id");
String accountNumber = (String)paramMap.get("accountNumber");
String ifscCode = (String)paramMap.get("ifscCode");
Integer status = (Integer)paramMap.get("status");
Long gmtEnd = (Long)paramMap.get("operationTime");
} else {
//Signature verification failed
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
}
}
}