- Getting Started
- Payments and Withdrawals
- Callbacks
- Address validation
- Rates and metadata
Request crypto withdrawal
POST
/api/v1/withdrawals
targetAmountPolicy
.When FIAT is selected as policy the resulting amount of the withdrawal in crypto will be calculated according to the fiat amount passed in targetAmount field. When CRYPTO is selected as policy the resulting amount of the withdrawal will be exactly the same as the amount passed in targetAmount field (subject to a negligible difference due to market conditions i.e. market step size)
Request
Authorization
Add parameter in header
FRX-API
Example:
FRX-API: ********************
Body Params application/json
businessId
string <uuid>
required
clientWithdrawalId
stringÂ
required
recipientAddress
stringÂ
required
destinationTag
stringÂ
optional
network
enum<string>Â
optional
ETH stands for Ethereum network. This will be set as the default value when none is provided.
TRX stands for TRON network. Before executing any withdrawals through this network, please make sure your address supports it.
BSC stands for Binance Smart Chain. Before executing any withdrawals through this network, please make sure your address supports it.
Currency | Network |
---|---|
BTC | BTC |
BCH | BCH |
ETH | ETH, BSC |
LINK | ETH |
LTC | LTC |
SOL | SOL |
USDC | ETH, BSC, SOL |
USDT | ETH, BSC, SOL, TRX |
XLM | XLM |
XRP | XRP |
Allowed values:
BCHBTCLTCXLMXRPETHBSCSOLTRX
withdrawCurrency
enum<string>Â
required
Allowed values:
BCHBNBBTCETHLINKLTCSOLTRXUSDCUSDTXLMXRP
displayCurrency
enum<string>Â
required
Allowed values:
AEDARSAUDBDTBGNBRLCADCHFCLPCNYCZKDKKEURGBPHKDHRKHUFIDRILSINRISKJPYKESKRWMXNMYRNGNNOKNZDPENPHPPLNQARRONRUBSEKSGDTHBTRYUSDVNDZAR
targetAmountPolicy
enum<string>Â
required
targetAmount
will be requested in fiat or crypto.Allowed values:
CRYPTOFIAT
targetAmount
stringÂ
required
targetAmountPolicy
.withdrawalAccount
enum<string>Â
optional
Allowed values:
CRYPTOFIAT
Default:
the organisation's default setting
blockchainFeePaidBy
enum<string>Â
optional
Allowed values:
USERMERCHANT
Default:
the business' default setting
Example
{
"businessId": "407710f4-de33-454b-a47f-dda792e272c8",
"clientWithdrawalId": "test-withdrawal-23-12-19-2",
"recipientAddress": "0x5CF631Db2eB6be3eecB5E9fD0f31a19AC0F4C504",
"network": "BSC",
"withdrawCurrency": "USDC",
"displayCurrency": "EUR",
"targetAmount": "21",
"targetAmountPolicy": "FIAT",
"withdrawalAccount": "FIAT"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://payments.finrax.com/api/v1/withdrawals' \
--header 'Content-Type: application/json' \
--header 'FRX-API;' \
--data-raw '{
"businessId": "407710f4-de33-454b-a47f-dda792e272c8",
"clientWithdrawalId": "test-withdrawal-23-12-19-2",
"recipientAddress": "0x5CF631Db2eB6be3eecB5E9fD0f31a19AC0F4C504",
"network": "BSC",
"withdrawCurrency": "USDC",
"displayCurrency": "EUR",
"targetAmount": "21",
"targetAmountPolicy": "FIAT",
"withdrawalAccount": "FIAT"
}'
Responses
🟢201Withdrawal request created successfully.
application/json
Body
withdrawId
string <uuid>
required
clientWithdrawId
stringÂ
required
recipientAddress
stringÂ
required
recipientTag
stringÂ
optional
network
enum<string>Â
required
Allowed values:
BCHBTCLTCXLMXRPETHBSCSOLTRX
initiatedBy
stringÂ
required
status
enum<string>Â
required
Allowed values:
PENDINGCOMPLETEDFAILEDBLOCKED
displayCurrency
enum<string>Â
required
Allowed values:
AEDARSAUDBDTBGNBRLCADCHFCLPCNYCZKDKKEURGBPHKDHRKHUFIDRILSINRISKJPYKESKRWMXNMYRNGNNOKNZDPENPHPPLNQARRONRUBSEKSGDTHBTRYUSDVNDZAR
estimatedDisplayAmount
stringÂ
required
displayCurrency
requested for this withdrawal.displayServiceFee
stringÂ
optional
displayCurrency
.withdrawCurrency
enum<string>Â
required
Allowed values:
BCHBNBBTCETHLINKLTCSOLTRXUSDCUSDTXLMXRP
estimatedWithdrawAmount
stringÂ
required
actualWithdrawAmount
.settlementCurrency
enum<string>Â
required
Allowed values:
BTCUSDCUSDTEURGBPUSD
settlementDeductedAmount
stringÂ
required
settlementCurrency
.settlementServiceFee
stringÂ
required
settlementCurrency
.uniformCurrency
stringÂ
required
uniformAmount
stringÂ
required
uniformCurrency
requested for this withdrawal.uniformServiceFee
stringÂ
optional
uniformCurrency
.createdAt
integer <int64>
required
Examples
{
"withdrawId": "5724d752-6084-3822-9590-a6ccdf91f603",
"clientWithdrawId": "test-withdrawal-23-12-19-2",
"recipientAddress": "0x5CF631Db2eB6be3eecB5E9fD0f31a19AC0F4C504",
"network": "BSC",
"initiatedBy": "john.doe@gmail.com",
"status": "PENDING",
"displayCurrency": "EUR",
"estimatedDisplayAmount": "21",
"displayServiceFee": "0.25",
"withdrawCurrency": "USDC",
"estimatedWithdrawAmount": "23.01742298",
"settlementCurrency": "EUR",
"settlementDeductedAmount": "21.25",
"settlementServiceFee": "0.25",
"uniformCurrency": "EUR",
"uniformAmount": "21",
"uniformServiceFee": "0.25",
"createdAt": 1702999367
}
🟢202Withdrawal requested and pending approval.
Modified at 2024-07-24 14:04:47