Пример генерации подписи

import hmacSHA256 from 'crypto-js/hmac-sha256';
const secret = '7a395ee6-de9e-4225-a82c-04612683ed65';
var raw = JSON.stringify({
    "id": "123",
    "request_proprietary_id": "456789ab-89ab-cdf-0123-466789abcdf0",
    "merchant_request_id": "SDFG-TRR3U-HNGF-ST-UIKN",
    "initial_amount": "1000.00",
    "amount_to_pay": "1001.00",
    "crypto_amount": "10.9926349346",
    "amount_with_fee": "900.0",
    "crypto_amount_with_fee": "9.8933714411",
    "crypto_rate": "90.97",
    "status": "processing",
    "created": "2024-05-30T00:37:53.672461+03:00",
    "closed": "2024-05-30T00:37:53.672461+03:00",
});
var sha256Hash = hmacSHA256(raw.toString(), secret).toString();
console.log(sha256Hash)

Last updated