Signature
1. Request Signature
1.1. Components of signature before hash:
• HTTP Method: In uppercase.
• Timestamp: Timestamp number in millis, Singapore timezone. The request will be failed if the timestamp is before or after 2 minutes.
• URL: The request URL without scheme and hostname.
• Querystring: The in-URL parameters without the prefix ?, un-encoded.
• Request Body: For string-based body, empty if not set. Must exactly same as the actually request body, including the invisible characters.
• D-TIMESTAMP: The timestamp value should be same as Timestamp component in signature.
• D-SIGNATURE: The signature string generated.
2.Response Signature
2.1. The customer will use the same signature components (HTTP method, timestamp, URL, querystring, and response body) to generate the signature string.
2.2. The signature is verified by comparing the generated signature with the D-SIGNATURE header in the response.
2.3. If the signatures match, the response is valid. If they do not match, the response should be rejected.
3.JAVA Signature Example
4.JavaScript Signature Example