Computing the digest
Guideline for generating the message digest
The signed Authorization header includes, among other claims, a sha256 digest of the HTTP request (note: the Finqware API only uses POST application/json requests similar to a GraphQL API).
Steps
take the json payload and compress it to a single-line json without any whitespaces
make sure you do not remove any useful whitespaces (eg: from a debtor name when submitting a payment)
it is recommended to use a standard json library to do that instead of your own regex
compute a Base64 (not URL-safe) encoded SHA-256 hash of the compressed json format
Note:
make sure your HTTP client sends the request with the json keys in the same order as in the payload used when computing the digest
Last updated