Signature Creation
Requests for interaction with the payment system shall be signed by using SHA256 algorithm.
To create a signature be required:
In case of POST request, requestData request body is sorted alphabetically and encoded in BASE64
In case of GET request, convert Query params to JSON. FROM: https://prapi.tarlanpayments.kz/transaction/api/v1/system/client/cards?merchant_id=123&project_id=124&project_client_id=999 TO: { "merchant_id" : 123, "project_client_id" : "999", "project_id" : 124} After conversion, sort alphabetically and encode in BASE64.
Concatenate encoded request body (base64EncodedData) and secret (issued to the merchant by a payment insitution)
Using hashing function SHA256 hash the obtained result (dataToSign)
Add signature to the request header Authorization: Bearer sign
The entire request body is included in the signature, except for fields with an empty string value ""
The additional_data field is not involved in signature creating