{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"a91e9478-d44e-45a2-ad5d-fda09a7b59f8","name":"Capital Wallet","description":"## Introduction\n\nCapital Wallet's Crypto Payment Solution enables Businesses to offer instant, inexpensive, global payments to anyone, at any time!\n\nIt is built to abstract the complexities that come with real-time crypto transfers, making it intuitive for app developers to integrate it for their respective purposes. As a developer, you handle the app, and we handle the transactions.\n\nWe have created a simple and free step-by-step guide to help get your business all set up to start accepting cryptocurrency payments using the Capital Wallet payment gateway.\n\n## Postman\n\nYou can run the Capital Wallet API in Postman by clicking on `Run in Postman` button. In your Postman environment, you'll need to define the variables `cw-client-secret` and `cw-api-secret`. You can read more in Postman’s documentation about [managing environments](https://learning.postman.com/docs/postman/variables-and-environments/variables/)\n\n## Authentication\n\nAll API queries must be made over HTTPS, and plain HTTP will be refused. You must include your X-App headers in all requests. The `{{baseUrl}}` will be [https://api.capitalwallet.com](https://api.capitalwallet.com) for all API calls\n\n#### API Keys\n\nYou can generate App Tokens in the dev space in our [Merchant Portal](https://client.capitalwallet.com)\n\n#### Making a request\n\nAll requests must contain the following headers:\n\n- `X-Auth-Token` - A Public API Key that you will get from Merchant Dashboard\n- `X-Auth-HMAC`\\- Signature of the request in the hex format and **lowercase** (see below)\n- `X-Auth-Access-Ts`\\- Number of seconds since Unix Epoch in UTC\n    \n\n#### Signing a request\n\nThe value of the `X-Auth-HMAC` is generated by a sha512 HMAC algorithm using a Private Client Secret Key (provided upon API Key generation) and convert bytes to hex. The payload to generate HMAC contains request body in string format and a timestamp.  \nThe payload concatenating the following information:\n\n- A timestamp (value of the `X-Auth-Access-Ts` header) taken as a string. Number of seconds since the Unix Epoch Example: `1679845380`\n- Request body, taken exactly as it will be sent. If there is no request body, don't include it. Example : `currency=LTC&comment=&order_id=BTCWALLET`\n- Final payload after concatenating request body and timestamp to generate HMAC will be : `currency=LTC&comment=&order_id=BTCWALLET1679845380`\n    \n\nHere are some code example to generate HMAC:\n\n```\n    // Private Client Secret Key used for signing payloads\n    secret_key = '123456';\n    // Number of seconds since the Unix Epoch\n    timestamp = time();\n    // Payload to be signed, concatenating request body and timestamp if no request body the payload will only be timestamp\n    payload = \"currency=LTC&comment=&order_id=BTCWALLET\"+timestamp;\n    // PHP\n    hash_hmac(\"sha512\", payload, secret_key, false);\n    // Javascript\n    CryptoJS.enc.Hex.stringify(CryptoJS.HmacSHA512(payload, secret_key)))\n    // Signed output using above payload and secret key should be: \n    // b8a85c812c1fc2928ec6c815d8f125e485513ecbbbe8b24fd6bb6e798e502c470ef5799ef32ee268ad5371c542a4724c3ecf47bafbea185ae6cd7bdbccb21430     \n\n```","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"24162916","team":4712350,"collectionId":"a91e9478-d44e-45a2-ad5d-fda09a7b59f8","publishedId":"2s935vjKDN","public":true,"publicUrl":"https://apidocs.capitalwallet.com","privateUrl":"https://go.postman.co/documentation/24162916-a91e9478-d44e-45a2-ad5d-fda09a7b59f8","customColor":{"top-bar":"002866","right-sidebar":"303030","highlight":"002866"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.10.1","publishDate":"2023-02-21T07:41:11.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"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/7b8a99742d70f79dad84c3cad6c035ce28392fa49ba17abcba551b09d74b689d","favicon":"https://capitalwallet.com/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"}],"canonicalUrl":"https://apidocs.capitalwallet.com/view/metadata/2s935vjKDN"}