Fiat Currency Disbursement Asynchronous Notification
# Asynchronous Notification of Disbursement
This interface is provided by the merchant. The platform requests this interface when the collection is successful When an HTTP request is received, please respond with httpcode=200 (HTTP Response Status Code). Otherwise, 16 notifications will be repeatedly sent within 5 hours.
# Best Practice
- For determining success, orderStatus is 1.
- On refund determination: orderStatus is 2. This situation generally occurs in case of user complaints and bank risk control returns. Merchants should record related information and handle it according to their own business processes (a callback success will be received before getting this callback status).
- If the merchant's business logic fails to process, please change the HTTP response status code to 400 or 500 (non-200).
- Cheezeepay may send multiple callbacks with the same status. The merchant should handle this compatibility accordingly. If the merchant's own business has been processed successfully, they must return the HTTP response status code to 200.
- Please ensure to verify the callback IP➕signature verification.
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
merchantId | String | Y | Merchant ID | CH10001165 |
mchOrderNo | String | Y | Merchant Order Number | A202401190011213735 |
platOrderNo | String | Y | Platform Order Number | 1749769124316319744 |
orderStatus | int | Y | Order Status | 1-Success 2-Refund |
payAmount | String | Y | Order Actual Payment Amount | 900 |
amountCurrency | String | Y | Order Amount Currency | THB |
fee | String | Y | Handling Fee | 90 |
feeCurrency | String | Y | Handling Fee Currency | THB |
gmtEnd | long | Y | Completion Time (Timestamp: Milliseconds) | 1706012459000 |
sign | String | Y | Signature | meWKb9FsuZl8trJIZSrxCu5d5EV+3rT1o9Noaq ZVuPHS1o/Lb9T7Cnq7X1gmocLw3N/Mwvh3Z K++z7x8H2n6SJAQO10cvt2vGkiJ8kmOLhi7PI8 FQemTPNBS1kjBhxluKhwNJjgksS1v6lOv+6tfpI seBMJBQ0mCWUEe+quRgjnWoEKKSWACzg2u FxQE3AX7hFBhFyWo3Z+dJMXn6d0TCNwzTnd BRGMEgdoKK8HpN/B+NC7V2gkt+vW65EPnwg 3EuFrGzO4eRTbTkWyT7Av28/p3b4uJCPjQYDe iYCYFj7oPQOxY4OuDR+kyrTzVygRXqfK7vfh0cJ zSArtQhc+Xsw== |
# Asynchronous Notification Message Example
{
"merchantId":"CH10001165",
"mchOrderNo":"A202401190011213735",
"platOrderNo":"1749769124316319744",
"orderStatus":1,
"payAmount":"900",
"amountCurrency":"THB",
"fee":"90",
"feeCurrency":"THB",
"gmtEnd":1706012459000,
"sign":"meWKb9FsuZl8trJIZSrxCu5d5EV+3rT1o9NoaqZVuPHS1o/Lb9T7Cnq7X1gmocLw3N/Mwvh3ZK++z7x8H2n6SJAQO10cvt2vGkiJ8kmOLhi7PI8FQemTPNBS1kjBhxluKhwNJjgksS1v6lOv+6tfpIseBMJBQ0mCWUEe+quRgjnWoEKKSWACzg2uFxQE3AX7hFBhFyWo3Z+dJMXn6d0TCNwzTndBRGMEgdoKK8HpN/B+NC7V2gkt+vW65EPnwg3EuFrGzO4eRTbTkWyT7Av28/p3b4uJCPjQYDeiYCYFj7oPQOxY4OuDR+kyrTzVygRXqfK7vfh0cJzSArtQhc+Xsw=="
}
# 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";
/**
* payOutCallback
* @param paramMap
* @param response
*/
@PostMapping("payOut")
public void payOutCallback(@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 merchantId = (String)paramMap.get("merchantId");
String mchOrderNo = (String)paramMap.get("mchOrderNo");
String platOrderNo = (String)paramMap.get("platOrderNo");
Integer orderStatus = (Integer)paramMap.get("orderStatus");
String payAmount = (String)paramMap.get("payAmount");
String amountCurrency = (String)paramMap.get("amountCurrency");
String fee = (String)paramMap.get("fee");
String feeCurrency = (String)paramMap.get("feeCurrency");
Long gmtEnd = (Long)paramMap.get("gmtEnd");
} else {
//Signature verification failed
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
}
}
}