The translation was generated automatically and may contain mistakes

Format of response

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 .

Payment system Returns a response in JSON format. The response string encoding is UTF-8.

Upon receipt of a response is necessary check his signature. The response depends on request .

In the case of query Errors The payment system will return the code and description of the error .

Example of response

JSON
{ "version":"2-03-73","data":"eyJoZWFkZXIiOnsic3RhdHVzIjoiRVJST1IiLCJ0cyI6IjE3MjE2NjM3NTUiLCJlcnJvciI6eyJjb2RlIjoiRVJSX05PVF9GT1VORCIsIm1lc3NhZ2UiOiLQl9Cw0L/RgNC+0YjQtdC90L3QsNGPINGC0YDQsNC90LfQsNC60YbQuNGPINC90LUg0L3QsNC50LTQtdC90LAiLCJlcnJvcl9pZCI6IkUxMDlCMjc4LTQ4NDItMTFFRi05MkU5LUI3NjgyQTAzQTM2RiJ9fX0=","signature":"chlRZXQWloj9ubiKmrxX120+diWRtyS9RxekeVMCJrhdciWe0TD4QAZpfA7R9cCN+GpJLsTDhqBiBpRjXePXOxIJT+fuHICSZiAf6B27KGKsFkgk7aT+YDdaov6IVD1hoHHwY9++vJNi236nbIYRMhYgA6/RiXWCyXcPii8b1SS3eNW/9Nd3CLgFgO5lKZZA0EELnBXAwpRNFxmoLqE1eiSP38aEJhAvZZVn+QAaKx6rsRuc+ht0awQf+62NEb6rXYwtd3YDM0U+ArFPH3v6Y8U25ZEBLd4gat/pu7F741B4VngZCtQrBd6r17xS/64+V+dDaLsOnJaLxWQZ1rObkQ==" }

Main fields of response

Field
Description
version
The current version of the system API, including minor changes. For example, if you provide a version of 2-03 The answer will come back. 2-03-72 .
data
JSON response data encoded in a BASE64 line with no separators. Contains a structure with fields: • header The title of the answer. Structure header depends on the result of the request: successfully or unsuccessfully . If the answer is — ERROR contains error data. • body A set of fields that depend on the request. It may come back empty.
signature
Response signature — formed based on the object data By analogy signature of the request . Upon receipt of a response, a signature is required. check .

Header Structure header Successful processing of the request

If the request is successfully processed, the title header It will contain a field status with meaning OK .

Field
Type
Description
status
string
The result of the request. If successful, it matters.. OK .
ts
number
Time stamp of request formation. Format: Number, Unix Timestamp . Example: 1714137378

**Example JSON fields header **

JSON
"header": { "ts": 1721663752, "status": "OK" }

Header Structure header Error handling the request

If the request is handled incorrectly, the header header It will contain a field status with meaning ERROR and object error with the code and description of the error.

Field
Type
Description
status
string
The result of the request. If successful, it matters: ERROR .
ts
number
Time stamp of response in format Unix Timestamp . Example: 1721663755
error
object
Code and Error Description In case of request error. The error may be general or specific to that request. It contains fields: • code The error code. Type: string . • error_id The error ID. Type: string . • message A description of the error. Type: string . In the event of an error in several transmitted parameters message may contain a structure with a list of these parameters as a pair ключ:значение where ключ - the name of the incorrectly transmitted parameter in the XPath format, значение An error description for this parameter.

**Example JSON fields header **

JSON
"header": { "status": "ERROR", "ts": "1721663755", "error": { "code": "ERR_NOT_FOUND", "message": "Запрошенная транзакция не найдена", "error_id": "E109B278-4842-11EF-92E9-B7682A03A36F" } }