Pay-Outs & Withdrawals
Send USDT to external wallets — user withdrawals, treasury payouts, and withdrawal request management via API.
Pay-Outs & Withdrawals
Two outbound money flows:
- Payouts — Company-initiated transfers. Dashboard-only with OTP.
- User Withdrawals — End-user requests. Auto-approved or merchant-approved.
Both deduct from merchant balance, execute on-chain, and send webhook notifications.
Rate Limits
| Endpoint | Tier | Limit |
|---|---|---|
POST /public/user/withdrawal/create | Financial | 30 / 15 min |
GET /public/withdrawal-requests | Standard | 100 / 15 min |
POST /public/withdrawal-requests/{id}/approve | Financial | 30 / 15 min |
POST /public/withdrawal-requests/{id}/reject | Financial | 30 / 15 min |
GET /public/payout/get | Standard | 100 / 15 min |
Create a User Withdrawal
Always auto-approves and executes immediately.
POST /api/v1/public/user/withdrawal/create
Auth: apikey + x-api-secret (recommended)
| Parameter | Type | Required | Description |
|---|---|---|---|
userId | string | Yes | Your internal user ID |
walletAddress | string | Yes | Destination wallet |
amount | number | Yes | Amount in USDT (min: 0.1) |
currencyType | string | Yes | USDT-TRC20 or USDT-ERC20 |
callbackUrl | string | No | Webhook URL for this withdrawal |
const response = await axios.post(
"https://pay.3pa-y.com/api/v1/public/user/withdrawal/create",
{
userId: "user-12345",
walletAddress: "TN7oGaKhMfSfAwnVUiPNaEiGgRbRQGrain",
amount: 50,
currencyType: "USDT-TRC20"
},
{ headers: { apikey: "your-api-key", "x-api-secret": "your-api-secret" } }
);
// response.data.data → { status: "completed", transactionHash: "abc123...", fee: 2, netAmount: 48 }Validation Rules
- User must have a generated wallet
- User + merchant balance must cover the amount
- Minimum: 0.1 USDT, net amount after fee must be positive
- Address format: TRC20 starts with
T, ERC20 starts with0x
Fees
| Network | Flat Fee |
|---|---|
| USDT-TRC20 | 2 USDT |
| USDT-ERC20 | 2.5 USDT |
withdrawalFeePayer controls who pays: "merchant" or "user". Details: Settlement & Reconciliation
Withdrawal Request Management
For withdrawals that go through the approval flow.
List Pending Requests
GET /api/v1/public/withdrawal-requests?status=pending&page=1&limit=20
Auth: apikey
Approve
POST /api/v1/public/withdrawal-requests/{withdrawalId}/approve
Auth: apikey + x-api-secret (required)
Triggers blockchain execution immediately.
Reject
POST /api/v1/public/withdrawal-requests/{withdrawalId}/reject
Auth: apikey + x-api-secret (required)
Restores the pending amount to merchant balance.
// Approve example
await axios.post(
`https://pay.3pa-y.com/api/v1/public/withdrawal-requests/${id}/approve`,
{},
{ headers: { apikey: "your-api-key", "x-api-secret": "your-api-secret" } }
);
x-api-secretis required for approve/reject — additional auth for money-moving operations.
Auto-Approve Settings
| Setting | Default | Description |
|---|---|---|
autoWithdraw | false | Auto-approve withdrawals below threshold |
maxAutoWithdrawAmount | 100 | Max USDT for auto-approval |
- Enabled + under threshold: 1 webhook (
completed/failed) - Disabled or over threshold:
pending→ merchant approves → 2 webhooks
Configure in Dashboard > Settings.
Webhook Notifications
Auto-approved (1 webhook): status: "completed" or "failed" with type: "withdrawal".
Manual approval (2 webhooks):
status: "pending"when createdstatus: "completed"/"failed"/"rejected"after merchant action
See Webhook Handling for payload structure and HMAC verification.
Get Payout Details
GET /api/v1/public/payout/get?id={withdrawalId}
Auth: apikey — read-only query for any payout/withdrawal.
Note:
POST /payout/createis disabled — payouts are dashboard-only with 2FA.
Error Handling
| Error | Code | Solution |
|---|---|---|
x-api-secret header is required | 401 | Include x-api-secret on approve/reject |
Insufficient user wallet balance | 400 | Check balance before requesting |
Insufficient merchant balance | 400 | Top up merchant balance |
Minimum withdrawal amount is greater than 0.1 USDT | 400 | Send at least 0.1 USDT |
Invalid wallet address format | 400 | TRC20: starts with T, ERC20: starts with 0x |
Only pending withdrawals can be approved | 400 | Check current status first |
Updated 26 days ago
