Behaves identically to /payment/create but returns destination bank info only — no QR code. Use this when the receiving deposit account doesn't support PromptPay; also when a customer specifically needs to transfer by account number.
ทำงานเหมือน /payment/create แต่ส่งกลับข้อมูลบัญชีปลายทางอย่างเดียว ไม่มี QR — ใช้ในกรณีที่ไม่มี Promptpay
Request
Request
Body fields are identical to /payment/create. See that page for the full field reference.
Body fields เหมือนกับ /payment/create ทุกประการ ดูรายละเอียดได้ที่หน้านั้น
Code samples
ตัวอย่างโค้ด
TIME=$(date +%s)
BODY="{\"merchant_id\":\"AA12345678\",\"token\":\"YOUR_TOKEN\",\"time\":$TIME,\"merchant_order_id\":\"ORDER-2026-001\",\"amount\":\"500.00\",\"bank\":\"KBANK\",\"account_name\":\"สมชาย ใจดี\",\"account_no\":\"1234567890\",\"notify_url\":\"https://<your-merchant-webhook-URL>/payment-callback\"}"
SIG=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "YOUR_SECRET" | awk '{print $2}')
curl -X POST https://<your-api-domain>/payment/create-transfer \
-H "Content-Type: application/json" \
-H "X-SIGNATURE: $SIG" \
-d "$BODY"
import crypto from 'node:crypto';
const SECRET = 'YOUR_SECRET';
const body = JSON.stringify({
merchant_id: 'AA12345678',
token: 'YOUR_TOKEN',
time: Math.floor(Date.now() / 1000),
merchant_order_id: 'ORDER-2026-001',
amount: '500.00',
bank: 'KBANK',
account_name: 'สมชาย ใจดี',
account_no: '1234567890',
notify_url: 'https://<your-merchant-webhook-URL>/payment-callback',
});
const sig = crypto.createHmac('sha256', SECRET).update(body).digest('hex');
const r = await fetch('https://<your-api-domain>/payment/create-transfer', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'X-SIGNATURE': sig },
body
});
console.log(await r.json());
<?php
$secret = 'YOUR_SECRET';
$body = json_encode([
'merchant_id' => 'AA12345678',
'token' => 'YOUR_TOKEN',
'time' => time(),
'merchant_order_id' => 'ORDER-2026-001',
'amount' => '500.00',
'bank' => 'KBANK',
'account_name' => 'สมชาย ใจดี',
'account_no' => '1234567890',
'notify_url' => 'https://<your-merchant-webhook-URL>/payment-callback',
], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
$sig = hash_hmac('sha256', $body, $secret);
$ch = curl_init('https://<your-api-domain>/payment/create-transfer');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $body,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
"X-SIGNATURE: $sig",
],
]);
echo curl_exec($ch);
Response
Response
Success — HTTP 200
สำเร็จ — HTTP 200
{
"code": 200,
"message": "Success",
"data": {
"platform_order_id": "ABCP20260508abc123XYZ456",
"merchant_order_id": "ORDER-2026-001",
"uuid": "0190b4a2-7c1d-7000-9f3a-2c8e5b1a4d6f",
"order_datetime": "2026-05-08 10:30:00",
"expire_datetime": "2026-05-08 10:45:00",
"amount": 500.00,
"transfer_amount": 500.03,
"payment_type": "TRANSFER",
"deposit_bank": "KBANK",
"deposit_account_no": "9876543210",
"deposit_account_name": "บริษัท เมอร์แชนต์ จำกัด",
"qrcode": null,
"payment_url": "https://<your-payment-page-domain>/p/0190b4a2-7c1d-7000-9f3a-2c8e5b1a4d6f"
},
"success": true
}
Same shape as /payment/create, with these differences:
รูปแบบเหมือน /payment/create ต่างกันที่:
| Field | Type | Description | ฟิลด์ | ประเภท | คำอธิบาย |
|---|---|---|---|---|---|
| data.payment_type | enum | Always "TRANSFER" for this endpoint. |
data.payment_type | enum | เป็น "TRANSFER" เสมอสำหรับ endpoint นี้ |
| data.qrcode | null | Always null for transfer orders. Use the deposit_* fields instead. |
data.qrcode | null | เป็น null เสมอสำหรับ transfer order — ให้ใช้ฟิลด์ deposit_* แทน |
| data.deposit_bank | string | Destination bank code (e.g. KBANK). Show this to the customer. |
data.deposit_bank | string | รหัสธนาคารปลายทาง (เช่น KBANK) — โชว์ให้ลูกค้าเห็น |
| data.deposit_account_no | string | Destination account number. Show this to the customer. | data.deposit_account_no | string | เลขบัญชีปลายทาง — โชว์ให้ลูกค้าเห็น |
| data.deposit_account_name | string | Destination account holder name. Show this to the customer. | data.deposit_account_name | string | ชื่อบัญชีปลายทาง — โชว์ให้ลูกค้าเห็น |
All other fields (platform_order_id, merchant_order_id,
uuid, order_datetime, expire_datetime,
amount, transfer_amount, payment_url) behave
exactly as on /payment/create.
ฟิลด์อื่น ๆ (platform_order_id, merchant_order_id, uuid,
order_datetime, expire_datetime, amount,
transfer_amount, payment_url) เหมือนกับ
/payment/create ทุกประการ
transfer_amounttransfer_amount เป๊ะ ๆA different amount won't be matched to this order. We use transfer_amount as the unique identifier on the destination account.
ถ้าโอนยอดอื่นระบบจะจับคู่กับ order นี้ไม่ได้ — เราใช้ transfer_amount เป็น unique identifier ของบัญชีปลายทาง
Errors
Errors
Same as /payment/create.
เหมือนกับ /payment/create