How to Generate Signature
Signature are usually used in Virtual Account as verification method that the API are in a correct path and designated to the correct stakeholder. There are 2 types of Signature used in Virtual Account with SNAP Format VA:
1. Symmetric
Symmetric Signature usually used in payment notification process.
Formula:
Symetric-Signature : HMAC_SHA512 (clientSecret, stringToSign)
stringToSign = HTTPMethod +”:“+ EndpointUrl +":"+ AccessToken +":“+ Lowercase(HexEncode(SHA- 256(minify(RequestBody))))+ ":“ + TimeStamp
2. Asymmetric
Asymmetric Signature usually used in get access token especially B2B token for VA
Formula:
Asymmetric-Signature : SHA256withRSA (Private_Key, stringToSign)
stringToSign = client_ID + “|” + X-TIMESTAMP