Parameters to be sent to the service are as follows:
Input Name | Type | Required | Description |
---|---|---|---|
public_key | String | Yes | your public key |
private_key | String | Yes | your private key |
coin | String | No, default USDT | We only support USDT. |
network | String | No, default TRC20 | We only support TRC20. |
address | String | Yes | Wallet address to sent. |
amount | numeris | Yes | Amount to send |
Parameters to be returned from the service are as follows:
Input Name | Type | Description |
---|---|---|
status | String | success or error |
message | String | error message if status is error |
balance | numeric | balance after send |
network_fee | numeric | transaction cost |
<?php
// API URL to send the request to
$url = 'https://payid19.com/api/v1/create_withdraw';
// Data to be sent in the POST request
$post = [
'public_key' => 'yourpublickey', // Your public key for API access
'private_key' => 'yourprivatekey', // Your private key for API access
'coin' => 'USDT', // Cryptocurrency to withdraw
'network' => 'TRC20', // Network type for the withdrawal
'address' => 'walletaddresstosent', // Wallet address to send the funds
'amount' => 50 // Amount to withdraw
];
// Initialize a cURL session
$ch = curl_init();
// Set the URL for the cURL request
curl_setopt($ch, CURLOPT_URL, $url);
// Enable SSL certificate verification
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
// Return the response instead of printing it directly
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// Set the POST fields for the request
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
// Execute the cURL request and store the result
$result = curl_exec($ch);
// Close the cURL session
curl_close($ch);
// Decode the JSON response and check for errors
if (json_decode($result)->status == 'error') {
// If there's an error, display the error message
echo json_decode($result)->message;
} else {
// If the request is successful, display the updated balance
echo json_decode($result)->balance; // Display the current balance after withdrawal
}
?>
const axios = require('axios');
// API URL to send the request to
const url = 'https://payid19.com/api/v1/create_withdraw';
// Data to be sent in the POST request
const postData = {
public_key: 'yourpublickey', // Your public key for API access
private_key: 'yourprivatekey', // Your private key for API access
coin: 'USDT', // Cryptocurrency to withdraw
network: 'TRC20', // Network type for the withdrawal
address: 'walletaddresstosent', // Wallet address to send the funds
amount: 50 // Amount to withdraw
};
// Function to make the API call
axios.post(url, postData)
.then(response => {
const result = response.data;
// Check if the response indicates an error
if (result.status === 'error') {
// If there's an error, log the error message
console.log(result.message);
} else {
// If the request is successful, display the updated balance
console.log(result.balance); // Display the current balance after withdrawal
}
})
.catch(error => {
// Log any errors encountered during the request
console.error('Error:', error.message);
});
import requests
# API URL to send the request to
url = 'https://payid19.com/api/v1/create_withdraw'
# Data to be sent in the POST request
post_data = {
'public_key': 'yourpublickey', # Your public key for API access
'private_key': 'yourprivatekey', # Your private key for API access
'coin': 'USDT', # Cryptocurrency to withdraw
'network': 'TRC20', # Network type for the withdrawal
'address': 'walletaddresstosent', # Wallet address to send the funds
'amount': 50 # Amount to withdraw
}
# Make the POST request to the API
response = requests.post(url, data=post_data)
# Parse the JSON response
result = response.json()
# Check if the response indicates an error
if result.get('status') == 'error':
# If there's an error, print the error message
print(result.get('message'))
else:
# If the request is successful, display the updated balance
print(result.get('balance')) # Display the current balance after withdrawal