FastUSDT Pay API Reference
FastUSDT Pay provides a modern RESTful API to accept USDT deposits on TRON (TRC20) and Binance Smart Chain (BEP20). All API endpoints accept and return JSON.
Base API URL:
http://fastusdtpay.damanplay.site/api/v1/
2. Authentication
To authenticate requests, obtain your API Key and Secret Key from your Merchant Portal.
Pass your API Key in the JSON request body as api_key or as an HTTP Header:
X-API-KEY: fup_key_your_public_api_key
POST
/api/v1/create_order.php
Create a new USDT payment invoice for your customer.
Request Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | Your merchant API Key |
| merchant_order_id | string | Yes | Unique invoice/order ID from your database (e.g. ORD_1029) |
| amount | float | Yes | Deposit amount in USDT (e.g. 50.00) |
| currency | string | No | USDT.TRC20 (default) or USDT.BEP20 |
| customer_id | string | No | User ID in your system |
PHP Integration Example (Ready to copy)
<?php
$payload = [
'api_key' => 'YOUR_API_KEY_HERE',
'merchant_order_id' => 'ORD_' . time(),
'amount' => 10.00,
'currency' => 'USDT.TRC20',
'customer_id' => 'USER_123'
];
$ch = curl_init('http://fastusdtpay.damanplay.site/api/v1/create_order.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
if ($result && $result['success']) {
// Redirect user to FastUSDT Pay checkout page:
header("Location: " . $result['data']['checkout_url']);
exit;
} else {
echo "Error: " . $result['message'];
}
?>
5. Verifying Instant Webhooks
When an on-chain deposit is detected and confirmed, FastUSDT Pay sends an HTTP POST request to your merchant Callback URL.
Every request includes an X-FUP-Signature header generated using HMAC-SHA256 with your Secret Key.
Webhook Listener Sample (PHP)
<?php
$secretKey = 'YOUR_SECRET_KEY_HERE';
// 1. Get raw request body and signature header
$rawBody = file_get_contents('php://input');
$receivedSignature = $_SERVER['HTTP_X_FUP_SIGNATURE'] ?? '';
// 2. Compute expected HMAC-SHA256 signature
$expectedSignature = hash_hmac('sha256', $rawBody, $secretKey);
// 3. Verify signature
if (!hash_equals($expectedSignature, $receivedSignature)) {
http_response_code(403);
die('Invalid webhook signature');
}
$data = json_decode($rawBody, true);
if ($data['status'] === 'PAID') {
$merchantOrderId = $data['merchant_order_id'];
$amountPaid = $data['amount_usdt'];
$txid = $data['txid'];
// TODO: Update your database and credit user wallet here!
// Example: $db->query("UPDATE users SET balance = balance + $amountPaid WHERE id = '{$data['customer_id']}'");
http_response_code(200);
echo json_encode(['status' => 'success']);
exit;
}
?>