This value is generated automatically at the moment of payout creation and can’t be changed.
amount
string
The payout amount, in the payment currency.
address
string
The blockchain address of a receiver’s wallet.
target_deposit
string or null
The identifier of a B2BINPAY deposit, in the UUID4 format. The same as the payment page identifier.
target_wallet
string or null
For payouts to client’s own wallets (such as payouts from Enterprise/Merchant wallets to Swap wallets and back): the identifier of a wallet to which the payout is made.
For other payouts, the value is null.
tracking_id
string
The identifier assigned to a payout for easier locating related payments in external systems.
This value is set when creating a payout and can be changed anytime.
label
string
The tag or name assigned to a payout for easier locating it in the system.
This value is set when creating a payout and can be changed anytime.
confirmations_needed
number
The number of confirmations needed to trigger an additional callback.
If this field is not null, two callbacks are sent: upon receiving the number of confirmations specified here and upon receiving the number of confirmations specified in the system settings. The corresponding transaction is assigned the Confirmed status as soon as the number of confirmations specified in this field received.
fee_amount
string
The blockchain fee charged for processing an on-chain transaction, in the payment currency.
is_fee_included
boolean
If true, the fee is included in the payment amount, the remaining part is credited to the receiver’s account. If false, the fee is additionally debited from the wallet.
The fee can’t be included in the amount for tokens and the following currencies:
ADA (Cardano)
ARB (Arbitrium)
AVAX (Avalanche)
BNB (BSC)
ETH
ETH-BASE
MATIC (Polygon)
OPT (Optimism)
TRX (Tron)
XLM (Stellar)
XMR (Monero)
XRP (Ripple)
status
number
The current payout status. Possible values:
1 — Waiting for approval — for a payout created by a user with the Withdrawal with approval role: the payout was created and awaits the approval.
2 — Approved — the payout was approved.
3 — Cancelled — the payout was cancelled.
rate_requested
string or null
If the payment currency differs from the wallet currency, the value is the exchange rate of the payment currency to the wallet currency; otherwise, the value is 1.
The exchange rates are updated every 30 seconds.
callback_url
string
The URL for callback notifications on new payments.
force_blockchain
boolean
Applicable for payouts from Merchant wallets only.
If the destination address of a payout also belongs to B2BINPAY, such a transaction is off-chain. As a result, it doesn’t have a txid and can’t be found in block explorers. Set this value to true, to obtain txid.
By default, the value is false.
exp
number
The payment currency precision, that is the number of digits after the decimal separator.
tag_type
string or null
Applicable for payouts in XLM only.
The tag or memo type. Possible values:
0 — no memo
1 — a 64-bit unsigned integer
tag
string or null
For payouts in XRP or XLM: the destination tag.
For other payouts, the value is null.
destination
object or null
The deposit address.
travel_rule_info
object
The information about a payment receiver.
The object fields are different for natural and legal persons, refer to Travel rule for more information and examples.
currency
object
The payment currency.
The object contains the string id field matching the currency ISO code (refer to Currency codes for possible values). For Merchant wallets, if the payment currency wasn’t specified, currency.data is null.
wallet
object
The wallet to which the deposit was made.
The object contains the string id field matching the wallet system identifier.
In case of success, the response body contains a payout 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.
Response codes
HTTP code
Application code
Description
Suggested action
200
—
The request succeeded.
—
400
5001: You can not view payout
You don’t have permissions to view the payout.
—
401
2007: No active account found with the given credentials
Incorrect credentials.
Send correct credentials.
404
404: Not found
The deposit with the given id wasn’t found.
Send a correct id.
500
—
Internal server error.
Try again later.
502
—
Bad gateway.
Try again later.
503
—
Service unavailable.
Try again later.
504
—
Gateway timeout.
Try again later.
5xx
—
Other server errors.
Try again later.
Create payout
Before creating a payout, you can retrieve parameters of the fields you need to fill in by calling the Payout options method.
For security reasons, an additional HTTP header with a unique idempotency key must be sent in the request. The key is a UUID4 string with hyphens, for example: 2dbcb513-bd35-404f-9709-e34878def180.
Refer to Useful links for recommended programming packages and libraries that you can use to generate UUID4.
Request
POST[base]/payout/
Name
Type
Required
Description
label
string
No
The tag or name assigned to a payout for easier locating it in the system.
The maximum string length is 32 characters.
amount
string
Yes
The payout amount, in the payment currency.
The maximum string length is 36 characters.
fee_amount
string
No
The blockchain fee to be charged for processing an on-chain transaction, in the payment currency.
In case of success, the response body contains a newly created payout object.
Response codes
HTTP code
Application code
Description
Suggested action
201
—
The request succeeded.
—
400
1007
An invalid value was specified for a field.
Send valid values.
400
3008
The wallet is inactive or is being registered in the system.
Activate the wallet or wait until the process of wallet registration in the system is finished and try again.
400
3021
A wallet activation transfer is required.
Make a transfer to activate the wallet.
400
3022
An invalid wallet type.
Make sure you specify either Enterprise, or Merchant, or Swap wallet.
400
4002
A payout can’t be made from the specified wallet.
Make sure you have the permission to make payouts from the wallet you have specified.
400
4007
The funds are sent to the wallet from which the payout is being made.
The funds can’t be sent to the wallet from which the payout is being made. Such transactions are allowed for the following blockchains: BTC, BCH, BSC, ADA, DASH, DOGE, ETH, LTC, OMNI, TRX, ZCASH.
400
4008
Insufficient funds.
Top up the wallet or decrease the payout amount.
400
4009
The specified blockchain fee is either too high or too low.
The family name, maiden name or married name, main name, surname, or, in some cases, the entire name when the natural person’s name can’t be divided into two parts, or when the sender is unable to divide the natural person’s name into two parts.
secondaryIdentifier
string
Yes
The forename, familiar name, given name, initials, prefixes, suffixes, Roman numerals (if legally part of the name), or any other secondary names.
country
string
No
The ISO-3166-1 alpha-2 code or the value XX.
addressLine
string
Yes
Information that locates and identifies a specific address, as defined by postal services, presented in free format text.
addressType
string
Yes
The nature of the address. Possible values:
HOME — Residential — the address is the home address.
BIZZ — Business — the address is the business address.
GEOG — Geographic — the address is the unspecified physical (geographical) address suitable for identification of the natural or legal person.
The nature of name being specified for the legal person. Possible values:
LEGL — Legal name — the official name under which an organization is registered.
SHRT — Short name — the short name of an organization.
TRAD — Trading name — the name used by a business for business purposes, although its registered legal name used for contracts and other formal situations may be different.
country
string
No
The ISO-3166-1 alpha-2 code or the value XX.
addressLine
string
Yes
Information that locates and identifies a specific address, as defined by postal services, presented in free format text.
addressType
string
Yes
The nature of the address. Possible values:
HOME — Residential — the address is the home address.
BIZZ — Business — the address is the business address.
GEOG — Geographic — the address is the unspecified physical (geographical) address suitable for identification of the natural or legal person.
Precalculate fee
Use this method to precalculate possible blockchain fee options.
For calculations, you need to provide the identifier of a wallet from which the payout is made along with the destination address and payout amount.
Request
POST[base]/payout/calculate/
Name
Type
Required
Description
amount
string
Yes
The payout amount, in the payment currency.
to_address
string
Yes
The payout destination address.
wallet
object
Yes
The unique system identifier of a wallet from which the payout is made.
The funds are sent to the wallet from which the payout is being made.
The funds can’t be sent to the same wallet from which the payout is being made.
400
4008
Insufficient funds.
Top up the wallet or decrease the payout amount.
400
6002
The selected currency is disabled.
Select an active currency.
400
7001
An incorrect payment address is specified or the address isn’t whitelisted.
Specify a correct payment address and proceed with the payment.
400
—
Invalid data (serializer errors).
Send valid data.
401
—
No active account with the given credentials is found.
Send correct credentials or update access tokens.
403
403
Permission denied.
Make sure that:
The registration process is completed, the KYC is passed.
The access token is valid.
The correct wallet is specified in the request.
500
500
Internal server error.
Try again later.
502
—
Bad gateway.
Try again later.
503 (old 400)
4018
Fee calculation or payout creation for the selected currency is temporarily unavailable.
Change the currency or try again later.
503
—
Service unavailable.
Try again later.
504
—
Gateway timeout.
Try again later.
5xx
—
Other server errors.
Try again later.
Payout callback
A callback is a notification sent to a user’s callback URL when a new payout-related transaction occurs in the blockchain. You can use the callback to make changes in your system and notify your payers.
Default callback
By default, the callback is sent after the transaction is confirmed. To get confirmed, a transaction should receive a necessary number of and pass the verification. The required number of confirmations is determined by the confirmation_blocks field in the Currency object. For example, the confirmation_blocks field is set to 3. This means that the callback will be sent after receiving three confirmations and passing the AML check.
Additional callback
It’s possible to trigger an additional callback. To do this, specify a new number in the confirmations_needed field when calling the Create payout method. For example, the confirmation_blocks value is set to 3 and the confirmations_needed value is set to 1. In this case, two callbacks will be sent: one (additional) after a transaction receives one confirmation and another one (default) after a transaction receives three confirmations.
Callback processing
Upon receiving a required number of confirmations related to a new transaction, the callback is sent to your server if the payout request body includes a valid callback URL. The callback is sent by a POST-request, which contains useful JSON payload.
To verify that the callback was sent by B2BINPAY, generate an HMAC-signature using sha256 as algorithm: sha256 hash of the concatenation of your login and password as a key, and the concatenation of the transfer.status, transfer.amount, deposit.tracking_id, meta.time fields as message. Refer to the example below for a callback verification example.
After processing the payload, you should send back the HTTP 200 response code without a body. If your server is temporarily unavailable or the status of the response is different from 200, the system will resend the callback several times with the increasing delay time. The number of re-sendings is limited. If the manual resending is required, you can do it on the Wallet management > Events page in the Web UI.
Callback structure
The callback consists of three parts:
data — the deposit itself. Contains the Payout object.
In case of success, the response body contains an array of available methods along with a list of field parameters such as labels, min and max values, regular expressions used for validation, and so on.
Response codes
HTTP code
Description
Suggested action
200
The request succeeded.
—
500
Internal server error.
The request wasn’t completed due to an internal error on the server side.