Signature

Each request must include a signature for validation purpose. Clients will be assigned Secret Key in separate documentation. The key will be processed into a signature through the following steps:

Parameters used:

  • Request UUID
  • Request Datetime
  • Community Code
  • Key
  • Service Name

Step 1 :

Combine the parameters used into the following order:

##Request UUID##Request Datetime##Community Code##Key##Service Name ##

Example :

Request UUID : 123ABC-DEF456
Request Datetime : 2017-08-08 09:17:45
Community Code : MYCOMMCODE
Key : S3cr317kEY
Service Name : SendInvoice

It will then become a series of string as shown below:

Result = ##123ABC-DEF456##2017-08-08 09:17:45##MYCOMMCODE##S3cr317kEY##SendInvoice##

Step 2 :

The result from Step 1 is uppercased into:

##123ABC-DEF456##2017-08-08 09:17:45##MYCOMMCODE##S3CR317KEY##SENDINVOICE##

Step 3 :

Hash the result from Step 2 by using sha256:

$sha256 = hash(sha256, '##123ABC-DEF456##2017-08-08 09:17:45##MYCOMMCODE##S3CR317KEY##SENDINVOICE##')

Result = 638f5fd9f590ce81b15570d32edaec03dab1498aa2525947411be6d6e2aa7a2d

This result from Step 3 will be used as the signature parameter value.