The access token should be included in Authorization header of every transaction sent to API Management. The authentication is valid for 15 minutes, otherwise you will be required to request new Access Token.
Field Name
Field Type
Mandatory
Field Description
Content-type
String
M
Media type of the resource.
X-TIMESTAMP
String
M
Client’s current local time in ISO-8601 format
X-SIGNATURE
String
M
Created using asymmetric signature SHA256withRSA algorithm
Based on the specification above, merchant should use asymmetric signature SHA256withRSA for Access Token API.
Merchant should use this formula to create X-SIGNATURE for Access Token API: Client ID + “|” + Timestamp encrypted with merchant’s private key by using SHA256withRSA algorithm
X-SIGNATURE value for encryption will be: G1234325-SNAP\|2023-07-31T07:10:00+07:00
same value as X-CLIENT-KEY + “|” + X-TIMESTAMP
4
By using merchant’s private key to encrypt the value with SHA256withRSA algorithm, merchant will generate iv5YorKVVFOFS59l0HChDvPe+HeoE/jY5CfVgCg5i16nj5/DVnKg49ilkv8PyeU7y38apHhgO+cUrvkfUs5BhDD69yLn7xp8hzN9RcR0UDy5+nCrQ3GGCVSzZJvlEXN+TB0j4Q6pMsjrq4+YRoyDa4mTlsjJTU9aGjLRFBYgY4MyMQ5x11JyLnoFwbS8TJ5e/q4mUozrp49VyHe7OQSFnJNwvMSFrDyAIxoOK0IZQIlY29PaDIFcWoR+RJAY42H2FryjJcPpNfeercbkj9jsBLV3wmEKiNoN6lgFFLk5QicDnAAQzL45s92EYeCqDNuTTJOydaJbUqEo1d/ZPVNBtQ==
5
Final result of merchant's header will be: Content-type: application/json X-TIMESTAMP: 2023-07-31T07:10:00+07:00 X-CLIENT-KEY: G1234325-SNAP X-SIGNATURE: <SIGNATURE SAMPLE RESULT>