{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"57b6f207-1e9f-4e79-884b-313b15de1c5f","name":"Amatic API","description":"For Seamless Wallet integration, GitSlotPark system accesses the player's wallet in the licensee's system in realtime to retrieve player's balance and to perform credit, debit and cancel transactions. This communication is handled by the GitSlotPark api server.\n\n- RESTful service with lightweight JSON-formatted requests/responses\n- Requests are made via HTTP POST method, containing JSON request object in request body (all  \n    responses should contain header \"content-type: application/json\")\n- Served over HTTPS - to ensure security and data privacy, unencrypted HTTP is not supported\n    \n\nIn order to be able to utilize Seamless Wallet, the Licensee must implement Callback service in their system. Using this service, system will work with the player’s balance in the Licensee system.\n\nThe Callback service must implement the following operations:\n\n- GetBalance\n- Withdraw\n- Deposit\n    \n- BetWin\n    \n- RollbackTransaction\n    \n\nAs for authentication, each request contains a cryptographic hash (parameter sign) calculated from the data to be transmitted.\n\nThe only expected HTTP Status Code is 200 (OK). Business logic related errors are communicated directly in response JSON data content.\n\nPaths to individual Service resources listed below are relative to the base path where the Service is hosted. For example, if the base path is [https://casino.com/THE/WalletService](https://casino.com/THE/WalletService) and the resource to be accessed is GetBalance, then the request has to be made to [https://casino.com/THE/WalletService/GetBalance](https://casino.com/THE/WalletService/GetBalance).\n\n# **Creating Data Sign**\n\nHMAC-SHA-256 (RFC 2104) is used for checking the integrity of the data sent between the systems. The flow for the creation of the sign is the following:\n\n- A message is created as a concatenation of parameters in a specified order.\n- A HMAC-SHA-256 code (32 bytes) is generated using a key, which is associated with the licensee.\n- The code is converted into a string that is a hexadecimal representation of the code (64 uppercase characters).\n    \n\n**Code Samples**\n\nTest your sign computing implementation for a sample operation using the following data:\n\n| PARAMETER | VALUE |\n| --- | --- |\n| agentID | Partner01 |\n| userID | Player01 |\n| amount | 12.3 |\n| transactionID | 474e1a293c2f4e7ab122c52d68423fcb |\n| roundID | ab9c15f2efdd46278e4a56b303127234 |\n\nConcatenating parameters we get input into the hash function **`Partner01Player0112.30474e1a293c2f4e7ab122c52d68423fcbab9c15f2efdd46278e4a56b303127234`**\n\nPlease note that the amount always has to be adjusted to exactly 2 decimal places.\n\nUsing hash function and secret key 1234567890 we get hash (converted to hexadecimal)\n\n**475D834ACC3AB61D7DF4EA42751C6275387BC1787A098D2D0E091698D9BF2043**\n\nBelow we provide examples of code computing SIGN in some of the major programming languages\n\n``` csharp\n    public static string GetSign(string key, string message) {\n    System.Security.Cryptography.HMAC hmac =\n    System.Security.Cryptography.HMAC.Create(\"HMACSHA256\");\n    hmac.Key = System.Text.Encoding.UTF8.GetBytes(key);\n    byte[] hash = hmac.ComputeHash(System.Text.Encoding.UTF8.GetBytes(message));\n    return BitConverter.ToString(hash).Replace(\"-\", \"\").ToUpperInvariant();\n}\n\n ```\n\n``` php\nfunction GetSign($key, $message) {\n    return strtoupper(hash_hmac('sha256', pack('A*', $message), pack('A*', $key)));\n}\n\n ```\n\n``` java\npublic static String GetSign(String key, String message) throws Exception \n{\n    javax.crypto.Mac mac = javax.crypto.Mac.getInstance(\"HmacSHA256\");\n    byte[] keyBytes = key.getBytes(\"UTF-8\");\n    byte[] messageBytes = message.getBytes(\"UTF-8\");\n    mac.init(new javax.crypto.spec.SecretKeySpec(keyBytes, mac.getAlgorithm()));\n    return ByteArray2HexString(mac.doFinal(messageBytes));\n}\npublic static String ByteArray2HexString(byte[] b) {\n    java.math.BigInteger bi = new java.math.BigInteger(1, b);\n    return String.format(\"%0\" + (b.length << 1) + \"X\", bi);\n}\n\n ```\n\n# Supported Languages\n\n| **Language** | **Code** |\n| --- | --- |\n| English | en |\n| French | fr |\n| German | de |\n| Italian | it |\n| Spanish | es |\n| Portuguese | pt |\n| Greek | el |\n| Russian | ru |\n| Polish | pl |\n| Turkish | tr |\n| Romanian | ro |\n| Swedish | sv |\n| Bulgarian | bg |\n| Chinese | zh |\n\n# Result Codes\n\n| **Code** | **Description** |\n| --- | --- |\n| 0 | Success |\n| 1 | General error  <br>Check message for more information |\n| 2 | Wrong input parameters  <br>Check message for more information |\n| 3 | Invalid Sign  <br>Check if valid key was used and if the data was sent in a valid format |\n| 4 | Invalid Agent.  <br>Unknown agent id or agent is disabled |\n| 5 | User ID not found |\n| 6 | Insufficient funds  <br>Insufficient funds available to complete the transaction |\n| 7 | Invalid API Token |\n| 8 | Could not find reference transaction id. |\n| 9 | Transaction is already rolled back  <br>Specified transaction was already rolled back |\n| 11 | Duplicate transaction.  <br>Deposit or withdrawal with specified reference was already processed successfully |","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"25695248","team":5316339,"collectionId":"57b6f207-1e9f-4e79-884b-313b15de1c5f","publishedId":"2sA358dkaT","public":true,"publicUrl":"https://documenter-api.postman.tech/view/25695248/2sA358dkaT","privateUrl":"https://go.postman.co/documentation/25695248-57b6f207-1e9f-4e79-884b-313b15de1c5f","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":"Amatic Seamless API"}],"appearance":{"default":"dark","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.12.10","publishDate":"2024-03-20T11:59:07.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"Amatic Seamless API","description":""},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[],"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/a8263a9c99a1e2460ab1797944976112efcaf476dab8ea2ce9036368623cd925","favicon":""},"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"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2sA358dkaT"}