# Transfer methods

## Transfer object

<table><thead><tr><th width="232">Name</th><th width="106">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td>string</td><td><p>The unique system identifier of a transfer.</p><p>This value is generated automatically at the moment of transfer creation and can’t be changed.</p></td></tr><tr><td><code>op_id</code></td><td>number</td><td>For deposits and payouts, this is the unique operation identifier in the system.</td></tr><tr><td><code>op_type</code></td><td>number</td><td>The transfer purpose. For possible values, refer to <a href="/pages/cIKY2NaYCoZkctFTjpX6">Transfer types</a>.</td></tr><tr><td><code>amount</code></td><td>string</td><td>The transfer amount, in the payment currency, excluding fees and commissions.</td></tr><tr><td><code>rate_target</code></td><td>string</td><td><p>If the payment currency differs from the wallet currency, this is the exchange rate of the payment currency to the wallet currency, valid at the moment of transaction execution.</p><p>If the payment currency is the same as the wallet currency, this value is equal to <code>1</code>.</p></td></tr><tr><td><code>commission</code></td><td>string</td><td>The fee charged by B2BINPAY for transaction processing, in the payment currency.</td></tr><tr><td><code>fee</code></td><td>string</td><td>The blockchain fee charged for processing an on-chain transaction, in the payment currency.</td></tr><tr><td><code>txid</code></td><td>string</td><td>The blockchain transaction identifier, the same as the transaction hash.</td></tr><tr><td><code>status</code></td><td>number</td><td><p>The current status of a transfer. Possible values:</p><ul><li><code>-3</code> — Canceled — the transfer was canceled due to security reasons or a transfer amount being too small.</li><li><code>-2</code> — Blocked — the transfer was considered suspicious during the AML check and is temporarily blocked until further Compliance verification.</li><li><code>-1</code> — Failed — the transfer has failed on the blockchain.</li><li><code>0</code> — Created — the transfer has been created and is currently in the queue for processing, the status will be changed soon.</li><li><code>1</code> — Unconfirmed — the transfer hasn’t yet received the required number of block confirmations.</li><li><code>2</code> — Confirmed — the required number of block confirmations has been received and the transfer is completed.</li></ul></td></tr><tr><td><code>user_message</code></td><td>string or null</td><td>Any comment for an operation made via the B2BINPAY Back Office.</td></tr><tr><td><code>created_at</code></td><td>string</td><td>The date and time when a transfer was created.</td></tr><tr><td><code>updated_at</code></td><td>string</td><td>The date and time when a transfer status was last updated.</td></tr><tr><td><code>confirmations</code></td><td>number</td><td>The current number of received confirmations on the blockchain.</td></tr><tr><td><code>risk</code></td><td>number</td><td><p>The AML risk percentage for a transfer.</p><p>Possible range of values is from <code>0</code> to <code>100</code>, where <code>100</code> is the highest risk. May be <code>null</code> if AML verification hasn’t been performed.</p></td></tr><tr><td><code>risk_status</code></td><td>number</td><td><p>The status of <a data-footnote-ref href="#user-content-fn-1">AML</a> verification of a transfer. Possible values:</p><ul><li><code>1</code> — Checked — the transfer has successfully passed the AML check.</li><li><code>2</code> — Pending — the AML check is in progress.</li><li><code>3</code> — Failed — the AML check has failed, the transfer has been marked as red.</li><li><code>4</code> — Unavailable — the AML check is unavailable for this transfer type.</li></ul></td></tr><tr><td><code>amount_target</code></td><td>string</td><td>The amount that is debited from or credited to a wallet, in the wallet currency, including fees and commissions.</td></tr><tr><td><code>commission_target</code></td><td>string</td><td>This is a service field. The value is always <code>"0"</code>.</td></tr><tr><td><code>amount_cleared</code></td><td>string</td><td>The amount by which the transfer changes the wallet balance. For outgoing transfers, the value is multiplied by -1.</td></tr><tr><td><code>currency</code></td><td>object</td><td><p>The payment currency.</p><p>For Enterprise wallets, always the same as the wallet currency. For Merchant wallets, may differ from the wallet currency.</p><p>The object contains the string <code>id</code> field matching the currency ISO code (refer to <a href="/pages/XWwiLjmtneibLyPJTo7w">Currency codes</a> for possible values).</p></td></tr><tr><td><code>wallet</code></td><td>object</td><td><p>The wallet to or from which the transfer was made.</p><p>The object contains the string <code>id</code> field matching the wallet system identifier.</p></td></tr><tr><td><code>parent</code></td><td>object</td><td><p>Applicable mainly for tokens.</p><p>The object contains a link to the parent transfer, if the current transfer depends on the parent one. In other cases, returns <code>"data": null</code>.</p></td></tr></tbody></table>

