Creating a payout
Method POST
https://fast-pay.top/api/payout
Headers
Accept | application/json |
Content-Type | application/json |
Request parameters
api_id | int | API ID |
api_key | string | API key |
amount | string | amount |
coin | string | TRX or USDT or USDC |
order_id | string (min:1, max:100) | Order ID in your system |
address | string | Address |
is_subtract | boolean | Withdrawal fee (true - from your balance, false - from payout amount) |
PHP EXAMPLE
include('FastPayApi.php');
$apiId = 583;
$apiKey = 'nSqjryEhvZMy8DlgCaYdVPoHyRJxgxWN';
$fastPayApi = new FastPayApi();
$fastPayApi->setApiId($apiId);
$fastPayApi->setApiKey($apiKey);
$amount = 2224.699680;
$coin = 'TRX';
$order_id = 'order_123';
$address = 'TPu2PhiS5Vf6vB7FwiKDtEAGgD3VBtpiER';
$is_subtract = true;
$response = $fastPayApi->payout($amount, $coin, $order_id, $address, $is_subtract);
$data = json_decode ($response, true);
if ($data['status'] === 'success') {
$id = $data['data']['id']; // FastPay Payout ID
$txid = $data['data']['txid']; // Transaction hash on the blockchain
$amount = $data['data']['amount']; // Amount
$address = $data['data']['address']; // Address
$commission = $data['data']['commission']; // Withdrawal fee FastPay
$coin = $data['data']['coin']; // TRX or USDT or USDC
$balance = $data['data']['balance']; // Balance
$order_id = $data['data']['order_id']; // Order ID in your system
}
$apiId = 583;
$apiKey = 'nSqjryEhvZMy8DlgCaYdVPoHyRJxgxWN';
$fastPayApi = new FastPayApi();
$fastPayApi->setApiId($apiId);
$fastPayApi->setApiKey($apiKey);
$amount = 2224.699680;
$coin = 'TRX';
$order_id = 'order_123';
$address = 'TPu2PhiS5Vf6vB7FwiKDtEAGgD3VBtpiER';
$is_subtract = true;
$response = $fastPayApi->payout($amount, $coin, $order_id, $address, $is_subtract);
$data = json_decode ($response, true);
if ($data['status'] === 'success') {
$id = $data['data']['id']; // FastPay Payout ID
$txid = $data['data']['txid']; // Transaction hash on the blockchain
$amount = $data['data']['amount']; // Amount
$address = $data['data']['address']; // Address
$commission = $data['data']['commission']; // Withdrawal fee FastPay
$coin = $data['data']['coin']; // TRX or USDT or USDC
$balance = $data['data']['balance']; // Balance
$order_id = $data['data']['order_id']; // Order ID in your system
}
Success JSON Response:
{
"status": "success",
"data": {
"id": "7516",
"txid": "0e00ce86edb440bcdf27ff4ece18092c5b8b7f9980ef6a5d879a32fc224f992d",
"amount": "2224.699680",
"address": "TPu2PhiS5Vf6vB7FwiKDtEAGgD3VBtpiER",
"commission": "66.740990",
"coin": "TRX",
"balance": "4124.524722",
"order_id": "order_123"
}
}
Error JSON Response:
{
"status": "error",
"errors": {
"error": "User Not found!"
}
}