{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"ca9e5cab-f7c3-490d-864e-560acd3f3d89","name":"Safebits API Documentation","description":"The Safebits API allows wallets to integrate cryptocurrency deposits, payouts, and transaction monitoring into their systems.\n\nThis documentation provides everything required to successfully integrate with the API, including:\n\n- Core platform concepts\n    \n- Authentication and request signing\n    \n- Request and response formats\n    \n- Webhook callbacks\n    \n- Error handling\n    \n- API versioning\n    \n\nAll API requests and responses use JSON over HTTPS.\n\n## Base URLs\n\nSafebits provides separate environments for testing and production.\n\n### Sandbox\n\nUsed for development and testing integrations.\n\n> https:// staging-core.safebits.net/ \n  \n\n### Production\n\nUsed for live integrations.\n\n> https:// api-ms.safebits.net \n  \n\n#### Note\n\nSome wallets may receive a dedicated production endpoint during onboarding. If a custom production URL was provided to your team, it should be used instead of the default production base URL.\n\n## Platform Overview\n\nBefore integrating with the API, it is helpful to understand the main platform flows.\n\n### Deposit Flow\n\n<img src=\"https://content.pstmn.io/435b8161-fb26-46e1-aedb-2e2416ed5179/RGVwb3NpdHMgRmxvdy0yMDI2LTAzLTEzLTIxMzUzNC5wbmc=\">\n\n### Payout Flow\n\n<img src=\"https://content.pstmn.io/6effa141-ab56-4755-9e49-74f9f5c8cf95/UGF5b3V0cyBGbG93LTIwMjYtMDMtMTMtMjEzNTI0LnBuZw==\">\n\n# Key Concepts\n\nUnderstanding the following concepts will help you integrate with the Safebits API.\n\n## Wallet\n\nA wallet represents a Safebits client integrating with the API. Each wallet account contains:\n\n- API credentials\n    \n- Deposit addresses\n    \n- Transaction History\n    \n- Payout capabilities\n    \n\nAll API requests operate within the context of a wallet account.\n\n## Network\n\nA network represents a blockchain where transactions occur.\n\nExamples Include:\n\n- Bitcoin\n    \n- Ethereum\n    \n- Tron\n    \n\n## Address (Channel)\n\nAn address represents a receiving endpoint for cryptocurrency deposits. Within the Safebits API, addresses are internally referred to as channels.\n\nEach address:\n\n- belongs to a wallet\n    \n- belongs to a specific network\n    \n- can receive deposits from end users\n    \n\n## Confirmations\n\nA confirmation represents the number of blocks added to the blockchain after the block containing a transaction. Example:\n\n```\nBlock 100 → transaction included\nBlock 101 → 1 confirmation\nBlock 102 → 2 confirmations\n\n ```\n\nMore confirmations increase transaction finality and security.\n\nWallets typically credit deposits after a configurable number of confirmations.\n\n## Block and Block Hash\n\nA block is a group of transactions recorded on the blockchain. Each block includes:\n\n- A set of transactions\n    \n- Its own unique identifier (block hash)\n    \n\nThe block hash uniquely identifies a block within the blockchain.\n\n## TXID (Transaction ID)\n\nA TXID is the unique identifier of a blockchain transaction. Example:\n\n`0xcc476ff9d6262aa91c82771d576fc3b03817b607d9afb4e243352cfb74871095`.\n\nDue to historical reasons, the Safebits API uses the field name bitcoin_txid. This field is used across all supported networks, even when the transaction does not belong to the Bitcoin network.\n\n# Authentication\n\nAll requests to the Safebits API must be authenticated using API credentials and request signatures.\n\nAuthentication ensures that:\n\n- Requests originate from an authorized wallet\n    \n- Requests cannot be modified during transmission\n    \n- Replay attacks are prevented\n    \n\nTo access the API, wallets must obtain API credentials (API Key and API Secret) from the Safebits team.\n\nOnce credentials are issued, every API request must include the following HTTP headers:\n\n```\nX-Safebits-Key\nX-Safebits-Nonce\nX-Safebits-Signature\n\n ```\n\n## API Key - X-Safebits-Key\n\nX-Safebits-Key is the API access key associated with your wallet account.\n\nThis key uniquely identifies the wallet making the request. The API key:\n\n- Must be included in every request\n    \n- Is case-sensitive\n    \n\n## Nonce - X-Safebits-Nonce\n\nX-Safebits-Nonce is a 64-bit unsigned integer generated by the client for each request. The nonce prevents replay attacks by ensuring that every request is unique. The following rules must be respected:\n\n- The nonce must be unique for every request made with the same API key.\n    \n- The nonce must be strictly greater than any nonce previously used with that API key.\n    \n\nIf a request is received with a nonce that is equal to or lower than a previously used value, the request will be rejected.\n\n### Generating Nonces\n\nA common approach is to use the UNIX epoch timestamp.\n\nHowever, when sending multiple requests quickly, second-level precision may cause duplicate values. For this reason, it is recommended to use microsecond precision.\n\n## API Secret\n\nThe API Secret is a confidential key used to generate request signatures. The secret:\n\n- Is a 64-character string\n    \n- Uses the Base62 character set\n    \n\nThe API secret must be kept confidential and must never be exposed publicly.\n\nIf the secret is compromised or lost, the Safebits team can issue new credentials.\n\n## Signature - X-Safebits-Signature\n\nEvery request must include a signature generated using the API secret.\n\nThe signature allows Safebits to verify that:\n\n- The request was created by the wallet\n    \n- The request content was not modified\n    \n\nThe signature is calculated using the following algorithm:\n\n```\nHMAC-SHA512(secret, message)\n\n ```\n\nThe resulting digest must be encoded as a hexadecimal string.\n\n### Signature Message Format\n\nThe message used to generate the signature is constructed by concatenating:\n\n```\nuri_path + nonce + SHA256(request_data)\n\n ```\n\nWhere:\n\n- `uri_path` is the path portion of the request URI. Example:\n    \n\n```\n/v1/channels\n\n ```\n\n- `nonce` is the value sent in the `X-Safebits-Nonce` header, converted to a UTF-8 string.\n    \n- `request_data` is the request payload used in the API request. The format depends on the HTTP method.\n    \n\n```\nFor POST requests\nrequest_data = JSON request body\nFor GET requests\nrequest_data = URL encoded query string (RFC3986)\n\n ```\n\n- `SHA256 (request_data)` is the lowercase hexadecimal SHA256 digest of request_data.\n    \n\n### Signature Troubleshooting\n\nAuthentication errors are most commonly caused by one of the following issues.\n\n#### Incorrect nonce usage\n\n##### Problem\n\nThe API rejects the request because the X-Crypto-Nonce value is not valid.\n\n##### Possible Causes\n\n- Reusing a nonce value\n    \n\nEach request must use a unique nonce value. If the same nonce is used more than once with the same API key, the request will be rejected.\n\n```\nRequest 1\nX-Safebits-Nonce: 1700000000000000\nRequest 2\nX-Safebits-Nonce: 1700000000000000\n\n ```\n\nBoth requests use the same nonce.\n\n- Sending a nonce lower than a previously used value\n    \n\nNonce values must always increase over time.\n\n```\nRequest 1\nX-Crypto-Nonce: 1700000000000005\nRequest 2\nX-Crypto-Nonce: 1700000000000001\n\n ```\n\nThe second request uses a lower nonce, which is not allowed.\n\n#### Incorrect request hashing\n\n##### Problem\n\nThe generated signature does not match the expected signature.\n\n##### Possible Causes\n\n- Hashing formatted JSON instead of the raw request body\n    \n\nThe signature must be generated using the exact raw request body sent to the API.\n\n```\n🚫 Incorrect raw request body:\n{\n  \"amount\": \"100\",\n  \"currency\": \"USDT\"\n} \n✅ Correct raw request body: \"{\"amount\":\"100\",\"currency\":\"USDT\"}\n\n ```\n\nSince the contents are different, the resulting hash will also be different.\n\n- Hashing empty data when parameters are present\n    \n\nIf the request contains a body or query parameters, they must be included in the hash calculation.\n\n#### Encoding errors\n\n##### Problem\n\nThe generated signature does not match the server-side calculation due to encoding mismatches.\n\n##### Possible Causes\n\n- Using Base64 instead of hexadecimal\n    \n\nThe API expects the signature as a hexadecimal string.\n\n```\n🚫 Incorrect - Base64 encoded Signature: bXlzaWduYXR1cmU= \n✅ Correct - Hexadecimal encoded Signature: 4f9a7c2b1e...\n\n ```\n\n- Using UTF-16 instead of UTF-8\n    \n\nAll components used in the signature generation must be encoded using UTF-8.\n\n**Incorrect implementations** sometimes use UTF-16 depending on the programming language or framework.\n\n#### Incorrect Secret Usage\n\n##### Problem\n\nThe generated signature is invalid even though the algorithm and payload are correct.\n\n##### Possible Causes\n\nThe API key is used instead of the API secret when generating the HMAC signature.\n\n```\n🚫 Incorrect - HMAC_SHA512(API_KEY, message) \n✅ Correct - HMAC_SHA512(API_SECRET, message)\n\n ```\n\n#### Incorrect parameter types when generating the signature\n\nWhen generating the signature message, all parameters must be treated as strings, even if their values are numeric. This requirement ensures consistent hashing behavior across different programming languages. Example:\n\n```\n🚫 Incorrect\n{\n  \"amount\": 100,\n  \"currency\": \"USDT\"\n} \n✅ Correct \n{\n  \"amount\": \"100\",\n  \"currency\": \"USDT\"\n} \n\n ```\n\nEven if a parameter represents a number, it must be converted to a string representation when building the signature message. Failing to do this may produce different hashes depending on the programming language used.\n\n#### Trailing slash in the URI path\n\nThe `uri_path` used for signature generation must not include a trailing slash.\n\n```\n🚫 Incorrect - /v1/channels/\n✅ Correct - /v1/channels\n\n ```\n\n#### Incorrect URI path\n\nThe uri_path used in the signature must exactly match the path portion of the request URL.\n\n```\nFull URL: https://api-ms.safebits.net/v1/channels\nURI Path: /v1/channels\n\n ```\n\n### Signature Examples\n\nThis section includes scripts demonstrating how to generate request signatures in common programming languages.\n\n``` javascript\nconst crypto = require('crypto');\nfunction getSignature(secret, uriPath, nonce, requestParams) {\n  const jsonString = getRequestJson(requestParams);\n  const hash = crypto.createHash('sha256').update(jsonString).digest('hex').toLowerCase();\n  const msg = uriPath + nonce + hash;\n  const signature = crypto.createHmac('sha512', secret).update(msg).digest('hex');\n  return signature;\n}\nfunction getRequestJson(requestParams) {\n  if (requestParams && typeof requestParams === 'object' && !Array.isArray(requestParams) && Object.keys(requestParams).length === 0) {\n        return JSON.stringify([]);\n    }\n    return JSON.stringify(requestParams);\n}\n//Example Usage\nconst secret = 'YOUR-SECRET';\nconst nonce = 123; //Example Nonce\nconst uriPath = '/v1/channels';\nconst requestParams = { receiver_currency: 'USD', receiver_amount: '100', sender_currency: 'BNB', network: 'BEP20', reference: 'test-ref-123', customer_reference: 'cx-ref-123' };\nconst signature = getSignature(secret, uriPath, nonce, requestParams);\nconsole.log(signature)\n\n ```\n\n``` php\nfunction getSignature($secret, $uriPath, $nonce, $requestParams) {\n  $requestData = json_encode($requestParams);\n  $requestData = strtolower(hash('sha256', $requestData, false));\n  $msg = $uriPath . $nonce . $requestData;\n  $signature = hash_hmac(\"sha512\", $msg, $secret);\n  return $signature;\n}\n#Example Usage\n$secret = 'YOUR-SECRET';\n$nonce = 123; #Example Nonce\n$uriPath = '/v1/channels';\n$requestParams = [\"receiver_currency\"=>\"USD\",\"receiver_amount\"=>\"100\",\"sender_currency\"=>\"BNB\",\"network\"=>\"BEP20\",\"reference\"=>\"test-ref-123\",\"customer_reference\"=>\"cx-ref-123\"];\n$signature = getSignature($secret, $uriPath, $nonce, $requestParams);\necho($signature);\n\n ```\n\n``` python\nimport hmac\nimport json\nfrom time import time\nimport hashlib\ndef getSignature(secret, uriPath: str, nonce: str, requestParams: dict):\n    requestJson = getRequestJson(requestParams)\n    hash = hashlib.sha256(requestJson).hexdigest()\n    msg = uriPath.encode('utf-8') + nonce.encode('utf-8') + hash.encode('utf-8')\n    return hmac.new(secret.encode('utf-8'), msg, hashlib.sha512).hexdigest()\ndef getRequestJson(requestParams):\n    if len(requestParams) > 0:\n        requestJson = json.dumps(requestParams, separators=(',', ':'))\n    else:\n        requestJson = \"[]\"\n    return requestJson.encode('utf-8')\n# Example usage\nif __name__ == \"__main__\":\n    secret = 'YOUR-SECRET'\n    uriPath = '/v1/channels'\n    nonce = '123' #Example Nonce\n    requestParams = {\"receiver_currency\": \"USD\", \"receiver_amount\": \"100\", \"sender_currency\": \"BNB\", \"network\": \"BEP20\", \"reference\": \"test-ref-123\", \"customer_reference\": \"cx-ref-123\" }\n    result = getSignature(secret, uriPath, nonce, requestParams)\n    print(result)\n\n ```\n\n# Responses\n\nThe Safebits API uses standard HTTP status codes. All data is sent and received as JSON with the content type application/json\n\n## Successful Responses\n\nSuccessful requests return a 2xx HTTP status code.\n\n``` json\n201 CREATED\n{\n  \"channel_id\": 13010,\n  \"address\": \"2NDo6YK3zc3CzEYX5RFDKRwexVVn9kCpaqs\",\n  \"sender_currency\": \"BTC\",\n  \"network\": \"BTC\"\n}\n\n ```\n\n## Error Responses\n\nWhen an error occurs, the API returns a 4xx or 5xx HTTP status code. The response body will contain a JSON object describing the error.\n\n``` json\n400 Bad Request\n{\n  \"message\": \"Invalid access key\"\n}\n\n ```\n\nThe message field contains a human-readable explanation of the error.\n\n# Callbacks\n\nSafebits uses callbacks (webhooks) to notify wallet systems about important events.\n\nCallbacks allow your system to receive real-time updates without continuously polling the API.\n\nTypical events include:\n\n- Deposit detected\n    \n- Deposit confirmed\n    \n- Payout broadcast\n    \n- Payout confirmed\n    \n\nCallbacks are sent as HTTP POST requests to a wallet configured endpoint.\n\nYour system must return HTTP 200 OK to acknowledge successful processing of the callback.\n\n## Callbacks Security\n\nAll callbacks sent by Safebits include the same authentication headers used when wallets call the API.\n\nThis allows your system to verify that the callback was generated by Safebits.\n\nThe following headers are included in every callback request:\n\n```\nX-Safebits-Key\nX-Safebits-Signature\nX-Safebits-Callback-Id\n\n ```\n\nWallets should validate these headers using the same signature verification process described in the Authentication section. This mechanism ensures that callbacks cannot be forged or modified by third parties.\n\n## Callbacks Payload Structure\n\nA callback payload contains two different kinds of information:\n\n### Quote or Request Information\n\nThese fields describe the original request or expected quote associated with the channel.\n\nExamples:\n\n- receiver_amount\n    \n- receiver_currency\n    \n- sender_currency\n    \n- sender_amount\n    \n- sender_rate\n    \n\nThese fields represent the quoted or expected transaction data, not necessarily what was actually sent on-chain.\n\n### Executed Blockchain Transaction Information\n\nThis information is contained inside:\n\n```\ntxs.data[]\n\n ```\n\nEach element in this array represents an actual blockchain transaction detected for the address.\n\nExamples of fields inside each transaction object:\n\n- sender_currency\n    \n- sender_amount\n    \n- sender_rate\n    \n- confirmations\n    \n- bitcoin_txid\n    \n\nThis is the information that client systems must use to determine what was actually received on-chain.\n\n## Quote Data vs Executed Blockchain Data\n\nThis distinction is critical.\n\nThe fields outside `txs.data[]` describe the quote or expected payment request.\n\nThe fields inside `txs.data[]` describe the actual blockchain execution.\n\nFor example, a callback may contain:\n\n``` json\n{\n  \"receiver_currency\": \"USD\",\n  \"receiver_amount\": 100,\n  \"sender_currency\": \"ETH\",\n  \"sender_amount\": \"0.047\",\n  \"sender_rate\": 2105.32\n}\n\n ```\n\nThis means the original quote expected a deposit equivalent to 100 USD in ETH.\n\nHowever, the actual blockchain transaction may be:\n\n``` json\n{\n  \"sender_currency\": \"USDT\",\n  \"sender_amount\": \"5000\",\n  \"sender_rate\": 0.99\n}\n\n ```\n\nIn that case:\n\n- The quote expected ETH\n    \n- The blockchain actually received USDT\n    \n\nFor deposit processing, the client system must use the transaction data inside `txs.data[]`, because that is what was actually executed on-chain.\n\n## How to Process Transactions Correctly\n\nWhen processing callbacks, client systems should follow this rule:\n\n### Use top-level fields for quote/reference purposes only\n\nTop-level fields are useful to understand:\n\n- What the end user was expected to send\n    \n- What quote was generated\n    \n- What the requested amount/rate was\n    \n\n### Use `txs.data[]` for Blockchain Processing\n\nThe actual deposit crediting logic must be based on the transactions inside txs.data\\[\\].\n\nFor each element in txs.data\\[\\], client platforms should evaluate:\n\n- bitcoin_txid\n    \n- sender_currency\n    \n- sender_amount\n    \n- confirmations\n    \n\nThese values determine what was actually detected and confirmed on-chain.\n\n## Handling Multiple Transactions on the Same Address\n\nA single address may receive more than one blockchain transaction, for this reason, client systems must not assume that a callback represents only one deposit and instead, process independently each element of `txs.data[].`\n\n### Status Handling Recommendation\n\nThe channel-level `status` should be treated as a general channel status, not as a definitive indicator that all transactions in `txs.data[]` are individually completed.\n\nFor example, it is possible for:\n\n- One transaction in `txs.data[]` to already meet the required confirmations\n    \n- Another transaction in `txs.data[]` to still be pending\n    \n\nIn this case, client systems must credit only the transaction that is actually confirmed, not all transactions in the channel.\n\n## Common Integration Mistakes\n\n### Mistake 1: Using quote data as if it were blockchain execution data\n\nIncorrect approach:\n\n- Reading sender_currency, sender_amount, and sender_rate from the top level\n    \n- Crediting funds based on that information\n    \n\nCorrect approach:\n\n- Use the top-level fields only as quote/reference information\n    \n- Use `txs.data[]` to determine the actual blockchain transaction details\n    \n\n### Mistake 2: Crediting all transactions when channel status becomes completed\n\nIncorrect approach:\n\n- Channel status changes to 2 (COMPLETED)\n    \n- Client system credits every transaction found in txs.data\\[\\]\n    \n\nCorrect approach:\n\n- Inspect each transaction in txs.data\\[\\] individually\n    \n- Credit only the transaction(s) whose confirmation count satisfies the required threshold\n    \n\n### Mistake 3: Assuming one address will receive only one transaction\n\nIncorrect approach:\n\n- Treating the callback as if it always represents a single blockchain payment\n    \n\nCorrect approach:\n\n- Always iterate through all elements inside `txs.data[]`\n    \n- Process each transaction independently\n    \n\n## Recommended Procesing Logic\n\nA safe way to process deposit callbacks is:\n\n1. Validate the callback signature\n    \n2. Read the channel-level information for reference\n    \n3. Iterate over all elements in txs.data\\[\\]\n    \n4. For each transaction:\n    \n    1. identify it by bitcoin_txid\n        \n    2. check sender_currency\n        \n    3. check sender_amount\n        \n    4. check confirmations\n        \n5. Credit only transactions that are individually confirmed and not yet credited\n    \n6. Ignore already credited transactions\n    \n7. Keep unconfirmed transactions pending\n    \n\nThis approach avoids double crediting and prevents confusion when multiple deposits are sent to the same address.\n\n## Example Callbacks\n\n### Single Pending Deposit\n\n``` json\n{\n   \"channel_id\":630218,\n   \"type\":\"IN\",\n   \"status\":1,\n   \"receiver_reference\":\"1002504011318410900\",\n   \"receiver_currency\":\"USD\",\n   \"receiver_amount\":25,\n   \"address\":\"bitcoincash:qqykltn6003a0sm9j993h4l6rzgrwfhmyy29saf003\",\n   \"sender_currency\":\"BCH\",\n   \"sender_amount\":\"0.08069461\",\n   \"network\":\"BCH\",\n   \"sender_rate\":309.81,\n   \"valid_until\":1743539624,\n   \"is_blocked\":false,\n   \"customer_reference\":\"CX-XXX92\",\n   \"created_at\":1743538724,\n   \"txs\":{\n      \"data\":[\n         {\n            \"sender_currency\":\"BCH\",\n            \"internal_reference\":585386,\n            \"sender_amount\":\"0.08396679\",\n            \"sender_rate\":309.81,\n            \"confirmations\":0,\n            \"vout\":0,\n            \"miner_fee\":\"0.000000000000000000000000000000\",\n            \"block_hash\":null,\n            \"bitcoin_txid\":\"f0f123ec69c823d2ec56d3657f099f08c4fdf2fc5d67276ca146fabef02dacbc\",\n            \"created_at\":1743538760\n         }\n      ]\n   }\n}\n\n ```\n\n### Single Completed Deposit\n\n``` json\n{\n   \"channel_id\":630218,\n   \"type\":\"IN\",\n   \"status\":3,\n   \"receiver_reference\":\"1002504011318410900\",\n   \"receiver_currency\":\"USD\",\n   \"receiver_amount\":25,\n   \"address\":\"bitcoincash:qqykltn6003a0sm9j993h4l6rzgrwfhmyy29saf003\",\n   \"sender_currency\":\"BCH\",\n   \"sender_amount\":\"0.08069461\",\n   \"network\":\"BCH\",\n   \"sender_rate\":309.81,\n   \"valid_until\":1743539624,\n   \"is_blocked\":false,\n   \"customer_reference\":\"CX-XXX92\",\n   \"created_at\":1743538724,\n   \"txs\":{\n      \"data\":[\n         {\n            \"sender_currency\":\"BCH\",\n            \"internal_reference\":585386,\n            \"sender_amount\":\"0.08396679\",\n            \"sender_rate\":309.81,\n            \"confirmations\":3,\n            \"vout\":0,\n            \"miner_fee\":\"0.000000000000000000000000000000\",\n            \"block_hash\":\"0000000000000000016f61d479701fffb1311653c795004cc96d1217ea54124b\",\n            \"bitcoin_txid\":\"f0f123ec69c823d2ec56d3657f099f08c4fdf2fc5d67276ca146fabef02dacbc\",\n            \"created_at\":1743538760\n         }\n      ]\n   }\n}\n\n ```\n\n### Multiple Pending Deposits\n\n``` json\n{\n   \"channel_id\":630511,\n   \"type\":\"IN\",\n   \"status\":1,\n   \"receiver_reference\":\"1002504020742391470\",\n   \"receiver_currency\":\"USD\",\n   \"receiver_amount\":400,\n   \"address\":\"bc1qq5g5pmaaruqyst6pg9d0c9t7rles00jl68aax9\",\n   \"sender_currency\":\"BTC\",\n   \"sender_amount\":\"0.00466428\",\n   \"network\":\"BTC\",\n   \"sender_rate\":85758,\n   \"valid_until\":1743605865,\n   \"is_blocked\":false,\n   \"customer_reference\":\"CX-XXX79\",\n   \"created_at\":1743604965,\n   \"txs\":{\n      \"data\":[\n         {\n            \"sender_currency\":\"BTC\",\n            \"internal_reference\":585642,\n            \"sender_amount\":\"0.00466894\",\n            \"sender_rate\":85758,\n            \"confirmations\":0,\n            \"vout\":0,\n            \"miner_fee\":\"0.000000000000000000000000000000\",\n            \"block_hash\":null,\n            \"bitcoin_txid\":\"3d976dfba547708d2800cd1f35b7f9fb1051b2434fd24c57fa23c8e68a2aec69\",\n            \"created_at\":1743605001\n         },\n         {\n            \"sender_currency\":\"BTC\",\n            \"internal_reference\":585643,\n            \"sender_amount\":\"0.00466894\",\n            \"sender_rate\":85758,\n            \"confirmations\":0,\n            \"vout\":0,\n            \"miner_fee\":\"0.000000000000000000000000000000\",\n            \"block_hash\":null,\n            \"bitcoin_txid\":\"7e5dc6a6bd91cfba34b88fe218d455b2bdd611ea5ed966ee0e36c67229b77657\",\n            \"created_at\":1743605180\n         }\n      ]\n   }\n}\n\n ```\n\n### Pending and Completed Deposits in the Same Address\n\n``` json\n{\n   \"channel_id\":630511,\n   \"type\":\"IN\",\n   \"status\":3,\n   \"receiver_reference\":\"1002504020742391470\",\n   \"receiver_currency\":\"USD\",\n   \"receiver_amount\":400,\n   \"address\":\"bc1qq5g5pmaaruqyst6pg9d0c9t7rles00jl68aax9\",\n   \"sender_currency\":\"BTC\",\n   \"sender_amount\":\"0.00466428\",\n   \"network\":\"BTC\",\n   \"sender_rate\":85758,\n   \"valid_until\":1743605865,\n   \"is_blocked\":false,\n   \"customer_reference\":\"CX-XXX79\",\n   \"created_at\":1743604965,\n   \"txs\":{\n      \"data\":[\n         {\n            \"sender_currency\":\"BTC\",\n            \"internal_reference\":585642,\n            \"sender_amount\":\"0.00466894\",\n            \"sender_rate\":85758,\n            \"confirmations\":0,\n            \"vout\":0,\n            \"miner_fee\":\"0.000000000000000000000000000000\",\n            \"block_hash\":null,\n            \"bitcoin_txid\":\"3d976dfba547708d2800cd1f35b7f9fb1051b2434fd24c57fa23c8e68a2aec69\",\n            \"created_at\":1743605001\n         },\n         {\n            \"sender_currency\":\"BTC\",\n            \"internal_reference\":585643,\n            \"sender_amount\":\"0.00466894\",\n            \"sender_rate\":85758,\n            \"confirmations\":1,\n            \"vout\":0,\n            \"miner_fee\":\"0.000000000000000000000000000000\",\n            \"block_hash\":\"000000000000000000009d01fa0725175c4a39d9420cdb7c0d2433daeb9f31e8\",\n            \"bitcoin_txid\":\"7e5dc6a6bd91cfba34b88fe218d455b2bdd611ea5ed966ee0e36c67229b77657\",\n            \"created_at\":1743605180\n         }\n      ]\n   }\n}\n\n ```\n\n### Deposit Quote Differs from Actual Blockchain Execution\n\n``` json\n{\n   \"channel_id\":636055,\n   \"type\":\"IN\",\n   \"status\":2,\n   \"receiver_reference\":\"1294338\",\n   \"receiver_currency\":\"USD\",\n   \"receiver_amount\":1,\n   \"address\":\"0x017b0684db6c1d70965da05715a1bf0c45e1e4e6\",\n   \"sender_currency\":\"USDC\",\n   \"sender_amount\":\"1.000056\",\n   \"network\":\"ERC20\",\n   \"sender_rate\":0.999944,\n   \"valid_until\":1744365807,\n   \"is_blocked\":false,\n   \"customer_reference\":\"CX-XXX23\",\n   \"created_at\":1744364907,\n   \"txs\":{\n      \"data\":[\n         {\n            \"sender_currency\":\"USDT\",\n            \"internal_reference\":590518,\n            \"sender_amount\":\"284.230000\",\n            \"sender_rate\":0.999432,\n            \"confirmations\":5,\n            \"vout\":0,\n            \"miner_fee\":\"0.000000000000000000000000000000\",\n            \"block_hash\":\"0xae5c33cba657f9324c50d7ae7a0d2d1d2be35010ed7ede5cba108b1dd81fcfa5\",\n            \"bitcoin_txid\":\"0xaefa9801dcae1f85c6aa9972ba7f3c408fa03213031e3c7f19bd11b5be2075bf\",\n            \"created_at\":1744365283\n         }\n      ]\n   }\n}\n\n ```\n\n### Pending Payout\n\n``` json\n{\n   \"transaction_id\":630223,\n   \"type\":\"OUT\",\n   \"status\":1,\n   \"sender_currency\":\"BTC\",\n   \"sender_amount\":0.014480999999999999,\n   \"receiver_currency\":\"BTC\",\n   \"receiver_amount\":\"0.01448099\",\n   \"network\":\"BTC\",\n   \"reference\":\"1287075\",\n   \"rate\":1,\n   \"address\":\"361cFpTWM3KByXWm4M1R6VFtq7D3WpCg8K\",\n   \"txid\":\"a8944758a7b1986c10b71bba2d03aebc0265bfe94f99b3855d42a69f29e80970\",\n   \"is_blocked\":false,\n   \"customer_reference\":\"CX-XXX62\",\n   \"created_at\":1743539336,\n   \"txs\":{\n      \"data\":[\n         {\n            \"sender_currency\":\"BTC\",\n            \"internal_reference\":585393,\n            \"sender_amount\":\"-0.01448099\",\n            \"sender_rate\":1,\n            \"confirmations\":0,\n            \"vout\":0,\n            \"miner_fee\":\"-0.000007660000000000000000000000\",\n            \"block_hash\":null,\n            \"bitcoin_txid\":\"a8944758a7b1986c10b71bba2d03aebc0265bfe94f99b3855d42a69f29e80970\",\n            \"created_at\":1743539781\n         }\n      ]\n   }\n}\n\n ```\n\n### Completed Payout\n\n``` json\n{\n   \"transaction_id\":630223,\n   \"type\":\"OUT\",\n   \"status\":2,\n   \"sender_currency\":\"BTC\",\n   \"sender_amount\":0.014480999999999999,\n   \"receiver_currency\":\"BTC\",\n   \"receiver_amount\":\"0.01448099\",\n   \"network\":\"BTC\",\n   \"reference\":\"1287075\",\n   \"rate\":1,\n   \"address\":\"361cFpTWM3KByXWm4M1R6VFtq7D3WpCg8K\",\n   \"txid\":\"a8944758a7b1986c10b71bba2d03aebc0265bfe94f99b3855d42a69f29e80970\",\n   \"is_blocked\":false,\n   \"customer_reference\":\"CX-XXX62\",\n   \"created_at\":1743539336,\n   \"txs\":{\n      \"data\":[\n         {\n            \"sender_currency\":\"BTC\",\n            \"internal_reference\":585393,\n            \"sender_amount\":\"-0.01448099\",\n            \"sender_rate\":1,\n            \"confirmations\":2,\n            \"vout\":0,\n            \"miner_fee\":\"-0.000007660000000000000000000000\",\n            \"block_hash\":\"0000000000000000000004cc6260ec7065ee8f65591864fb4c720ec110e3e2ab\",\n            \"bitcoin_txid\":\"a8944758a7b1986c10b71bba2d03aebc0265bfe94f99b3855d42a69f29e80970\",\n            \"created_at\":1743539781\n         }\n      ]\n   }\n}\n\n ```\n\n# Versioning\n\nThe Safebits API uses URL-based versioning. All endpoints are currently available under `v1`.\n\nBackward-compatible improvements may be introduced within the same API version.\n\nExamples include:\n\n- New optional response fields\n    \n- New optional request parameters\n    \n- New endpoints.\n    \n\nThese changes do not require modifications to existing integrations.\n\n## Breaking Changes\n\nBreaking changes are never introduced within the same API version. Examples include:\n\n- removing fields\n    \n- renaming fields\n    \n- changing field types\n    \n- removing endpoints\n    \n- changing authentication rules\n    \n\nSuch changes would only be introduced under a new version (for example `/v2`).\n\n## Deprecation Policy\n\nIf a new API version is introduced, Safebits will communicate the transition plan in advance.\n\nExisting versions may remain available during a migration period depending on operational considerations.\n\nNew integrations should always use the latest supported API version.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"5246195","collectionId":"ca9e5cab-f7c3-490d-864e-560acd3f3d89","publishedId":"SVtVTT2d","public":true,"publicUrl":"https://docs.safebits.net","privateUrl":"https://go.postman.co/documentation/5246195-ca9e5cab-f7c3-490d-864e-560acd3f3d89","customColor":{"top-bar":"FFFFFF","right-sidebar":"F6F8FA","highlight":"2F5BFF"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":"https://content.pstmn.io/c27bb86c-fb6b-48cc-b655-b009caa4ea94/c2FmZWJpdHNfbG9nb190cmFuc3BhcmVudC5wbmc=","colors":{"top-bar":"0F172A","right-sidebar":"1E293B","highlight":"2F5BFF"}},{"name":"light","logo":"https://content.pstmn.io/c27bb86c-fb6b-48cc-b655-b009caa4ea94/c2FmZWJpdHNfbG9nb190cmFuc3BhcmVudC5wbmc=","colors":{"top-bar":"FFFFFF","right-sidebar":"F6F8FA","highlight":"2F5BFF"}}]}},"version":"8.10.1","publishDate":"2026-03-16T02:10:21.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":"https://content.pstmn.io/c27bb86c-fb6b-48cc-b655-b009caa4ea94/c2FmZWJpdHNfbG9nb190cmFuc3BhcmVudC5wbmc=","logoDark":"https://content.pstmn.io/c27bb86c-fb6b-48cc-b655-b009caa4ea94/c2FmZWJpdHNfbG9nb190cmFuc3BhcmVudC5wbmc="}},"statusCode":200},"environments":[{"name":"Mainnet","id":"4499412e-df2d-47d6-a8d2-603691af4780","owner":"5246195","values":[{"key":"AUTH","value":"","enabled":true},{"key":"URL_GW","value":"https://gateway.safebits.net","enabled":true},{"key":"URL_ADMIN","value":"https://admin-ms.safebits.net","enabled":true},{"key":"URL","value":"https://api-ms.safebits.net","enabled":true},{"key":"URL_NOTIFICATIONS","value":"https://notifications.safebits.net","enabled":true},{"key":"currentTimestamp","value":"","enabled":true,"type":"any"},{"key":"SIGNATURE","value":"","enabled":true,"type":"any"},{"key":"URL_MONITOR","value":"https://code-monitor.safebits.net","enabled":true,"type":"default"}],"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/11dcdedc34b727c980b67cedf4dbf31a2e995a249861a57a89c05b3f3c8f09fc","favicon":"https://res.cloudinary.com/postman/image/upload/v1705420392/team/we7msbqgwocu3kslarmp.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":"Mainnet","value":"5246195-4499412e-df2d-47d6-a8d2-603691af4780"}],"canonicalUrl":"https://docs.safebits.net/view/metadata/SVtVTT2d"}