Transfer methods

Transfer object

id string

The unique system identifier of a transfer.

This value is generated automatically at the moment of transfer creation and can’t be changed.

op_id number

For deposits and payouts, this is the unique operation identifier in the system.

op_type number

The transfer purpose. For possible values, refer to Transfer types.

amount string

The transfer amount, in the payment currency, excluding fees and commissions.

rate_target string

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.

If the payment currency is the same as the wallet currency, this value is equal to 1.

commission string

The fee charged by B2BinPay for transaction processing, in the payment currency.

fee string

The blockchain fee charged for processing an on-chain transaction, in the payment currency.

txid string

The blockchain transaction identifier, the same as the transaction hash.

status number

The current status of a transfer. Possible values:

  • -3 — Cancelled — the transfer was cancelled due to security reasons or a transfer amount being too small.

  • -2 — Blocked — the transfer was considered suspicious during the AML check and is temporarily blocked until further Compliance verification.

  • -1 — Failed — the transfer has failed in the blockchain.

  • 0 — Created — the transfer has been created and is currently in the queue for processing, the status will be changed soon.

  • 1 — Unconfirmed — the transfer hasn’t yet received the required number of block confirmations.

  • 2 — Confirmed — the required number of block confirmations has been received and the transfer is completed.

user_message string or null

Any comment for an operation made via the B2BinPay Back Office.

created_at string

The date and time when a transfer was created.

updated_at string

The date and time when a transfer status was last updated.

confirmations number

The current number of received confirmations in the blockchain.

risk number

The AML risk percentage for a transfer.

Possible range of values is from 0 to 100, where 100 is the highest risk. May be null if AML verification hasn’t been performed.

risk_status number

The status of AML verification of a transfer. Possible values:

  • 1 — Checked — the transfer has successfully passed the AML check.

  • 2 — Pending — the AML check is in progress.

  • 3 — Failed — the AML check has failed, the transfer has been marked as red.

  • 4 — Unavailable — the AML check is unavailable for this transfer type.

amount_target string

The amount that is debited from or credited to a wallet, in the wallet currency, including fees and commissions.

commission_target string

This is a service field. The value is always "0".

amount_cleared string

The amount by which the transfer changes the wallet balance. For outgoing transfers, the value is multiplied by -1.

currency object

The payment currency.

For Enterprise wallets, always the same as the wallet currency. For Merchant wallets, may differ from the wallet currency.

The object contains the string id field matching the currency ISO code (refer to Currency codes for possible values).

wallet object

The wallet to or from which the transfer was made.

The object contains the string id field matching the wallet system identifier.

parent object

Applicable mainly for tokens.

The object contains a link to the parent transfer, if the current transfer depends on the parent one. In other cases, returns "data": null.

TRANSFER OBJECT
{
  "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

id string

The unique system identifier of a transfer.

Filtering by object parameters can be applied according to the JSON API Specification.

GET[base]/transfer/{id}

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

url = '[base]/transfer/'

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

requests.get(url, headers=headers)
<?php

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

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

Response

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

Response codes