{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"4218fb4b-543d-40ec-90d8-011077a8bbe5","name":"VelPay API (1.0)","description":"# Authentication\n\nAPI requests are made at endpoint [https://api.velpay.io](https://api.velpay.io)\n\nThe API request must contain the following headers:\n\n1. `Content-Type: application/json`. All requests must be JSON.\n    \n2. `X-Merchant-Key: merchant public key`. You can get an **Merchant publick key** and a **Merchant secret key** (used to sign requests) in your [personal account](https://merchant.velpay.io).\n    \n3. `X-Timestamp: current time in UNIX format` . The value passed must not differ significantly from the current server time, otherwise the request will be rejected.\n    \n4. `X-Signature: request signature`. The signature is generated using the HEX algorithm (HMAC-SHA512(**data**, **secret_key**))\n    \n\n- **data** - a string composed of the values of the request parameters, **data** includes both parameters from the **body** of the **POST** request and **query** parameters from the **GET** request. To form a string you need:\n    \n    - sort the **data** keys alphabetically;\n        \n    - construct a string from their values, excluding nested objects and null;\n        \n    - add the header value **X-Timestamp** to the end of the received line;\n        \n    - convert string to lower case;\n        \n- **secret_key -** merchant's secret key for interaction via API in your [personal account](https://merchant.velpay.io).\n    \n\n### An example of generating a signature on a **PHP**\n\n``` php\nfunction getApiSign(array $data, string $secretKey, int $utcNow): string\n{\n    ksort($data);\n    $stringData = '';\n    foreach ($data as $value) {\n        if (in_array(gettype($value), ['array', 'object', 'NULL'])) {\n            continue;\n        }\n        if (is_bool($value)) {\n            $stringData .= $value ? 'true' : 'false';\n        } else {\n            $stringData .= $value;\n        }\n    }\n    $stringData .= $utcNow;\n    return hash_hmac('sha512', strtolower($stringData), $secretKey);\n}\n\n ```\n\n# Sandbox\n\nTo debug and test the connection to the API, a test server or sandbox is available at [https://testapi.velpay.io](https://testapi.velpay.io). The test server is intended for developers involved in connecting APIs and allows you to test the operation of the API client and the processing of typical server responses.\n\n---\n\nThe following bank cards are available for testing incoming payments on the test server:\n\n| **Card number** | **Description** | **CVC** | **Date** |\n| --- | --- | --- | --- |\n| 4917 9566 8954 2022 | Successful without 3ds | Any 3 digits | Any future date |\n| 5161 3139 6216 0371 | Successful with 3ds | Any 3 digits | Any future date |\n| 5180 9353 4950 7564 | Declined payments | Any 3 digits | Any future date |\n\n> To test **p2p** or **crypto** payments, you need to send the status of the payment in the **description** parameter, **success** or **failed** is available. \n  \n\n---\n\n> To test **payouts**, you need to send the status in the **description** parameter, **success** or **failed** is available. If you do not send a description, the payout will be in a pending status \n  \n\n---\n\n> To test **exchanges**, you need to send the status in the **description** parameter, **success** or **failed** is available. If you do not send a description, the exchange will be in a pending status \n  \n\n---\n\n# Transaction Statuses\n\n### Статуси транзакцій\n\n| Code       | Description                               | Final | Transaction type |\n|------------|-------------------------------------------|:-----:|------------------|\n| created    | Transaction created                        |  no   | all              |\n| pending    | Transaction pending                        |  no   | all              |\n| processing | Transaction in processing                  |  no   | all              |\n| successful | The transaction was successfully completed | yes   | all              |\n| failed     | Declined transaction                       | yes   | all              |\n| canceled   | Canceled by the user                       | yes   | payment          |\n| expired    | Timed out                                  |  no   | payment          |\n\n# Callbacks\n\nCallback is a service for sending the VelPay system the result of the method and a message about the finalization of the transaction status to a specified URL.\n\nTo use the Callback service, you must pass a link to the URL in the method execution request (in the callback_url parameter, if it is provided in the incoming arguments). After the method is completed, a request will be sent to the passed URL containing the results of its work and the status of the transaction.\n\nThe Callback request contain the following headers:\n\n1. `Content-Type: application/json`. All requests be JSON.\n    \n2. `X-Timestamp: current time in UNIX format` . The value passed must not differ significantly from the current server time.\n    \n3. `X-Signature: callback signature`. The signature is generated using the HEX algorithm (HMAC-SHA512(**data**, **secret_key**)). The signature is calculated by analogy with incoming requests.\n    \n\n- **data** - a string composed of the values of the request parameters, **data** includes both parameters from the **body**. To form a string you need:\n    \n    - sort the **data** keys alphabetically;\n        \n    - construct a string from their values, excluding nested objects and null;\n        \n    - add the header value **X-Timestamp** to the end of the received line;\n        \n    - convert string to lower case;\n        \n- **secret_key -** merchant's secret key for interaction via API in your [personal account](https://merchant.velpay.io).\n    \n\nThe body of the request will contain the object of the corresponding transaction. See objects description in [Responses](#98a33798-4842-4e84-a23e-0818b0c169ea)\n\nAfter sending a callback message, the service waits for a response with HTTP status 200 within 10 seconds.\n\nIf a response with status 200 is not received, the Callback service will repeat sending the request 5 more times at the following intervals:\n\n- **1 minute** after the previous request\n    \n- **5 minutes** after the previous request\n    \n- **15 minutes** after the previous request\n    \n- **30 minutes** after the previous request\n    \n- **60 minutes** after the previous request","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"33302129","team":6072244,"collectionId":"4218fb4b-543d-40ec-90d8-011077a8bbe5","publishedId":"2sA2rGveeA","public":true,"publicUrl":"https://docs.velpay.io","privateUrl":"https://go.postman.co/documentation/33302129-4218fb4b-543d-40ec-90d8-011077a8bbe5","customColor":{"top-bar":"3c4b7d","right-sidebar":"2d3654","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":"https://content.pstmn.io/794ea058-f634-4c2e-b764-6bcf64d502fa/SG9yaXpvbnRhbC5wbmc=","colors":{"top-bar":"3c4b7d","right-sidebar":"2d3654","highlight":"FF6C37"}},{"name":"light","logo":"https://content.pstmn.io/55eb1139-2edf-415b-90d9-fdd011252ca5/SG9yaXpvbnRhbC5wbmc=","colors":{"top-bar":"3c4b7d","right-sidebar":"2d3654","highlight":"FF6C37"}}]}},"version":"8.10.1","publishDate":"2024-05-23T12:51:59.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":"https://content.pstmn.io/55eb1139-2edf-415b-90d9-fdd011252ca5/SG9yaXpvbnRhbC5wbmc=","logoDark":"https://content.pstmn.io/794ea058-f634-4c2e-b764-6bcf64d502fa/SG9yaXpvbnRhbC5wbmc="}},"statusCode":200},"environments":[{"name":"API VelPay","id":"d0d79916-6f30-47fb-b36a-6e1d3c8e1921","owner":"33302129","values":[{"key":"url","value":"https://testapi.velpay.io","enabled":true,"type":"default"},{"key":"publicKey","value":"","enabled":true,"type":"default"},{"key":"secretKey","value":"","enabled":true,"type":"secret"},{"key":"timestamp","value":"","enabled":true,"type":"default"},{"key":"pmHasher","value":"","enabled":true,"type":"default"},{"key":"sign","value":"","enabled":true,"type":"any"}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/90da709e3394e3fc868abe9bd9e11f16c45969051a500b7305f1c4ceaba9f45d","favicon":"https://velpay.io/favicon.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"API VelPay","value":"33302129-d0d79916-6f30-47fb-b36a-6e1d3c8e1921"}],"canonicalUrl":"https://docs.velpay.io/view/metadata/2sA2rGveeA"}