The translation was generated automatically and may contain mistakes
How to Form a Request Signature
This section is intended for developers who have already connected VK Pay.
If you want to connect and start accepting payments through VK Pay, write to vkpay_solutions@vk.team .
More about the service - in the section About VK Pay .
All requests to Payment system API need to sign. To do this, you will need a private access key, which you were given when connecting to VK Pay.
To get a request signature
- 1.
Take the URL request without schema and domain, with the leading symbol "/", but without the ending "/". For example, in the case of a request
https://api.money.mail.ru/money/2-03/transaction/get/You need to take a line to sign../money/2-03/transaction/get. - 2.
Create a JSON fields
dataconsisting of a headerheaderand request bodiesbody, and encode the data into a BASE64 string.**Example JSON fields
data**JSON{"body":{"transaction_id":"5B5FEF96-CCFF-11EB-B2C9-F3FB221CDBE2"},"header":{"ts":1721663752,"client_id":196669}}Example of BASE64 encoding
eyJib2R5Ijp7InRyYW5zYWN0aW9uX2lkIjoiNUI1RkVGOTYtQ0NGRi0xMUVCLUIyQzktRjNGQjIyMUNEQkUyIn0sImhlYWRlciI6eyJ0cyI6MTcyMTY2Mzc1MiwiY2xpZW50X2lkIjoxOTY2Njl9fQ== - 3.
Consistently combine the string obtained from the URL in step 1, encoded in the BASE64-line field
dataStep 2 and the private access key.
The example uses the value of the access key:928e0c62564fdb4c862e422f8ca3c49e578c7cdf.Example of Concatenation
/money/2-03/transaction/geteyJib2R5Ijp7InRyYW5zYWN0aW9uX2lkIjoiNUI1RkVGOTYtQ0NGRi0xMUVCLUIyQzktRjNGQjIyMUNEQkUyIn0sImhlYWRlciI6eyJ0cyI6MTcyMTY2Mzc1MiwiY2xpZW50X2lkIjoxOTY2Njl9fQ==928e0c62564fdb4c862e422f8ca3c49e578c7cdf - 4.
From the string obtained after combining, calculate the cryptographic hash SHA256 in the HEX representation. Use the received value in the parameter
signaturewith sending a Request .1658b9a8c0e8c86d4e9785e44901a8d30ff59d37