#### Transfer object example

```json
{
  "type": "transfer",
  "id": "8163",
  "attributes": {
    "op_id": 3262,
    "op_type": 14,
    "amount": "0.77700000",
    "rate_target": "1.000000000000000000",
    "commission": "0.00233100",
    "fee": "0.00000000",
    "txid": "0f82d9a82c166ed87a47b968e6a713c...",
    "status": 2,
    "user_message": null,
    "created_at": "2024-02-08T11:16:16.179799Z",
    "updated_at": "2024-02-08T11:16:17.483373Z",
    "confirmations": 191,
    "risk": 0,
    "risk_status": 4,
    "amount_target": "0.77466900",
    "commission_target": "0",
    "amount_cleared": "0.77466900"
  },
  "relationships": {
    "currency": {
      "data": {
        "type": "currency",
        "id": "1000"
      }
    },
    "wallet": {
      "data": {
        "type": "wallet",
        "id": "3262"
      }
    },
    "parent": {
      "data": null
    }
  }
}
```

***

## Get transfer

### Request

<mark style="color:green;">`GET`</mark> `[base]/transfer/`<mark style="color:blue;">`{id}`</mark>

<table><thead><tr><th width="135">Name</th><th width="106">Type</th><th width="100">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td>string</td><td>No</td><td>The unique system identifier of a transfer.</td></tr></tbody></table>

Filtering by object parameters can be applied according to the [JSON API Specification](https://jsonapi.org/format/#query-parameters-families).

#### Request example

{% tabs %}
{% tab title="cURL" %}

```sh
curl --request GET \
--url [base]/transfer/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = '[base]/transfer/'

headers = {
  'Authorization': 'Bearer <token>',
  'Content-Type': 'application/vnd.api+json',
}

requests.get(url, headers=headers)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

use GuzzleHttp\Client;
use GuzzleHttp\Exception\RequestException;

$client = new GuzzleHttp\Client();
try {
  $res = $client->get('[base]/transfer/', [
    'headers' => [
      'Authorization' => 'Bearer <token>',
      'Content-Type' => 'application/vnd.api+json',
    ],
  ]);
  echo $res->getBody();
} catch (RequestException $e) {}
```

{% endtab %}
{% endtabs %}

### Response

In case of success, the response body contains a [transfer object](#transfer-object) or an array of objects (if the `id` wasn’t specified).

The wallets list is paginated and the default page size is 10. You can adjust pagination according to the [JSON API Specification](https://jsonapi.org/format/#query-parameters-families).

#### Response codes

<table><thead><tr><th width="134">HTTP code</th><th width="274">Application code</th><th width="170">Description</th><th>Suggested action</th></tr></thead><tbody><tr><td><mark style="color:green;"><code>200</code></mark></td><td>—</td><td>The request succeeded.</td><td>—</td></tr><tr><td><mark style="color:red;"><code>401</code></mark></td><td>2007: No active account found with the given credentials</td><td>Incorrect credentials.</td><td>Send correct credentials.</td></tr><tr><td><mark style="color:red;"><code>404</code></mark></td><td>404: Not found</td><td>The transfer with the given <code>id</code> wasn’t found.</td><td>Send a correct <code>id</code>.</td></tr><tr><td><mark style="color:red;"><code>500</code></mark></td><td>—</td><td>Internal server error.</td><td>Try again later.</td></tr><tr><td><mark style="color:red;"><code>502</code></mark></td><td>—</td><td>Bad gateway.</td><td>Try again later.</td></tr><tr><td><mark style="color:red;"><code>503</code></mark></td><td>—</td><td>Service unavailable.</td><td>Try again later.</td></tr><tr><td><mark style="color:red;"><code>504</code></mark></td><td>—</td><td>Gateway timeout.</td><td>Try again later.</td></tr><tr><td><mark style="color:red;"><code>5xx</code></mark></td><td>—</td><td>Other server errors.</td><td>Try again later.</td></tr></tbody></table>

[^1]: Anti-Money Laundry


---

# 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://docs.b2binpay.com/api-guide/transfer-methods.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.
