Thai/api/withdrawalsRequest Withdrawal
Create a withdrawal to a Thai bank account. The merchant's balance is debited and the payout is sent to the specified beneficiary account.
Overview
Submit a withdrawal request with your beneficiary bank details and amount. The system valThaiates your merchant account (via Bearer secret), checks your balance, resolves the Thai bank by name, and creates a withdrawal with status pending.
Note: The bank_name field must match one of the supported Thai bank names exactly. Withdrawals remain pending until processed.
How It Works
- Merchant sends POST request
- System valThaiates merchant, balance, and bank name
- Withdrawal created with status pending
- Response returns withdrawal details
Request Body
bank_account – Beneficiary bank account number
account_name – Account holder name
bank_name – Must exactly match supported Thai banks
amount – Minimum 100 THB, must not exceed balance
Supported Thai Banks
Code Examples
curl -X POST "https://api.altafinex.com/https:/Thai/api/withdrawals" \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"bank_account": "1234567890",
"account_name": "John Doe",
"bank_name": "Bangkok Bank Public Company Limited",
"amount": 500
}'Response
Status Codes
{
"bank_account": "1234567890",
"account_name": "John Doe",
"amount": 500,
"bank_code": "BBL",
"bank_name": "Bangkok Bank Public Company Limited"
}{
"statusCode": 401,
"message": "INVALThai_MERCHANT_SECRET",
"error": "Unauthorized"
}Error Examples
{
"statusCode": 400,
"message": "INSUFFICIENT_BALANCE",
"error": "Bad Request"
}{
"statusCode": 404,
"message": "BANK_NOT_FOUND",
"error": "Not Found"
}Withdrawal Flow
- Request valThaiated
- Withdrawal created (pending)
- Platform processes payout
Best Practices
- Keep Bearer token secure
- Use exact bank names
- Check balance before request
- Store response for tracking
Related Endpoints
Use merchant panel or contact support to check withdrawal status. A GET withdrawal endpoint may be added later.
Related Endpoints
GET/Thai/api/withdrawals/{Thai}
Retrieve the status and details of a specific withdrawal request.
GET/Thai/api/withdrawals
Fetch a paginated list of all withdrawal requests for the merchant account.
GET/Thai/api/balance
Retrieve the current merchant balance before initiating withdrawals.
POST/Thai/api/webhooks
Configure webhook endpoints to receive withdrawal status updates.