Calculating the Signature
All the calls to our Deposits APIs will contain anAuthorization field on the header used to ensure request integrity and to authenticate yourself since you will use your own secret key (API Signature) to generate and encrypt a hash.
It has to be created using HMAC-SHA-256 (RFC 2104) encoding and the payload must include the following details:
X-Date + X-Login + JSONPayload
Use your API Signature to generate the Authorization value
Authorization field on the header of the requests will contain the string “D24 ” plus the hash generated, in the following format:
D24 is the name of the API’s authorization scheme. Send it exactly as shown: D24, a space, and the signature.Notes
- The
X-Loginis your login API Key, it can be retrieved from Pandablue Connect by going to
Operations ➡️ Accounts ➡️ API Access ➡️ Deposit credentials ➡️ API Key. - The
X-Dateis the date in ISO8601 Datetime with Timezone. Format expected: ISO8601 Datetime with Timezone:yyyy-MM-dd'T'HH:mm:ssZ. E.g.:2020-06-21T12:33:20Z. - The
Authorizationvalue is case sensitive and must include all the above mentioned values. - The
JSONPayloadis the exact same JSON you sent in the body of the request. - In case the
JSONPayloadvalue is empty (for example in the status or payment methods endpoints), use an empty string ("") instead. - The
JSONPayloadshould be converted to UTF-8 before hashing it to prevent Invalid Signature error when sending characters with different encodings.
Examples
Check the examples in the different languages on how to properly calculate the Signature. You can also check the code of our SDKs in Java and PHP to see how it is calculated.- Java
- C#
- PHP