# Bitcoin Call Back

The Bitcoin Callback feature is designed to handle transaction confirmations and address timeouts. The system checks the transaction status at multiple intervals and notifies the callback URL accordingly.

**Callback Time Intervals**

1. **15 mins:** Initial check for transaction.
2. **30 mins:** Second check if no transaction is found initially.
3. **1 hour:** Third check.
4. **2 hours:** Fourth check.
5. **4 hours:** Fifth check.
6. **8 hours:** Final check.

After 15 minutes, the address is set to timeout. If the transaction is found after the timeout, the selling price is recalculated and notified through the callback URL.

**Transaction Found**

```json
 {
  "statusCode": 200,
  "merchant_id": "9cc5c-d243a-9f952-66b92",
  "hash": "0YrwsUOcXmCX8GpY4N64CgEwsYh/Gk3s2m56DoBiwM2Xp3AHthc8R14PAfhb0CtDuTENB+K1fMaA5XnvJBHLoA==",
  "data": {
    "address": "3MitLfWoRxvaA3FHZHqdDQJAQSUFGnkAcG",
    "balance": 0.00981,
    "sell_price": 9260.25,
    "usd_balance": 90.84,
    "txid": "txid1234456789876543",
    "timestamp": 1582949871
  }
}
```

**Address Timeout**

```json
 {
  "statusCode": 10011,
  "merchant_id": "9cc5c-d243a-9f952-66b92",
  "hash": "HbUGU9q0DBMl/Lgzfy/3XkvXzEilh51GMbs3uEB0rNcguxjNfLuo1CGAsqYvdwzr90s+TAoaWdLsnjUrc5He2A==",
  "data": {
    "address": "3MitLfWoRxvaA3FHZHqdDQJAQSUFGnkAcG",
    "msg": "Address timeout",
    "timestamp": 1582949945
  }
}
```

**Confirmation Counts**

* **1 Confirmation:**

  ```json
   {
    "statusCode": 200,
    "merchant_id": "9cc5c-d243a-9f952-66b92",
    "hash": "dEebptMC3XYervCusINtGn9k/KJ/XTTRI9ulkGveED/G9bxaAEZ/uDCvmssCpiV81K8g+Q67fCwMi6l8+wdiJQ==",
    "data": {
      "address": "3MitLfWoRxvaA3FHZHqdDQJAQSUFGnkAcG",
      "txid": "txid1234456789876543",
      "confirmation": 1,
      "usd_balance": 95.47,
      "balance": 0.01045,
      "sell_price": 8727.2,
      "timestamp": 1582950104,
      "risk_level": 1
    }
  }
  ```
* **3 Confirmations:**

  ```json
   {
    "statusCode": 200,
    "merchant_id": "9cc5c-d243a-9f952-66b92",
    "hash": "uxUNsinUTxD7YRAAJiLNNfDKn7+KXUY3k/l7nPz9Tpx9Zhqc2jQzb65gTFRfT7DZp0+S7lotuiT36gr5Qw+4ow==",
    "data": {
      "address": "3MitLfWoRxvaA3FHZHqdDQJAQSUFGnkAcG",
      "txid": "txid1234456789876543",
      "confirmation": 3,
      "usd_balance": 95.47,
      "balance": 0.01045,
      "sell_price": 8727.2,
      "timestamp": 1582950200,
      "risk_level": 1
    }
  }
  ```
* **6 or More Confirmations:**

  ```json
   {
    "statusCode": 200,
    "merchant_id": "9cc5c-d243a-9f952-66b92",
    "hash": "uxUNsinUTxD7YRAAJiLNNfDKn7+KXUY3k/l7nPz9Tpx9Zhqc2jQzb65gTFRfT7DZp0+S7lotuiT36gr5Qw+4ow==",
    "data": {
      "address": "3MitLfWoRxvaA3FHZHqdDQJAQSUFGnkAcG",
      "txid": "txid1234456789876543",
      "confirmation": 6,
      "usd_balance": 95.47,
      "balance": 0.01045,
      "sell_price": 8727.2,
      "timestamp": 1582950200,
      "risk_level": 1
    }
  }
  ```

#### Response Parameters

<table><thead><tr><th width="249">Parameter Name</th><th width="130.33333333333331">Type</th><th>Explanation</th></tr></thead><tbody><tr><td>address</td><td>string</td><td>Bitcoin address involved in the transaction</td></tr><tr><td>txid</td><td>string</td><td>Blockchain transaction identifier</td></tr><tr><td>confirmation</td><td>number</td><td>Number of confirmations for the transaction</td></tr><tr><td>usd_balance</td><td>decimal</td><td>The equivalent balance in USD</td></tr><tr><td>balance</td><td>decimal</td><td>The amount of Bitcoin received</td></tr><tr><td>sell_price</td><td>decimal</td><td>The price of Bitcoin at the time of transaction</td></tr><tr><td>timestamp</td><td>number</td><td>Timestamp when the transaction occurred</td></tr><tr><td>risk_level</td><td>number</td><td>0, pending 1 low, 2 high, 3 medium, 4 severe</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hyperhashing.gitbook.io/hyperhashing-api/single-use-payment-v1/bitcoin-call-back.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
