Request signing is used to verify the integrity of messages between the platform and merchants. Signing occurs in two scenarios:
request.body using the merchant private key (SHA256WithRSA: compute SHA-256 hash, then RSA-encrypt with private key to produce the digital signature);Signature signature = Signature.getInstance("SHA256withRSA");
signature.initSign(privateKey);
// When computing SHA256withRSA, convert byte stream with UTF-8 encoding to avoid incorrect signatures for Chinese parameters
signature.update(request.body);
byte[] signedHash = signature.sign();String signature = Base64.getEncoder().encodeToString(signedHash);signature request header.
Note: signing applies to request.body. When request.body is empty (e.g. query requests), no signature is required.Data encoding [utf-8]
"UTF-8"
API version. Current version is 2.0.0. Must be 2.0.0.
"2.0.0"
Transaction Type
- Use PAY for payment transactions
- Use VCC for VCC card transactions
PAY, CREDIT_CARD, 3D_PREAUTH_VOIDS, 3D_PREAUTH_COMPLETION, REFUND, VOIDS, QUERY, TRANSFER, DOWNLOAD, REGISTRATION, FILEUPLOAD, INQUIRYREGISTRATIONSTATUS, AUTHORIZE, VCC API access type
"s2s"
Message signature type
"RSA"
Institution ID
"2023010558663764"
Merchant ID
"2023010558663764"
Request time in RFC3339 format: yyyy-MM-ddTHH:mm:ss.SSSXXX. Must be within 2 minutes of current time.
"2024-05-24T14:29:32.682+08:00"
Card ID
"1655900976772226"
Merchant request trace ID
"1655900976772226"
freeze: freeze card; unfreeze: unfreeze card.
FREEZE, UNFREEZE "FREEZE"
OK
Whether the request succeeded
Response status code. 00000000 means success; other codes indicate failure. See system error codes.
"00000003"
Error message
"处理中"
Order status (see supplementary notes)
"PENDING"
Unique request trace ID. Provide this when reporting issues for troubleshooting.
"33fae7b7aed1233f"