{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"11df23f1-7740-4004-9e3c-bf69b4dbbd01","name":"BitRail API","description":"This REST API reference details the use, logic, and conditions of the BitRail API for integration into different products.\n\nPlease ensure you are familiar with our main [implementation guide](https://bitrail.bitbucket.io/), which overs other implementations that require far less effort for certain situations.\n\n## How to use this REST API Guide\n\nMethods are individually documented, and most sections include additional commentary on how the logic flow should work.\n\nExamples are provided within the guide. More complex calls may include multiple examples as a dropdown next to \"Example Request\".\n\nSample code is generated in multiple languages. The language defaults to `cURL`, but can be changed with the dropdown at the top of the page.\n\nAn [Examples folder](#ccb61ae4-8336-4bcf-a743-49e850e95738) is included to demonstrate the most common flow.\n\n### Environments\n\nThe production environment uses [https://api.bitrail.io](https://api.bitrail.io).\n\nThis document references the sandbox environment at [https://api.sandbox.bitrail.io.](https://api.sandbox.bitrail.io)\n\nClient ID/Client Secret ID's will be provided for both environments once a business relationship has been established with BitRail.\n\n## Implementation\n\nThe BitRail API can be fully integrated into a product by implementing the functionality within this document. This allows full integration into an existing platform, wallet, infrastructure, etc.\n\nHowever, a quicker/simpler integration for adding BitRail as a payment method is to implement a Javascript popup window. Many of the functions in this document are encapsulated within the popup window, reducing the implementation down greatly. Please contact the BitRail team for more information.\n\n## HTTP Methods\n\nThis API uses HTTP verbs (methods) as following:\n\n*   `GET` - *Read* - used to **read** (or retrieve) a representation of a resource,\n*   `POST` - *Create* - used to **create** new resources. In particular, it's used to create subordinate resources.\n*   `PUT` - *Update/Replace* - used for **update** capabilities, PUT-ing to a known resource URI with the request body containing the newly-updated representation of the original resource. On successful request, replaces identified resource with the request body.\n*   `DELETE` - *Delete* - used to **delete** a resource identified by a URI.\n    \n\n## Representation of Date and Time\n\nAll exchange of date and time-related data MUST be done according to ISO 8601 standard and stored in UTC. **All date/times in the API are handled in UTC**.\n\nWhen returning date and time-related data `YYYY-MM-DDThh:mm:ss.SSSZ` format MUST be used.\n\n## Filtering, Pagination, and Sorting\n\nMost endpoints that return a number of results can be filtered to provide a narrower range of items. Typically, at least the `from_date` and `to_date` parameters are accepted. By default, items are returned by their creation date, with the newest items listed last.\n\nPagination is supported through the use of two operators in most methods:\n\n*   offset - Starting index for pagination\n*   limit - Number of objects returned from index\n    \n\nBy default, most endpoints return the set with an offset of 0 and a limit of 30 items.\n\nSorting can be accomplished through the use of two parameters:\n\n*   sort - Sort by field name\n*   order - Order direction (asc or desc)\n    \n\nAll filtering, pagination, and sorting fields are optional.\n\n## Versioning\n\nThe major version of the api will be defined in the endpoint. Currently the API is under version 1 specs, so the prefix path `/v1` is used on all calls.\n\nMinor versioning changes may be supported in the future, but are currently not defined.\n\n## Status Codes and Errors\n\nThis API uses HTTP status codes to communicate with the API consumer.\n\n*   `200 OK` - Response to a successful GET, PUT, PATCH or DELETE.\n*   `400 Bad Request` - Malformed request; form validation errors.\n*   `401 Unauthorized` - When no or invalid authentication details are provided.\n*   `404 Not Found` - When a non-existent resource is requested.\n*   `500 Server Error` - Error not related to user input","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"4285971","team":104475,"collectionId":"11df23f1-7740-4004-9e3c-bf69b4dbbd01","publishedId":"TzCQbSHv","public":true,"publicUrl":"https://docs.bitrail.io","privateUrl":"https://go.postman.co/documentation/4285971-11df23f1-7740-4004-9e3c-bf69b4dbbd01","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-single-column","customisation":null,"version":"8.10.0","publishDate":"2021-05-01T16:07:50.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"Sandbox","id":"4c955766-07c2-41cd-9dee-31d733df5390","owner":"4285971","values":[{"key":"HOST","value":"https://api.sandbox.bitrail.io","enabled":true},{"key":"OAUTH_CLIENT_ID","value":"sbnrhkic4il79kcn6lrigytj9wh2w9","enabled":true},{"key":"OAUTH_CLIENT_SECRET","value":"L8N1Vfq_JLELMAw_0RPktZV_IQEfgytc5bMtl2j_4Ii05HksgE8Zb0KWasUJ-otX","enabled":true},{"key":"BC_ACCOUNT_ID","value":"","enabled":true},{"key":"RATE_ID","value":"","enabled":true},{"key":"SOFT_LINK_TRIES","value":"","enabled":true},{"key":"AUTH_TOKEN","value":"AUTH_TOKEN","enabled":true},{"key":"EMAIL_TOKEN","value":"EMAIL_TOKEN","enabled":true},{"key":"EMAIL_NAME","value":"EMAIL_NAME","enabled":true},{"key":"EMAIL_ID","value":"EMAIL_ID","enabled":true},{"key":"PHONE_ID","value":"PHONE_ID","enabled":true},{"key":"CONSENT_NAME","value":"CONSENT_NAME","enabled":true},{"key":"SERVICE_ID","value":"SERVICE_ID","enabled":true},{"key":"KYC_SESSION_ID","value":"KYC_SESSION_ID","enabled":true},{"key":"TRANSACTION_ID","value":"TRANSACTION_ID","enabled":true}],"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/7c0df5eda7aa4d6e0e4efb26deb4d983930a80467c539c5a703bf5242868fac8","favicon":"https://res.cloudinary.com/postman/image/upload/v1634576855/team/pzjyxm1hgmpwjsq8uldx.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":"Sandbox","value":"4285971-4c955766-07c2-41cd-9dee-31d733df5390"}],"canonicalUrl":"https://docs.bitrail.io/view/metadata/TzCQbSHv"}